RosettaCodeData/Task/Constrained-random-points-on-a-circle/Maple/constrained-random-points-on-a-circle.maple
2015-02-20 00:35:01 -05:00

12 lines
243 B
Text

a := table():
i := 1:
while i < 100 do
ba := (rand(-15 .. 15))():
bb := (rand(-15 .. 15))():
b := evalf(sqrt(ba^2+bb^2)):
if b <= 15 and b >= 10
then a[i] := [ba, bb]:
i := i+1:
end if:
end do:
plots:-pointplot(convert(a,list));