Proceed to Safety

Jordan Curve Method    

Robert P. Munafo, 2023 Jun 21.

The "Jordan curve method" (named for the Jordan curve theorem which is the basis of the Even-odd rule) is a way to find the period of a mu-atom or mu-molecule whose location is known only to be within some bounding rectangle. It is also described in the Period article.

Given a rectangle containing some or all of the Mandelbrot set, one can perform iterations on the rectangle's corners to determine the period of the lowest-period mu-atom within the rectangle, and its approximate location within the rectangle.

1) Start with the four corners of the rectangle as complex numbers, and treat each as the parameter C in the standard iteration algorithm. Start with iteration count N=0.

2) Perform one iteration for each point (making sure that each point is iterated with its own C value; there is a different C value for each of the four iterations). Add one to N.

3) Using the Jordan curve theorem, determine if the current four points define the boundary of a quadrilateral that surrounds the origin. If not, go back to step (2).

If so, then N is the period of a mu-atom within the initial rectangle. The location of the origin in relation to the current positions of the four points corresponds to the position of the mu-atom relative to the original corners of the rectangle.

To find the (approximate) coordinates of the nucleus of the mu-atom, use the method described in the article Inverse Interpolation for a Quadrilateral, with the (iterated) corners as the coordinates (a, b), (c, d), (e, f), and (g, h); and set the values of v and w both to 0. Calculate p and q as described in that article, and they give the position of the mu-atom relative to the original rectangle.


The following program sets up an example and prints the calculations as it goes; you can use the example values to verify that your implementation is working. It uses coordinates of a square enclosing the period-5 mu-molecule R2F(1/2(1/3B1)B1)S (see that article for a picture).

NOTE: The variable names ja, jb, ..., jh correspond to the the variables a, b, ..., h seen at the start of the program in the Jordan Curve Theorem article. See that article for the program listing for the "subprogram jct_test" referenced by this program.

NOTE: The variable names ca, cb, ..., ch correspond to the the variables a, b, ..., h seen at the start of the program in the Inverse Interpolation for a Quadrilateral article. See that article for the program listing for the "subprogram inverse_2d_interpolate" referenced by this program.

// Set C real/imag parameters for 4 complex numbers // We want the period of R2F(1/2(1/3B1)B1)S, the island // located at -1.255 + 0.382i +- 0.005 k1r = -1.250 k1i = 0.387 k2r = -1.260 k2i = 0.387 k3r = -1.260 k3i = 0.377 k4r = -1.250 k4i = 0.377 // Initial Z values are all 0 z1r = 0 z1i = 0 z2r = 0 z2i = 0 z3r = 0 z3i = 0 z4r = 0 z4i = 0 // other setup and loop start go here for iter=1 to 100 // iterate 1st corner zr2 = z1r*z1r - z1i*z1i zi2 = 2*z1r*z1i z1r = zr2 + k1r z1i = zi2 + k1i // iterate 2nd corner zr2 = z2r*z2r - z2i*z2i zi2 = 2*z2r*z2i z2r = zr2 + k2r z2i = zi2 + k2i // iterate 3rd corner zr2 = z3r*z3r - z3i*z3i zi2 = 2*z3r*z3i z3r = zr2 + k3r z3i = zi2 + k3i // iterate 4th corner zr2 = z4r*z4r - z4i*z4i zi2 = 2*z4r*z4i z4r = zr2 + k4r z4i = zi2 + k4i    // show current iterated coordinates print "iter ";iter;": (";z1r;", ";z1i; print "), (";z2r;", ";z2i;"), (";z3r;", ";z3i; print "), (";z4r;", ";z4i;")"    // set parameters to JCT subroutine ja = z1r jb = z1i jc = z2r jd = z2i je = z3r jf = z3i jg = z4r jh = z4i    // Perform Jordan Curve test, same algorithm as // shown in "Jordan Curve Theorem" article: run subprogram jct_test    // if detected, print result and end if (jct_answer) then print "The lowest period mu-atom nucleus within" print "this rectangle has period ";iter    // now use reverse interpolation to estimate the nucleus location    ' set parameters to inverse2Dinterpolate subroutine ' vertex coordinates (different order from Jordan) ca = z1r cb = z1i cc = z2r cd = z2i ce = z4r cf = z4i cg = z3r ch = z3i ' and point of interest (origin) cv = 0 cw = 0 ' call subroutine for inverse interpolation run subprogram inverse_2d_interpolate if (i2i_error < 0) then print "Could not reverse-interpolate to find a nucleus." else ' compute coordinates of located point with respect ' to original corners kwid = k2r - k1r; khei = k1i - k3i; nr = k1r + pp*kwid; ni = k1i - qq*khei; print "Nucleus is at approximately (";nr;", ";ni;")" end if end program end if // loop continue, test itmax, end without success next iter print "Iterated ";iter;" times without finding a period."    end program

To verify proper operation, run the program and check for the following values to be printed out:

iter 1: (-1.25, 0.387), (-1.26, 0.387), (-1.26, 0.377), (-1.25, 0.377) iter 2: (0.1627, -0.5805), (0.1778, -0.5882), (0.1855, -0.5730), (0.1704, -0.5655) iter 3: (-1.5605, 0.1981), (-1.5744, 0.1778), (-1.5540, 0.1644), (-1.5408, 0.1843) iter 4: (1.1459, -0.2312), (1.1871, -0.1728), (1.1278, -0.1341), (1.0900, -0.1910) iter 5: (0.0097, -0.1428), (0.1194, -0.0233), (-0.0060, 0.0746), (-0.0984, -0.0393) The lowest period mu-atom nucleus within this rectangle has period 5

Example Implementations

A period finder using this method is implemented in Color MANDELZOOM and in Power MANDELZOOM; the latter article shows it being used (in the embedded Julia set image).


20230218 first version;

20230220 Add paragraph referencing Inverse Interpolation for a Quadrilateral

20230222 Add working program;

20230224 Link to example implementations;

20230621 link to even-odd-rule and JCT wiki articles

From the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 1987-2024.

Mu-ency main pageindexrecent changesDEMZ

Robert Munafo's home pages on AWS    © 1996-2024 Robert P. Munafo.    about    contact
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Details here.

This page was written in the "embarrassingly readable" markup language RHTF, and was last updated on 2023 Jun 22. s.27