to aaa
;MSWLogo
;Program crta smajlije dok ga ne prekinemo.
;Pokrenuti sa
;-------
;smajli
;-------
end
to daj.duljinu
op item sum 1 random 4 [20 30 40 50]
end
to daj.kut
op item sum 1 random 6 [1 2 3 4 5 6]
end
to daj.okret
op item sum 1 random 2 [-1 1]
end
to kosa
localmake "tocka pos
repeat 165 [rt 1 pu setpos :tocka ~
			fd difference 150 quotient repcount 5 ~
			pd fd 40 fd random 100]
end
to kriva :duljina :okret :kut 
if :duljina<1 [stop]
fd 2 rt product :okret :kut
kriva difference :duljina 1 :okret :kut
end
to krivulja
kriva daj.duljinu daj.okret daj.kut
end
to smajli
cs smajli.faca
ifelse yesnobox [Smiley] [jesam li lijep?] [smajli] [stop]
end
to smajli.faca
rt 90 arc 180 150 pu fd 150 pd
kriva daj.duljinu 1 daj.kut
setxy 150 -100 seth 199 arc2 180 158
setfloodcolor [0 0 0]
pu setxy 50 0 pd circle sum 5 random 15 fill
pu setxy -50 0 pd circle sum 5 random 15 fill
setpensize [10 10]
pu setxy 50 50 pd seth 60 krivulja
pu setxy -50 50 pd seth 300 krivulja
setpc (list sum 100 random 155 0 0)
pu setxy -50 -100 seth 90 pd krivulja krivulja
setpc [0 0 0] setpensize [1 1]
pu setxy 0 -10 seth 280 pd setpensize [2 2] kosa
pu home pd setpensize [1 1]
setfloodcolor (list sum 100 random 155 sum 100 random 155 0)
fill
end