NB[ Spirograph program, done for comparison between StackTalk, Carousel/Lua and Lisp Carousel version by akkartik StackTalk version by yumaikas ] me. >Lobby #game: Canvas .query-ctx-2d do[ %w[ blue grey red ] each[ dup curry[ color= ] fn ] ] >ctx RAF: fn[ Lobby frame. Window .requestAnimationFrame ] once: fn[ ts. >oldTs once: drop once: fn[ ] ] frame: fn[ once ts. oldTs> - >dt ts> >oldTs draw dt: drop RAF ] RAF make-spiro: fn[ obj[ >color >r >r2 >rotSpeed 200 >x 200 >y 0 >T Canvas .new-path-2d >spiro move-rT: fn[ >d >r >y >x y> d. sin r. * + x> d> cos r> * + ] update: fn[ 1000 div T> + >T ] draw: fn[ >ctx x y r ctx .pen[ grey circle ] x y r T move-rT >x2 >y2 x2 y2 5 ctx .brush[ red circle ] x2 y2 r2 ctx .pen[ grey circle ] x2 y2 r2 T rotSpeed * move-rT >x3 >y3 x3 y3 x2> y2> ctx .pen[ grey moveTo lineTo ] x3 y3 5 ctx .brush[ blue circle ] color ctx .color= spiro ask[ your[ x3> y3> ] line-to your[ ctx> ] to-canvas ] ] ] ] [ 5 50 100 red: make-spiro 5.2 35 125 green: make-spiro 10.4 10 40 yellow: make-spiro 20 10 110 gold: make-spiro 5 50 105 red: make-spiro 5.2 35 130 green: make-spiro 10.4 10 35 yellow: make-spiro 20 10 140 gold: make-spiro 5.2 55 105 red: make-spiro 5.2 40 130 green: make-spiro 10.3 15 35 yellow: make-spiro 30 13 140 gold: make-spiro ] Array .of >gears draw: fn[ #111: ctx .clear gears each[ ask[ your[ dt. ] update your[ ctx. ] draw ] ] ]