geom3d - Maple Programming Help

Home : Support : Online Help : Mathematics : Geometry : 3-D Euclidean : Point Functions : geom3d/randpoint

geom3d

 randpoint
 generate a random point in a given range, on a line, a plane, or a sphere

 Calling Sequence randpoint(w, x, y, z) randpoint(w, obj, ...)

Parameters

 w - the name of a random point x - range y - range z - range obj - line, plane, or sphere

Description

 • The routine geom3d[randpoint](w, x, y, z) returns a point with the x-coordinate, y-coordinate, and z-coordinate in the interval specified by x, y, and z respectively.
 • When the second argument is a line, a plane, or a sphere, geom3d[randpoint] returns a point on that geometric object.
 • If the object obj is a line, and the third optional argument which is a range is given, w is a point of the line segment such that the parameter in the parametric equation of the line lies in that range.
 • If the object obj is a sphere, and the optional third, fourth arguments which are ranges are given, w is in general the point with the x-coordinate and y-coordinate restricted inside these ranges.

Examples

 > $\mathrm{with}\left(\mathrm{geom3d}\right):$
 > $\mathrm{randpoint}\left(w,-10..10,-10..10,-10..10\right):$
 > $\mathrm{coordinates}\left(w\right)$
 $\left[{-}\frac{{2209065349}}{{250000000}}{,}{-}\frac{{838744609}}{{500000000}}{,}\frac{{244301281}}{{500000000}}\right]$ (1)
 > $\mathrm{randpoint}\left(A,-10..10,-10..10,-10..10\right):$
 > $\mathrm{randpoint}\left(B,-10..10,-10..10,-10..10\right):$
 > $\mathrm{randpoint}\left(C,-10..10,-10..10,-10..10\right):$
 > $\mathrm{plane}\left(p,\left[A,B,C\right]\right):$
 > $\mathrm{randpoint}\left(\mathrm{w4},p\right):$
 > $\mathrm{coordinates}\left(\mathrm{w4}\right)$
 $\left[\frac{{8067798189}}{{10000000000}}{,}\frac{{1713538653}}{{5000000000}}{,}{-}\frac{{203857859972347425739697258423}}{{146514179127009683876000000000}}\right]$ (2)
 > $\mathrm{IsOnObject}\left(\mathrm{w4},p\right)$
 ${\mathrm{true}}$ (3)