Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cieloazul310/d286377e864884ab21fa10963a9e0b1b to your computer and use it in GitHub Desktop.
Save cieloazul310/d286377e864884ab21fa10963a9e0b1b to your computer and use it in GitHub Desktop.
;; Example: Replicator
(deftime time 0.5)
(defn sin-transition [t]
(sin (* (/ time t) PI))
)
(def timedeg (deg
(* 40 (sin-transition 1))
))
:start-sketch
(background "snow")
(transform
(mat2d/*
(pivot [100 20] (rotate timedeg))
)
(style (stroke "#666" 2)
(line [100 20] [100 160])
(style [(fill "white") (stroke *stroke-color* 2)]
(circle [100 159] 10)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment