Skip to content

Instantly share code, notes, and snippets.

@pramatias
Created September 29, 2022 18:48
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/ed620510f15d596a53e5771ce58aaa7e to your computer and use it in GitHub Desktop.
Save pramatias/ed620510f15d596a53e5771ce58aaa7e 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" "red")
(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
(star (* 2 x) 127 "magenta")
(stars (+ x 5)))))
(place-image/align (stars 2) 100 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