with initial condition x = 0.2, for different values of parameter p
6.5 A Bisection Method Applied to the Coupled Logistic Map
6.5.1.1 The Inside or Outside Problem
The calculation that needs to be performed, to determine in which sub-quadrilateral ZT lies, is analagous to one used in computer graphics to check whether or not a test point lies inside or outside the boundary of an object. The standard method of checking whether a particular test point is inside or outside the boundary of an object is as follows:
Draw a ray from the test point out to infinity in any direction.
Count the number of times the ray crosses the boundary of the object.
If the ray crosses an odd number of times then the test point is inside the object. If it crosses an even number of times then the test point lies outside the boundary.
We present an algorithm to test whether a point is inside or outside a polygon.
Consider each of the edges of a given polygon in turn and perform the following tests in turn:
If both endpoints of the edge are to the left of the test point, do nothing. Go to the next edge.
If both endpoints of the edge are to the right of the test point, do nothing. Go to the next edge.
If both endpoints of the edge are below the test point, do nothing.
If both endpoints of the edge are above the test point, then if one endpoint is to the left of the test point and the other is to the right, then add 1 to the number of crossings found. Proceed to the next edge.
If a so-called "bounding box" for the edge encloses the test point then do the following calculation (see 91
Figure 11):
Calculate yc, the y-coordinate of the point where the polygon's edge and the vertical ray cross, from the formula
YB YL
yc — xi3) YL
XB — XL
If yc > yA , then the ray to infinity does not cross this edge of the polygon so add 1 to the number of crossings found and go on to the next edge. If yc < yA, then there is no crossing so do nothing. Go to the next edge.
Once all the edges of the polygon have been tested, if the total number of crossings found is even, then the test point lies outside the polygon. If the total number of crossings found is odd, then the test point lies within the polygon.
The test program is implemented in C++ by the program polygon.cpp [72]. This program appears in the Appendix.
By applying the above algorithm, it becomes possible to establish in which of the four sub-quadrilaterals the target test-point ZT, lies. Thereafter, the three sub-sub-quadrilaterals, not containing ZT, are discarded. The sub-quadrilateral containing ZT is subjected to the same process that was applied to the initial quadrilateral with central point Fr, e. We suppose for example, that the testing procedure described above, reveals the target point, ZT to lie within the subquadrilateral with vertices Fr — 81, e + 62, Fr, E 62, Fr, e and Fr — 6 1 ,e (Figure 1 2(iii)). This quadrilateral, according to our method, is redivided into four smaller subquadrilaterals. The quadrilateral grid points are Fr — 6 1 ,e + 52, Fr — 61/2,e + 62, Fr, E + Fr — 61, e ± 62/2, Fr — 6i/2, + 82/2, Fr, e + 62/2, Fr — 6 1 ,E, Fr — 61 /2, e and Fr, E (Figure 1 2(iv)).
If, upon retesting the quadrilateral for the location of ZT, we find it to be in the lower-right subquadrilateral with vertices Fr — 81/2, e + 62/2, Fr, e + 62/2, Fr, E and Fr — 6 1 /2, e, then it is this quadrilateral on which the next iteration will be applied (Figure 12(v)).
After n iterations we have the following four cases.
92
(
x
B, yB)
x y
A
Figure 11
Diagram of a "bounding box" of the edge of a polygon, enclosing the test point (x A,yA). The y-coordinate of the point where the polygon's edge and the vertical ray cross, is denoted by Yc•
93
Case 1:
The target point, ZT, is located in the upper-right subquadrilateral of the initial quadrilateral. The central point of the quadrilateral after n iterations is given by
Fr + 81/2 n-1 ,e + 52/2 n-1 . Case 2:
The target point, ZT, is located in the lower-right subquadrilateral of the initial quadrilateral. The central point of the quadrilateral after n iterations is given by
Fr + 8/2n-1, 6 82/2n-1.
Case 3:
The target point, ZT, is located in the lower-left subquadrilateral of the initial quadrilateral. The central point of the quadrilateral after n iterations is given by
Fr _ 81 / 2n-1 ,e _ 82 / 2 n-1 .
Case 4:
The target point, ZT, is located in the upper-left subquadrilateral of the initial quadrilateral. The central point of the quadrilateral after n iterations is given by
Fr — 6.1/2n-1,e ± 82/2n-1.
Throughout the iteration scheme, we continue to test each subquadrilateral for the presence of the target point. The quadrilateral in which the target point occurs is then subdivided according to the method described above. The iteration scheme is halted when the distance between ZT and the midpoint Fr — 61/2n-1, e — 82/2n-1 (say); is sufficiently small according to some predefined tolerance (Figure 12 (vi)).
94
6.6 Conclusion
In the C++ program, tarbis2.cpp, we implement the method described in the previous section. The applied map (Figure 1) is the second iterate of the coupled logistic map. Implementing the method decribed above we can target the point (0.842, 0.578), on the attractor of the map, to an accuracy of 10 -8 within 18 iterations.
95
Fr-51,s 482 Fr÷81,3 +32
Fr-&7,a
-82Figure 12(i)
Diagram showing the initial quadrilateral with vertices,
Fr_81,e+82,Fr+51,e
+82,Fr_81,8-82and F,,51 ,8_62. The central point of the initial quadrilateral is F r,s . The desired target point, ZT, lies within the initial quadrilateral.
96
Fr-81,e +82 +62 Fr±5i,e. +82
ZT
Fr,s.
Fr-61,8
Fr+81,:e. -
Fr-81,e -82 Fr+51,e -82
Figure 12(i0
The midpoints of the initial quadrilateral's edges are calculated. The quadrilateral may subsequently be regarded as a grid of nine points. The quadrilateral is subdivided into four smaller subquadrilaterals with common vertex, F r,„ We suppose that, for this particular example, the test procedure reveals the target point, ZT, to lie within the top-left
subquadrilateral.
97
ZT
Fr-81,e ±82 Fr,8 4-8/
j-