diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-05-08 08:33:22 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-05-08 08:33:22 -0700 |
commit | 183010779ca426e0d0bd24e2ca850d4687094169 (patch) | |
tree | bb8bedce52d6a8f06aa9048cc7a47b66b805407b /shell | |
parent | 665b1e8f075c3cad159831f52e7b2b79b0157527 (diff) | |
download | mu-183010779ca426e0d0bd24e2ca850d4687094169.tar.gz |
A 'bowboard', a chessboard of rainbow circles
Compare with (chessboard screen 256)
Diffstat (limited to 'shell')
-rw-r--r-- | shell/data.limg | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/shell/data.limg b/shell/data.limg index 54ea3f54..281afa3a 100644 --- a/shell/data.limg +++ b/shell/data.limg @@ -96,30 +96,38 @@ (while (< r rmax) (brcircle screen cx cy r clr) (set r (+ r 1))))))]) - (circle_rainbow . [(def circle_rainbow (fn(screen c w) - (let cx (/ (width screen) 2) - (let cy (/ (height screen) 2) - (ring screen cx cy c w 37) - (set c (+ c w)) - (ring screen cx cy c w 33) - (set c (+ c w)) - (ring screen cx cy c w 55) - (set c (+ c w)) - (ring screen cx cy c w 52) - (set c (+ c w)) - (ring screen cx cy c w 47) - (set c (+ c w)) - (ring screen cx cy c w 45) - (set c (+ c w)) - (ring screen cx cy c w 44) - (set c (+ c w)) - (ring screen cx cy c w 42) - (set c (+ c w)) - (ring screen cx cy c w 41) - (set c (+ c w)) - (ring screen cx cy c w 40)))))]) + (circle_rainbow . [(def circle_rainbow (fn(screen cx cy r w) + (ring screen cx cy r w 37) + (set r (+ r w)) + (ring screen cx cy r w 33) + (set r (+ r w)) + (ring screen cx cy r w 55) + (set r (+ r w)) + (ring screen cx cy r w 52) + (set r (+ r w)) + (ring screen cx cy r w 47) + (set r (+ r w)) + (ring screen cx cy r w 45) + (set r (+ r w)) + (ring screen cx cy r w 44) + (set r (+ r w)) + (ring screen cx cy r w 42) + (set r (+ r w)) + (ring screen cx cy r w 41) + (set r (+ r w)) + (ring screen cx cy r w 40)))]) + (bowboard . [(def bowboard (fn (screen side) + (let xmax (width screen) + (let ymax (height screen) + (let y side + (while (< y ymax) + (let x side + (while (< x xmax) + (circle_rainbow screen x y (- side 100) 10) + (set x (+ x (* 2 side))))) + (set y (+ y (* 2 side)))))))))]) (main . [(def main (fn (screen keyboard) - (circle_rainbow screen 80 10)))]) + (bowboard screen 128)))]) )) (sandbox . (circle_rainbow screen 8 1)) ) |