Created
July 31, 2013 00:02
-
-
Save mathias/6118164 to your computer and use it in GitHub Desktop.
shoes minsky's circle algorithm animation glitches
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
Shoes.app do | |
epsilon = 1.0/16 | |
offset = 250 | |
initial_x = 100 | |
initial_y = 100 | |
fill red | |
@animate = animate (2) do |i| | |
epsilon = 10.0 / (i) | |
x = initial_x | |
y = initial_y | |
shape do | |
move_to(x + offset,y + offset) | |
100.times do | |
x = x - epsilon * y | |
y = y + epsilon * x | |
line_to(x + offset,y + offset) | |
end | |
end | |
@animate.stop if i > 160 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment