Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define HEIGHT 800)
- (define WIDTH 500)
- (define (sceneblank x)
- (place-image blank 400 400 (empty-scene WIDTH HEIGHT "black"))
- ;blank being the image
- (animate sceneblank)
- (require 2htdp/image)
- (require 2htdp/universe)
- (define HEIGHT 800)
- (define WIDTH 500)
- (define BLANK-SCENE
- (empty-scene WIDTH HEIGHT "black"))
- ;; This function shows just the circle
- (define (add-circle x scene)
- (place-image (circle 50 "solid" "red") x 400 scene))
- ;; This function shows just the square
- (define (add-square x scene)
- (place-image (square 50 "solid" "blue") x 500 scene))
- ;; This shows both of them
- (define (circle+square x)
- (add-circle x (add-square x BLANK-SCENE)))
- (animate circle+square)
Add Comment
Please, Sign In to add comment