Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;https://docs.racket-lang.org/teachpack/2htdpimage.html#%28def._%28%28lib._2htdp%2Fimage..rkt%29._underlay%2Fxy%29%29
- ;;https://docs.racket-lang.org/teachpack/2htdpuniverse.html
- (require 2htdp/universe)
- (require 2htdp/image)
- (define (create-UFO-scene height)
- (underlay/xy (rectangle 200 200 "solid" "white") 100 height UFO))
- (define (create-UFO-scene2 width)
- (underlay/xy (rectangle 200 200 "solid" "white") width 100 UFO))
- (define UFO
- (underlay/align "left"
- "bottom"
- (circle 30 "solid" "green")
- (circle 20 "solid" "red")
- (rectangle 40 4 "solid" "blue")))
- ;(create-UFO-scene 300)
- ;(create-UFO-scene 100)
- ;(animate create-UFO-scene)
- ;(animate create-UFO-scene2)
- (define (create-bola-escena height)
- (cond
- [(< height 160)
- (underlay/xy (rectangle 200 200 "solid" "white")
- 100 height bola)]
- [else
- (underlay/xy (rectangle 200 200 "solid" "white")
- 100 160 bola)
- ]
- )
- )
- (define bola
- (underlay/xy
- (circle 10 "solid" "red")
- 20 0
- (underlay/xy
- (circle 10 "solid" "yellow")
- 20 0
- (circle 10 "solid" "green")
- )
- )
- )
- (animate create-bola-escena)
Add Comment
Please, Sign In to add comment