# some 2D shape demo load-opengl 300 dup display 2d animation # 32 element zero vector as default state ((0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)) >matrix dup variable! state variable! state-reset : drawblob matrix:polar # convert center distances to 2D points 1 pack "v" polygon ; # draw as poly :: .3 scale state @ # get prev state dup matrix:uniform .07 * # add some noise and save + dup state ! drawblob ; is drawer :: split nip ` keypress = if state-reset @ state ! then ; is responder interactive