Hourglass #genuary #genuary24
#genuary2025 #creativecoding

Geometric Art

TO hourglass
   reset : penup : hideturtle
   setpenwidth 5 : setpenstyle "mark
   make "cols [13 11]
   
   forever [
      cam:clearscreen
      randombackgroundcolor
      setbackgroundshade 10
      
      repeat 1000 [
         norender : clearscreen
         
         forward 100 : right 180
         iso 50, 100
         forward 200 : right 180
         iso 50, 100
         setfillcolor first :cols
         fiso 50 loopcount / 10 : back 5
         
         forward 10 - remainder repcount / 3 10
         repeat 9 [forward 10 : fiso 2.5, 5]
         sety 100 : right 180
         forward loopcount / 10
         
         setfillcolor second :cols
         (fiso
            50 - loopcount / 20,
            100 - loopcount / 10
         )
         
         render
      ]
      
      repeat 36 [
         cam:rr iff oddp loopabove 1 5 -5
         nextframe
      ]
      
      norender
      
      dountil not equalp first :cols second :cols [
         make "cols list random [15] first :cols
      ]
   ]
END