Created
May 23, 2018 09:55
-
-
Save shakdwipeea/c963c5cce99ea0995cd6f9fce96599de to your computer and use it in GitHub Desktop.
wheel movement
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
(require 2htdp/image) | |
(require 2htdp/universe) | |
(define background (empty-scene 200 50)) | |
(define width-of-world 200) | |
(define radius-of-wheel 2) | |
(define distance-between-wheel (* radius-of-wheel 5)) | |
(define wheel | |
(circle radius-of-wheel "solid" "red")) | |
(define SPACE (rectangle 5 5 radius-of-wheel "white")) | |
(define BOTH-WHEELS (beside wheel SPACE wheel)) | |
(define (render x) | |
(place-image wheel x 48 (empty-scene 200 50))) | |
(define (tock x) | |
(+ 3 x)) | |
(define (main ws) | |
(big-bang ws | |
(on-tick tock) | |
(to-draw render))) | |
(main -10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment