How it works
What it this thing called?
The pattern that is being formed is called a "cyclocycloid" which is a form of "roulette curve". The pattern produced is very similar to that produced by a product called "Spirograph" which is an excellent toy that has inspired children for many years and is still available today.

How it works
In this program, the cyclocycloid is made by the sum of two rotating vectors as can be seen in the image to the left. If these vectors are rotating in the same direction, the resulting path will form an "epicycloid" and if the vectors are rotating in the opposite direction, the resulting path will form a path called a "hypocycloid"

In the image to the left the Blue Vector A will rotate 2 times and the Red Vector B will rotate 5 times, the direction of rotation determined by the sign of the number. (a positive number "+" rotating clockwise and a negative number "-" rotating counterclockwise.) This can be demonstrated by clicking on the appropriate button below the image.

The Number of Nodes
Note that "A = +2 B = +5" and will produce 3 internal nodes and "A = +2 B = -5" and will produce 7 external nodes. The number of nodes can be determined by the absolute value of the rotational velocity of vector A minus the rotational velocity of vector B.

In the image with "A = +2   B = - 5" No. of nodes = |A - B| = |+2 - -5| = 7

If vectors are set to "A = +2   B = +5" No. of nodes = |A - B| = |+2 - +5| = |-3| = 3

Use Whole Numbers
This program has been optimised to work with whole numbers (integers) both positive and negative. For the best results, only whole numbers should be used.

Ratio in its Simplest Form
If A is set to 2 and B is set to 6 (a ratio of 2:6), the results will be identical to A = 1 & B = 3 (a ratio of 1:3), except with a ratio of 2:6, the resulting pattern will be traced over twice and the resolution halved. It is always best to use a ratio in its simplest form.

To express a ratio in its simplest form, you divide both numbers in the ratio by their greatest common factor. The resulting ratio will have the smallest possible whole number terms. Or for ratios where the lowest number is less than 1000, you could use the Script enabled table below:

A: B:
Ratio in its Simplest Form:
A "Cyclocycloid" with Four Rotating Vectors

Optimising Vectors C & D
This program is very different from anything else out there because it has two additional vectors; however, optimising the numbers for vectors C & D can be tricky. You could just plug in a number and see if it happens, and if it is close, but not quite right, you could just increment the numbers and see what works. Or you could do the maths shown below to find numbers that will resonate with the ratios of A & B.

Alternatively, you could use the Resonance Calculator, and use the numbers generated by that.

The Maths:
The number of nodes is calculated by first finding the ratio of A to B in its simplest form, then finding the absolute value of the rotational velocity of vector A minus the rotational velocity of vector B. No. of nodes = |A - B|

If C is a positive number, then the fundamental harmonic is the value of whichever is the higher of A or B

If C is a negative number, then the fundamental harmonic is the value of whichever is the lower of A or B

The fundamental resonance won't do much as it will be at exactly the same spin rate as whichever one it is the same as and it will only make that circle bigger. But if we move to the 2nd harmonic this gets interesting.

If C is a positive, the 2nd harmonic is found by adding the No. of nodes to the fundamental harmonic. And the 3rd harmonic is by adding 2 times the No. of nodes to the fundamental harmonic. And so forth for all the harmonics after that.

If C is a negative, then the 2nd harmonic is found by subtracting the No. of nodes from the fundamental harmonic. And the 3rd by subtracting 2 times the No. of nodes from the fundamental harmonic.

Exporting an Image
When you get what you like you can export your design to an image. If you use the image generated for private purposes only then do so without cost, and feel free to share the images with you friends, I only ask that you also provide a link back to the site so that others can also have fun.

If you intend to use the product for commercial purposes, such as printing on a t-shirt or a business logo, then I ask that you get in contact with me. A lot of work has gone into making this program and it is only right that money is to be made from this then the one who has written the software should get a commission.

What are the Rules
Experiment, explore options, do different things and see what happens, gain understanding, be creative, share it with your friends, but most of all, have fun..

Limitations
In the “4 Vector Cyclocycloid Generator” you can set the number of points and the number of layers. For each point, 8 trig functions and 34 other arithmetic operators must be performed. This is then multiplied by the number of layers. For modern computers with substantial resources in processing and memory, you can do 20,000 points and 100 layers without much issue, but it will slow down. If the number of points and the number of layers entered are too extreme the java script will fail and stop, and it will not display an image. Just reduce the numbers to something reasonable and it will come good.

If the Vector Ratios are too extreme you will end up with not much more than something that looks like a messy ball of steel wool. Just reduce the number to something reasonable.

If the Amplitudes are too big, the image will be beyond the edge of the screen.

 

 

Links: