Constrained random points on a circle: Difference between revisions
Content added Content deleted
m (→version 1: modified the program for easier reading. -- ~~~~) |
m (→version 2: reinstated a missing '''/''' (slash). -- ~~~~) |
||
Line 1,766: | Line 1,766: | ||
do j=1 for points /*"draw" the x,y points [char O].*/ |
do j=1 for points /*"draw" the x,y points [char O].*/ |
||
parse value word($,random(1,ap)) with x ',' y /*pick random point.*/ |
parse value word($,random(1,ap)) with x ',' y /*pick random point.*/ |
||
field.y=overlay(plotChar, field.y, x+high+1) |
field.y=overlay(plotChar, field.y, x+high+1) /*"draw: the point. */ |
||
minY=min(minY,y); maxY=max(maxY,y) /*plot restricting. */ |
minY=min(minY,y); maxY=max(maxY,y) /*plot restricting. */ |
||
end /*j*/ |
end /*j*/ |