Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 1.25 KB

README.md

File metadata and controls

31 lines (18 loc) · 1.25 KB

The de Jong Attractor

Visit the live demo

preview image

The de Jong Attractor is a system parameterized by four reals a, b, c, d ∈ [-π, π). For a given choice of these parameters and an initial point ⟨x0, y0⟩, the attractor yields a sequence of points where each point is defined in terms of the previous: ⟨xn+1, yn+1⟩ = ⟨sin(ayn) - cos(bxn), sin(cxn) - cos(dyn)⟩.

The formula is quite simple, but plots of the de Jong Attractor can be quite beautiful. This project explores this beauty by presenting an interface that animates between plots of the attractor by linear interpolation on the four parameters.

It is implemented in ClojureScript with Om and THREE.js, using custom GLSL vertex shaders for the calculation of points.

Usage

build

lein cljsbuild once dev

watch

lein cljsbuild auto dev

start a REPL

rlwrap lein figwheel
> (require '[de-jong.core :as de-jong])