Tutorial: Scribble Coloring

Text and Images © 2009 Kerry Mitchell

The original intent of this coloring was to replicate a scribble pattern. I didn't quite succeed in that, but I think it's still pretty cool. It takes a rose curve and smoothly changes its parameters while the curve moves along a curve.


The basic rose curve is defined in polar coordinates as r = sin(nθ), where n determines the number of lobes, or petals. Here we have three different rose curves, with n = 2, 2.5, and 3. (Click on any of the images in this tutorial to see their parameter sets.)

rose curves
Rose curves with n = 2, 2.5, and 3

This coloring uses a more general definition of the rose curve: r = accos(fc(θ + φc)) + assin(fs(θ + φs)), where:

and each of these quantities are allowed to vary along the course of the curve.

A time-like variable (t) is used to change the curve and move it around. Everything happens between the beginning, where t = 0, and the end, where t = 1. Each of the variables listed above is a function of t, along with the curve's center point.

Before we get into the parameters, let's see how things work.

The amplitude determines how large the curve is. Here on the left is the basic curve for fs = 1 (no cosine term), with an amplitude as = 1. On the right, the amplitude changes smoothly from 1 (on the left) to 2 (in the middle) to 0 (on the right).

varying amplitude
Varying the amplitude from 1 to 2 to 0

The frequency determines the number of lobes. Large changes in the frequency can lead to visual noise, but small changes can be very graceful. Here, the amplitude is 1 and the frequency, fs, changes from 2.98 (on the left) to 3.02 (on the right).

varying frequency
Varying the frequency from 2.98 to 3.02

Changing the phase imparts a sense of rotation. On the left below is the basic curve for fs = 3 (no cosine term), with an amplitude as = 1. On the right, the phase, φs, varies from 0° to 180°. Note how the shape rotates half a turn from lobe pointing down to lobe pointing up.

varying phase
Varying the phase from 0° to 180°

The number of loops determines how many times the curve is drawn. More loops makes a smoother transition but generally requires more points (and time and memory). Both images below use a frequency fs = 2.02 (no cosine term), an amplitude as = 1, and phase, φs = 0°. The first image uses 50 loops and the second uses 100. The apparent rotation in these cases comes from the frequency being close to, but not quite, an integer.

50 loops
50 loops

100 loops
100 loops


Much of the power of this coloring comes from its interpolation routines--exactly how a variable changes from one value to another. For each variable, there are five methods. They are: This image shows how the various techniques work. Each curve represents the values that one of the variables would take as t moves from 0 to 1. The black dots in the lower left and upper right corners represent the values for t = 0 and t = 1, respectively. Each of the four curves goes through both points, showing that those values will be exactly used by all of the four methods. (Of course, if the "constant" method is used, then the variable will only take on that value.)

Interpolation schemes

The brown curve shows the "linear" method--a straight line between the two values. The other three curves all use three points in their defintion, the two anchor points and the third point in the upper left corner. The blue curve is a Bezier polynomial and the third point is a control point. It pulls the curve to it, but the curve doesn't necessarily go through it. Assigning weights to each point in a Bezier curve turns it into a rational Bezier curve, the red line. In this example, the anchor points have weights of 1 and the control point has a weight of 10. This causes the red line to be drawn toward the control point much more so than it was with the regular Bezier curve (which is the same as a Rational Bezier with all weights the same). A Lagrange polynomial is shown in the green curve. In this case, the curve also goes through the third point. This is good for making sure that all of your input values are used, but it can also lead to some unpredicted results.

If you're new to all of this, then stick with the "constant" and "linear" modes until you get the hang of things.


There is a section of general parameters and then seven sections, one for each variable. Those sections all have the same structure.

General parameters

Loops. These parameters allow you to specify how many loops are drawn and how they are drawn. Each loop contains 360° of angle.

There are six more sections of parameters, each with a structure identical to that of the Loops section:


You are, of course, free to use this coloring however you’d like. However, these hints may help your explorations be more productive.

Sample Image

Click on any of the images on this page to see their parameter sets. Here’s how to make the image at the top of this page.

  1. Start a new fractal, with these characteristics:

    Your image might not look like much, but it should resemble the “Step 1” image, below. If not, click on the image for the parameter set.

    step 1
    Step 1

  2. Make a group for this layer and its companion:

    Hopefully, you've got something like the Step 2 image. If not, click on the image for the parameter set.

    step 2
    Step 2

  3. Make two more groups:

    Hopefully, you've got something like the Step 3 image, which is also the image at the top of the page. If not, click on the image for the parameter set.

    step 3
    Step 3

Back to Tutorials page
Up to my home page