Interactive Clifford Attractors with webR

Once webR has been loaded into this page, a visualisation of a Clifford attractor should be drawn above. This is a type of mathematical object known as a strange attractor, with chaotic and fractal properties.

The governing equations are, xn+1=sin(ayn)+ccos(axn),yn+1=sin(bxn)+dcos(byn). where (xn,yn) are points on the attractor and a, b, c and d are parameters. The image is drawn by repeated iteration with the colour defined by the angle between successive points on the attractor.

The attractor is drawn using an R script and written to the page using webR's included HTML canvas graphics device. The underlying R code can be found at the project source code in draw.js.

The process in this page is interactive, and the parameters governing the evolution of the system can be tweaked using the settings in the top right of the page. Try to avoid parameters near zero, they tend to result in smaller and less interesting attractors.

Setting a smaller value for Alpha will result in nicer plots, but take longer to visualise.

Close Controls