PasteRack.org
Paste # 57413
2017-06-06 05:36:52

Fork as a new paste.

Paste viewed 47 times.


Embed:

  1. #lang racket
  2. (require 2htdp/image)
  3. (define unit 10)
  4. (define single-wheel (circle (* unit 0.7) "solid" "black"))
  5. (define upper-car (overlay/align "middle" "bottom"
  6. (rectangle (* unit 3) (* unit 2) "solid" "red")
  7. (rectangle (* unit 5.5) unit "solid" "red")))
  8. (define wheels (overlay/xy single-wheel (* unit 4)
  9. (* unit 0) single-wheel))
  10. (underlay/xy upper-car (/ unit unit) (* unit 1.5) wheels)

=>

image