The following program shows how to make a clown face, keep it, and show it again and again at random positions on the screen. Copy and run to see the effect!

 

LIBRARY "graphlib"

SET MODE "graphics"

LET ratio=1.4

SET WINDOW -(50*ratio),(50*ratio),-50,50

DRAW circle(10,0,0)

RANDOMIZE

SET COLOR "yellow"

FLOOD 0,0

SET COLOR "blue"

DRAW circle (2,-4,4)

DRAW circle (2,4,4)

DRAW circle (3,0,-2)

CALL arc(0,0,7,220,320)

SET COLOR "red"

FLOOD -1,-1

SET COLOR "blue"

FLOOD -3,3

FLOOD 3,3

SET COLOR "magenta"

LET greeting$="Hi!"

PLOT TEXT, AT -2,-15:greeting$

PAUSE 3

BOX KEEP -12,12,-12,12 in clown$

DO while i < 5

BOX SHOW clown$ at rnd*100*log(2*rnd),rnd*100*log(2*rnd)

SOUND rnd*2000,rnd

LET i=i+1

PAUSE .5

LOOP

END

PICTURE circle(r,x,y)

BOX CIRCLE x-r,x+r,y-r,y+r

END PICTURE