# Recursive path plotter

"Without a tagline since 2010"

This page takes a string of points on a line and then perturbs them. Their new height above the line is determined according to some function. This process is then iterated. This is much easier to perform using intrinsic coordinates.

Function: cos(s) sin(s) s s^2 s^3 e^(-s^2) sqrt(1-s^2) exp(-s) Top hat Triangle s*exp(-s^2) 1-s^2 cos^2(s) cos^3(s) cos^4(s) sin^2(s) sin^3(s) sin^4(s) red green blue cyan magenta yellow black

### Instructions

There are two parameters that control each iteration:

The compression factor:
This describes how many turns of the function fit into the string. A compression factor of $$2$$ means each successive iteration repeats the function twice as many times.
The scale factor:
This is a multiplicative factor that changes the height above the string. Scale factors larger than $$1$$ correspond to smaller heights. A scale factor of $$2$$ means that the height above the string for each successive iteration is half that of the previous iteration. (Keep tracking of decimals in our heads is quite tedious!)

You can make the string smoother by adding more points (at the expense of more CPU use.)

Sometimes the string shoots off to very large values in the $$x$$ and $$y$$ directions, so by default the canvas can only stretch as far as $$\pm 2$$. To overcome this, you can set the limits manually and te canvas will stretch to accommodate the string, as long as it doesn't breach the limits. The canvas is always square, so that what appears to be a right angle really is a right angle.

If you want to see the inner workings of the algorithm you can switch on the "spokes". This will draw lines connecting the same point for two successive iterations. The spokes should always be at right angles to the string at the lower iteration. Set the spoke interval to 0 to disable spokes.