Click on the image to see its parameters.

The points on the curve come from evaluating these equations:

Although the equations don't have simple analytical solutions, they can be solved numerically, and that's what this coloring does. More precisely, it draws the graphs that result from evaluating the equations numerically.

The *integrand* for the *x* equation is cos(π/2 *t*^{2})
and is sin(π/2 *t*^{2}) for the *y* equation. For this
coloring, you can vary the frequencies and exponents independently to any real value.

By default, the frequencies are π/2 for both equations. Changing the frequency alters the alignment of the sine and cosine functions, giving the graphs a very different feel. (Click on the images to see the parameters.)

Green: sine default, cosine default Blue: sine 5% lower, cosine 5% higher |
Blue: sine default, cosine twice default |

A similar thing happens when changing the exponents, which are both set to 2 by default:

Red: sine 2.02, cosine 1.98

Green: sine 2, cosine 2

Blue: sine 1.98, cosine 2.02

In the middle near the bottom, there's black spiral that winds around a point. That shows how all three lines (in this example) start out similar--their graphs lie on top of each other. However, fairly quickly, the curves diverge and each takes its own path.

In the integrals, the upper limit is θ. This value acts describes how long the curve is. In the Cornu spiral graph above, the curve begins at the green dot and ends up wrapping around the final point (the white hole). Increasing θ would make the graph longer and it would fill in the hole even more. This graph is composed of many segments (1024, to be exact). Using more segments makes the curve smoother, at the expense of memory and calculation time.

The curve's extent (θ) and the number of segments are set together and
indirectly. It turns out that if you were to set θ to get a pleasing shape
and then change the number of segments to make the curve smoother, then basic
shape of the graph would change. However, changing both simultaneously can allow
you to maintain the shape. This is done through a *base* and a *multiple*. Given both, then:

- θ, the curve extent, = base × multiple, and
- the number of segments = base
^{2}.

Red: base 41, multiple 4

Green: base 41, multiple 5

Blue: base 41, multiple 6

To keep the same basic shape and make the graph smoother, keep the multiple the same and increase the base by a multiple of the square of the multiple. For example, in this image, all three curves have a multiple of 3 (the default) and they all have the same basic shape. How do they differ?

- The red curve is the coarsest, as it has only 361 segments (361 =
19
^{2}and the base is 19). - The green curve has a base of 28 and has 784 segments (784 =
28
^{2}). It has the same shape because 28 - 19 = 9 = 3^{2}. - The blue curve is the smoothest, with 4096 segments (base = 64). The
difference from the red curve's base is 64 - 28 = 36, which is 4 ×
3
^{2}.

Click on the image to download the parameters. Play with the mulitiplier and base values to see how they change (or don't change) the image. Notes:

- The "change the base by a multiple of the multiple squared" trick works when the frequencies are both set to 1 and the powers both set to 2 (the default settings). It may work with other settings, but you get to find that out on your own.
- In this image, I've hidden parts of the green curve and blue curves to show the graphs more clearly. You can control how much of the curve is shown (without changing it) by adjusting the "first line" and "last line" parameters. Set them both to 0 to show the entire curve.

- Rectangular rule: treat each area as a rectangle;
- Trapezoidal rule: treat each area as a trapezoid; and
- Simpson's rule: each area has a parabola on top.

To manage the weights:

- Set a method's weight to 0 (both real and imaginary parts) to turn it off.
- If you're only using one method, its weight is irrelevant (so long as it is not 0).
- The total of the three weights cannot be 0.

Function Parameters

- cosine frequency: This factor multiplies π/2 to give the actual frequency used. That is, set this to 1 for the internal calculation to use the standard frequency of π/2.
- sine frequency: This factor multiplies π/2 to give the actual frequency used. That is, set this to 1 for the internal calculation to use the standard frequency of π/2.
- cosine power: The exponent of the cosine function.
- sine power: The exponent of the sine function.

Integration Parameters

Remember that, while any individual weight can be 0, the total of the three weights added together cannot be 0.

- rectangular weight (Re) and (Im): The real and imaginary parts of the rectangular rule weight. Set both to 0 to turn off this method.
- trapezoidal weight (Re) and (Im): The real and imaginary parts of the trapezoidal rule weight. Set both to 0 to turn off this method.
- Simpson weight (Re) and (Im): The real and imaginary parts of the Simpson's rule weight. Set both to 0 to turn off this method.

Drawing Parameters

- base: Used to determine how many segments are drawn and the extent of the graph. Must be an integer larger than 1.
- multiple: Used to determine the extent of the graph. Can be any real value.
- color by: How to render the line. Choose one of:
- outline: Each segment is colored from the inside (index 0) to the edge (index 399).
- which line: Colors each segment differently.

- line thickness: How thick is segment is drawn.
- first line: The first segment to be drawn. Use 0 to draw them all.
- last line: The last segment to be drawn. Use 0 to draw them all. See "print last" below.
- speedup threshold: Decrease to draw faster. Be careful to not set too small, or the curve will appear as a dashed line. See "print longest" below.
- center and scale: Check to rescale the curve so that it will fit into a square from (-1, -1) to (1, 1). Generally compatible with "Reset Location" on the Location tab. Unchecking may require zooming out a lot to see the entire curve.
- print longest: Check to see the length of the longest segment. Set the speedup threshold largest than this amount to avoid having the curve appear as a dashed line. You may need to reload the coloring after checking the box if no values print.
- print last: Check to see the index of the last segment, for use with the "last line" parameter. You may need to reload the coloring after checking the box if no values print.

- This is one of those coloring formulas that does all the work. It was designed to be used as an outside coloring with the “Pixel” formula in lkm.ucl.
- The memory required (and rendering time) increase with the square of the "base" parameter, so tread lightly with large bases.
- You may wish to begin with the "center and scale" box checked, until you have a design that you like. If you're working with several curves, uncheck the box to see how they really relate to each other (or don't).