
!if $menutype=solution and $randp=$empty
 !distribute item $parm1,$parm2 into xx,yy
!else
 !distribute item $randp into xx,yy
 randp=
!endif
!if $xx=$empty or $yy=$empty
 error=no_random
 !exit
!endif

rr=!random 0,$randomclose
rt=!random 0,2*pi
rx=$[$xx+$rr*cos($rt)]
ry=$[$yy+$rr*sin($rt)]

!if $step<$stepcnt
 !read proc/triminci
!endif
points=!line 1 to $pointcnt of $points
hidepoint=!char 1 to $pointcnt of $hidepoint
incipoint=$incipoint\
 
steplist=!line 1 to $step of $steplist
points=!append line $rx,$ry,$point_color to $points
hidepoint=$hidepoint+
!advance pointcnt
steplist=!append line random,$pointcnt,$xx,$yy to $steplist
!advance step

