Spirograph made with 2 complex exponentials
- Bob Anderson
Notes on the complex exponential spirograph model
The first complex exponential term represents a complex number which when plotted on a real/imaginary plot (here represented by the x and y coordinates of the 2D plot) plots out a circle as the value of t increased from 0 to 2π. The second complex exponential spins at a rate of N times the first so it effectively spins round N times while "riding" round the first complex exponential as it makes a single revolution of the plot. The pattern is generated by plotting the sum of the pair of rotating vectors. The most interesting figures are produced when the radii of the circles plotted out by both complex exponentials are almost the same lengths. The ratios of the second to the first is controlled by slider k. R just defines the absolute radius of the first circle. This just allows the pattern to be adjusted to fill the screen without zooming in or out of the plot. Although undocumented it seems the Curve function will allow you to plot the complex number provided by the function f(t) although it does internally call x(f(t)) and y(f(t)) to sneakily convert the real and imaginary parts of the number to plain old x and y coordinates. By avoiding the use of the Locus() function the response to changes of any of the sliders seems to be faster. Also by avoiding the locus function the problems this gives with its reluctance to do screen redrawing on my Linux laptop are also avoided, giving a much smoother user experience.