Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,25 @@
link graphics
procedure main(A) # points, inside r, outside r in pixels - default to task values
if \A[1] == "help" then stop("Usage: plot #points inside-radius outside-radius")
points := \A[1] | 100
outside := \A[2] | 15
inside := \A[3] | 10
if inside > outside then inside :=: outside
wsize := integer(2.2*outside)
wsize <:= 150
center := wsize/2
WOpen("size="||wsize||","||wsize,"bg=black","fg=white") | stop("Unable to open window")
until(points -:= 1) <= 0 do {
x := ?(2*outside)-outside # random x
y := ?(2*outside)-outside # and y
if (inside <= integer(sqrt(x^2+y^2)) ) <= outside then
DrawPoint(x + center,y + center)
}
WDone()
end