Home page

Home Page

Circles applet


Two sliders are used to change the pattern parameters

Control Action
Horizontal Slider
This changes the number of cells in the pattern.
Vertical Slider
This changes the constant 'k' in the equation z = k * (x * x + y * y). Larger values appears to contract the central pattern bringing in more of the surroundings.


The pattern is based on a square array of co-ordinates with (0,0) being in the centre. For each square the value of

z = k * (x * x + y * y)

is calculated. The Fractional part of 'z' is calculated (z - int (z)) and mapped onto a colour. It the screen had infinite resolution this would create a pattern of concentric circular bands, getting progressively narrower as they get further from the centre. Sampling this pattern with the discrete points on our square grid creates this applet's more complicated displays.

(c) John Whitehouse 2011