Easylang demo

A tree is a piece of wood with smaller trees attached to it.


proc tree x y a d .
   linewidth d * 0.4
   move x y
   x += cos a * d * 1.4 * (randomf + 0.5)
   y += sin a * d * 1.4 * (randomf + 0.5)
   line x y
   if d > 1
      tree x y a - 20 d - 1
      tree x y a + 20 d - 1
   .
.
tree 50 5 90 10

 


Reaction Tester


subr wait
   color 733
   text "WAIT"
   timer 1.5 + 2 * randomf
.
on timer
   clear
   color 373
   text "PRESS"
   time0 = systime
.
on mouse_down
   clear
   if time0 >= 0.15
      color 555
      text systime - time0
      time0 = 0
   else
      wait
   .
.
textsize 20
move 20 50
wait