Skip to content

Instantly share code, notes, and snippets.

@pramatias
Created October 4, 2022 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pramatias/bc34addc90550bb417b214002d94181b to your computer and use it in GitHub Desktop.
Save pramatias/bc34addc90550bb417b214002d94181b to your computer and use it in GitHub Desktop.
#lang racket
(require 2htdp/image)
(define image (empty-scene 400 400 (color 200 40 98 127)))
(define wedges (beside (wedge 60 60 "solid" "purple")
(wedge (random 0 100) (random 0 100) "solid" "brown")
(wedge (random 0 100) (random 0 100) "solid" "red")
(wedge (random 0 100) (random 0 100) "solid" "brown")
(wedge (random 0 100) (random 0 100) "solid" "red")))
(define (stars x)
(if (> x 30) (star 20 127 "blue")
(beside (overlay
(rectangle (* x 3) 60 "solid" "orange")
(ellipse (* x 5) 50 "solid" "purple"))
(stars (+ x 5))))
)
(place-image/align (stars 2) 0 200 "left" "bottom"
(place-image/align wedges 200 300 "center" "bottom"
(place-image/align (bitmap/file "/home/emporas/sanddust.png") 0 0 "left" "top"
image)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment