Created
April 28, 2009 01:32
-
-
Save jashkenas/102869 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
load_library 'video' | |
import 'processing.video.MovieMaker' | |
def setup | |
size 300, 150 | |
@mm = MovieMaker.new(self, width, height, "drawing.mov") | |
background 20, 20, 100 | |
fill 147, 246, 258, 20 | |
smooth | |
no_stroke | |
end | |
def draw | |
pace = frame_count * 7 | |
ellipse pace, height / 2 + sin(frame_count / 2.5) * 30, 30, 30 | |
@mm.add_frame | |
if pace > width | |
@mm.finish | |
exit | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment