Created
October 4, 2010 08:29
-
-
Save podhmo/609383 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| (use gl.processing) | |
| (use gl.processing.interactive) | |
| ;; animation | |
| (define *angle* 0) | |
| (define draw | |
| (draw$ (lambda () | |
| (translate 150 150) | |
| (rotate *angle* 0 0 1) | |
| (rect 0 0 40 40)))) | |
| (define timer | |
| (timer$ (^ (_) (inc! *angle*) (redisplay)))) | |
| ;; redisplay=glut-post-redisplay, drawを実行しても良い | |
| (define main | |
| (setup$ (lambda () | |
| (window 300 300 "sample" 100 100) | |
| (rect-mode! 'center) | |
| (timer 1)) | |
| :draw draw)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment