Created
September 29, 2022 18:48
-
-
Save pramatias/ed620510f15d596a53e5771ce58aaa7e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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