Created
March 7, 2017 19:10
-
-
Save jackrusher/e7123ac5245410bb054627b08f263482 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn lorenz-points [p sigma beta dt] | |
(loop [n 6000 | |
x 0.01 | |
y 0 | |
z 0 | |
out []] | |
(if (= 0 n) | |
out | |
(recur (dec n) | |
(+ x (* p (- y x) dt)) | |
(+ y (* (- (* x (- sigma z)) y) dt)) | |
(+ z (* (- (* x y) (* beta z)) dt)) | |
(conj out (vec3 x y z)))))) | |
(-> (lorenz-points 11 28 (/ 8.0 3.0) 0.005) | |
(thi.ng.geom.ptf/sweep-mesh (g/vertices (circle 0.5) 22) | |
{:align? false :loop? false}) | |
joggy/set-model!) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment