 randpoint - Maple Help

geometry

 randpoint
 generate a random point on a line or a circle Calling Sequence randpoint(w, u, v) Parameters

 w - the name of a random point u - line, circle, or range v - range Description

 • The output is a point with coordinates in the given range or lying on the  given line or circle.
 • The command with(geometry,randpoint) allows the use of the abbreviated form of this command. Examples

 > $\mathrm{with}\left(\mathrm{geometry}\right):$
 > $\mathrm{line}\left(l,x-y=1,\left[x,y\right]\right),\mathrm{circle}\left(c,{x}^{2}+{y}^{2}=1,\left[x,y\right]\right):$
 > $\mathrm{randpoint}\left(P,-1..2,-1..2\right)$
 ${P}$ (1)
 > $\mathrm{coordinates}\left(P\right)$
 $\left[{0.314058468}{,}{1.880696710}\right]$ (2)
 > $\mathrm{randpoint}\left(Q,l,-2..3\right)$
 ${Q}$ (3)
 > $\mathrm{coordinates}\left(Q\right)$
 $\left[{0.190097447}{,}{-0.809902553}\right]$ (4)
 > $\mathrm{randpoint}\left(R,c\right)$
 ${R}$ (5)
 > $\mathrm{coordinates}\left(R\right)$

 [1. cos(.8760389788 Pi), 1. sin(.8760389788 Pi)]