Skip to content

Instantly share code, notes, and snippets.

@paulsonnentag
Last active July 25, 2017 08:10
Show Gist options
  • Save paulsonnentag/a3dc7aa15ac33e54bbb03222e730d6f6 to your computer and use it in GitHub Desktop.
Save paulsonnentag/a3dc7aa15ac33e54bbb03222e730d6f6 to your computer and use it in GitHub Desktop.
livecodelab sample
t = time*3
rotate 0.2, t/10, 0
scale 0.3+0.03*abs(sin(t))
pushMatrix
scale 6, 0.1, 6
box
popMatrix
x = abs(sin(t)) - sin(t)
y = abs(sin(t-pi)) - sin(t-pi)
# ball
pushMatrix
move 0, 0.3, 0
scale 0.3
if x == 0
ball
popMatrix
# cup
move x, y+0.6, 0
rotate 0, 0, y
64 times with i
pushMatrix
rotate 0, 0.2*i, 0
move 0.4, 0, 0
scale 0.05, 1, 0.05
box
popMatrix
100 times with i
pushMatrix
move 0, 0.5, 0
scale 0.6, 0.05, 0.6
rotate 0, 0.05 * i, 0
box
popMatrix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment