MoI discussion forum
MoI discussion forum

Full Version: Doyle spirals, Doyle flower

Show messages:  1-13  14-24

From: bemfarmer
1 Mar 2020   [#14] In reply to [#13]
Complex math using modulus and argument is promising.
- Brian
From: bemfarmer
4 Mar 2020   [#15]
Using more "ported" code, the Doyle spiral of circles is being formed, but only one arm.
I think that the arms are being calculated, but only the last arm survives.
Saving by .concat of pointarray and .concat of radii numarray, or .push do not seem to work...maybe xlength needs to be set?
So it is back to debugging:-)
- Brian
From: bemfarmer
4 Mar 2020   [#16]
Finally got the DoyleSpirals.js node to work.

The problem was that I had an old version, renamed DoyleSpiralOneArm.js in the extension folder, which functioned partly, and one misnamed variable in the DoyleSpirals.js file, r instead of rMaster. (The old version loaded in the menu as DoyleSpiral.)

(apparently) nodeeditor scans ALL of the .js files in the extensions folder,

so somehow the functions in the old version were interfering with the latest version.
Or, more likely, the old version was running instead of the newer version?
Every time I edited DoyleSpirals.js and copied it to the extensions folder, nothing changed or improved. A few hours of wasted time, but educational.

I finally changed the values of p and q from 3 & 8 to 4 and 6, which revealed that the old version was running.

So a suggestion woule be to get rid of old versions in the extensions folder,
and make a visual modification to the newest version.

- Brian
From: bemfarmer
5 Mar 2020   [#17] In reply to [#16]
Here is a beta copy of the DoyleSpiral script, which gives basic spirals.
It is a "port" of Robin Houston DoyleSpiral explorer code. The buildArm function code was moved inline, during debugging, and could be separated out.

This script was build by using and modifying the pattern of the previous DoyleCell script, so the Root Solver is still doylefn.js.

There is more work to do.
Adding color styles or gradients, varying by arm would be nice.
Only q_arms are implemented. p_arms are not implemented, which would require exchanging the roles of points a and b.
Right hand spirals would need complex conjugate added, or do it in MoI later.
Moebius transform may be possible by math nodes(?).

Due to increasing seasonal work load, improvements may be slow...

modMin and modMax are essentially modulus boundary circles centered at the origin, and all of the circle centers of the Doyle circles, (or spheres),
occur between these boundaries.
For some large values of p and q, there are circles formed for some quadrants which exceed the modulus boundary of modMax,
for unknown reason.

There is a demo .nod file, which can be loaded to the nodeeditor canvas

"Correct" values for p and q are 1 <=p <=q, with 2<q, but some "incorrect" values for p and q form other circle patterns...
Some other "incorrect" values Alert that a root cannot be calculated.

Place DoyleSpiral.js and doylefn.js in the nodeeditor extensions folder.
It is OK to leave the DoyleCell.js file there, but remove any other old DoyleSpiral.js files.

Place the rudimentary DoyleSpiral.html file in extensions/Documents/EN folder.
With up to date nodeeditor program, the .html file will be view-able under the
nodes right-click info button.

A French version translation could be placed in the FR folder.

- Brian

Attachments:
DoyleSpiralSave.zip


From: bemfarmer
9 Mar 2020   [#18]
Here is a DoubleDoyleDemo2 spiral, made from nodes, with two attractor points, x = -1 and x = +1.
(Code from Robin Houston was used.)

x=-1 is the regular Doyle attractor, moved from 0 to -1.
x=+1 attractor point represents infinity.

The 4 Macros used were:
1. ConvertCenters.nod (creates 3 points on each existing Doyle circle.)

2. MoebiusTr_0_1_inf_to_neg1_0_1.nod (Moebius transform maps x=0 to x=-1,
maps x=1 to x=0, and maps x=infinity to x=+1. This formula is then applied to all of the 3_point circle points. The mapped sets of 3 points are then run through the MoI's 3_point circle node. One extra step is to get the center Y value of each mapped circle, and mask out those circle which have absolute value greater than 5.5. (The value is supposed to be 10, but the math seems to be working wrong...) This gets rid of huge circles, and two very large circles which appear to be incorrect, for unknown reason.
(Mapped circles are produced, because (extended) circles are mapped to (extended) circles, by the moebius transform.) Note Pilou's video post. The moebius transform represents reverse stereographic projection to a sphere, rotation of the sphere by 90 degrees with a certain axis, and then stereographic projection back to the MoI Top View.
It is sufficient to only map 3 points per original circle.

3. Extract_XY node. This converts a pointarray point into a Duo-numarray, representing a complex number.

4. Extract_2XY nod macro. Same as #3, with two point inputs, and outputs X1 Y1 X2 Y2,

Place the 4 Macros in the Macros folder.
Run the DoubleDoyleDemo2.nod.
(Assumes that DoyleSpiral.js and doylefn.js are already in the extension folder of nodeeditor.)

One other point. The math.hypot may be better and less error prone that the current formula for hypotenuse. (Not tried yet.)

Thing would look much better with colors and planar...

The maxModulus and minModulus were adjusted so that the neighborhood of the two attractor points looked about the same.

Modifying to more extreme values may hang up the computer, but on windows 10, MoI can be closed in Task Manager.

Attachments:
DoubleDoyle.7z

Image Attachments:
DoubleD_9_24b.png 


From: James (JFH)
10 Mar 2020   [#19] In reply to [#18]
Brian,

>"DoubleDoyleDemo2 spiral"
Congrats, This is very cool.

>"Thing would look much better with colors and planar."
Here's a simply way to achieve that. (.nod file attached)



Is it possible to have an input to adjust the distance between the 2 points?
I'm trying to get my head the logic.

Again, great work,
James
https://www.instagram.com/nodeology/

Image Attachments:
DoubleDoyleDemo2color.gif 


From: bemfarmer
10 Mar 2020   [#20] In reply to [#19]
Hi James,

Thank you for the nice style by circle size version.

When time permits, I'll add some style to the Doyle Spiral node, by arm, or position in arm.
Or gradients.
Adding an indexByArm output, and an indexByPositionInArm output might suffice?

There are two arm possibilities, "rows" or "columns" corresponding to p and q.

Maybe even rotation animation.

MoI scaling would move the two attractors apart.
Note that circle C of the Doyle cell is mapped and relocated from center (1,0) to center (0,0), with mapped A and mapped B circles still tangent.
For a different moebius transformation separation of the attractors, the formulas would have to be recalculated. I think this would be a scaling as well(?).

- Brian

I'll have to try sphere replacement. Cannot remember if such a script was written yet.

p.s. It seems that one circle near -1 does not get colored?
From: bemfarmer
10 Mar 2020   [#21]
The create rainbow function may have a "bug" which causes the White/Black 4th circle in to not have "blue" shade of style(???)

I modified the for loop to i <= 255, instead of i<255, and now the 4th circle has a "blue" style, BUT it is too intense.
Maybe the sigmoid equations need to slightly modified???
Due to my ignorance of the sigmoid equations, whether or not this is a bug is unclear.

Karsten's (?) create rainbow function is located in nodeeditor extension/libs folder, inside basicfunctions.js.
The function is called by setStyle node.

- Brian
From: bemfarmer
11 Mar 2020   [#22] In reply to [#20]
For the color adding nodes, Switching the constant 255,0 to 0,255 results in the irregular 4th circle to be orange, but too dark a shade, and the two large circles on the far right to be white/black. Adding the <= to the rainbow for loop colors the two large circles to blue shade.
So I conclude that there are two problems.
1. add the <= to fix blue colors.
2. something is wrong with the way the 4th circle is measured and/or turned into a style index. Maybe related to number of digits??

I wonder if the new circumference availability for MoI 4 could be used for indexing?
May try some of the recent Gradients code.

- Brian
From: bemfarmer
12 Mar 2020   [#23]
Deriving the moebius transformation that maps 3 points to 3 other points
is explained here(section 3.4.11 Building a mobius transformation):
https://mphitchman.com/geometry/section3-4.html
Using equated cross ratios. (handling infinity is also explained.)

For turning the moebius transformation formula into a formula involving x and y,
see the 4th answer here:
https://math.stackexchange.com/questions/36542/real-and-imaginary-parts-of-the-m%C3%B6bius-transformation
Uses a, b, c, d, (real numbers with imaginary parts a2= b2= c2 = d2 = 0) ,
and alpha, beta, gamma, and delta.

After about 8 pages of tedius hand calculation with many corrected mistakes,
the moebius transformation and the x and y formulas were calculated, for the current mapping of the attractor points to -1 and +1, and also to
-2 and +2 . The simple expected result is that this scaling by 2 is equivalent to multiplying the x and y formulas by 2. So a scaling input could be added to the double doyle. Or the scaling could be done after forming the double doyle, by MoI scaling.

The original moebius transformation is V(z) = (z-1)/(z+1).
The 2 times scale moebius transformation is V(z) = 2*(z-1)(z+1).

For the x and y formulas:
The new denominator is the same as used in double doyle node.
denom = (x+1)*(x+1) + y*y.
The numerator is 2 times the original numerator.
New numer = 2*((x*x - 1) + (y*y))

- Brian
From: bemfarmer
14 Aug 2020   [#24] In reply to [#17]
The DoyleSpiral node does not have a complete pointarray output.
The angles and x,y, lengths are not there. (See Spherepoints node).
Need to review pointarray docs, Max and/or Karsten's explanations...for a better understanding of pointarray format...
- Brian

Show messages:  1-13  14-24