Overview - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Overview of the geom3d Package

 Calling Sequence geom3d[command](arguments) command(arguments)

Description

 • The commands in the geom3d package enable you to work in three-dimensional Euclidean geometry. Note that the package does not support the extended space, that is, it does not handle points at infinity and lines at infinity.
 • Each command in the geom3d package can be accessed by using either the long form or the short form of the command name in the command calling sequence.
 • The geometric objects supported in this package are: point, segment, directed segment, line, plane, triangle, sphere, and polyhedra. To create the basic geometric objects, use the following commands.

 • For basic geometric objects, the following commands are supported.
 • Point:

 • Segment/Directed Segment:

 • Line:

 • Plane:

 • Triangle:

 • Sphere:

 • The study of polyhedra has been one of the most enduring, fascinating topics of geometry. The geom3d package supports various types of polyhedra.
 • Regular Polyhedra:

 • Quasi-regular Polyhedra:

 • General Polyhedra:

 • Archimedean Solids:

 • Duality:

 • The two processes to construct new polyhedra from given polyhedra are also supported.

 • Various types of geom3d[transformation] are supported.

 • The geom3d[draw] command provides the graphical visualization of all objects supported in the package.
 • Other commands are also implemented.

 • To display the help page for a particular geom3d command, see Getting Help with a Function in a Package.
 • When an object is defined using its algebraic representation (that is, an equation or a polynomial), you can use any name for the x-axis, the y-axis, and the z-axis. In general, the names of the axes must be included when you define an object. A simple way to set the names without being prompted is to set the environment variables _EnvXName, _EnvYName, and _EnvZName to the axis names (or _EnvTName for the case of line) that you prefer.
 • For commands in the package that create a geometric object, or a list of geometric objects, the calling sequence is of the form command_call(obj,...) where obj is either a name of the geometric object to be created, or a list of geometric objects to be created.
 • Note that you must make explicit assumptions for the symbolic names in an object (such as, real, positive, ...) when you want to apply a test (for example, AreOnObject) to an object. In this case, the power of the geom3d package is dependent on the power of the Maple assume command.
 • For commands where output is a boolean value (true, false, FAIL), the calling sequence is of the form command_call(..., cond), where cond is a an optional name. If the output is FAIL, and this optional argument is given, then the condition that makes the output true is assigned to cond.
 • The value of cond might be a Maple expression (use $\mathrm{assume}\left(\mathrm{cond}\right)$), or of the form cond = &or(expr_1,...,expr_n) or cond = &and(expr_1,...,expr_n) (use assume(op(i,cond)) for the former case where i is from 1 to n; and assume(op(cond)) for the latter case.

Examples

 > $\mathrm{with}\left(\mathrm{geom3d}\right):$
 > $\mathrm{sphere}\left(s,{x}^{2}+{y}^{2}+{z}^{2}=1,\left[x,y,z\right],'\mathrm{centername}'=o\right)$
 ${s}$ (1)
 > $\mathrm{detail}\left(s\right)$
 $\begin{array}{ll}{\text{name of the object}}& {s}\\ {\text{form of the object}}& {\mathrm{sphere3d}}\\ {\text{name of the center}}& {o}\\ {\text{coordinates of the center}}& \left[{0}{,}{0}{,}{0}\right]\\ {\text{radius of the sphere}}& {1}\\ {\text{surface area of the sphere}}& {4}{}{\mathrm{\pi }}\\ {\text{volume of the sphere}}& \frac{{4}{}{\mathrm{\pi }}}{{3}}\\ {\text{equation of the sphere}}& {{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}{-}{1}{=}{0}\end{array}$ (2)

Define the same sphere but without the names of the axes in the input; you will be prompted for them.

 > $\mathrm{sphere}\left(c,{m}^{2}+{n}^{2}+{p}^{2}=1\right)$
 ${c}$ (3)
 > $\mathrm{detail}\left(c\right)$
 $\begin{array}{ll}{\text{name of the object}}& {c}\\ {\text{form of the object}}& {\mathrm{sphere3d}}\\ {\text{name of the center}}& {\mathrm{center_c_1}}\\ {\text{coordinates of the center}}& \left[{0}{,}{0}{,}{0}\right]\\ {\text{radius of the sphere}}& {1}\\ {\text{surface area of the sphere}}& {4}{}{\mathrm{\pi }}\\ {\text{volume of the sphere}}& \frac{{4}{}{\mathrm{\pi }}}{{3}}\\ {\text{equation of the sphere}}& {{m}}^{{2}}{+}{{n}}^{{2}}{+}{{p}}^{{2}}{-}{1}{=}{0}\end{array}$ (4)

Define the same sphere where the names of the axes are assigned using the three environment variables.

 > $\mathrm{_EnvXName}≔'m':$$\mathrm{_EnvYName}≔'n':$$\mathrm{_EnvZName}≔'p':$
 > $\mathrm{sphere}\left(c,\left[\mathrm{point}\left(\mathrm{oo},0,0,0\right),1\right]\right)$
 ${c}$ (5)
 > $\mathrm{Equation}\left(c\right)$
 ${{m}}^{{2}}{+}{{n}}^{{2}}{+}{{p}}^{{2}}{-}{1}{=}{0}$ (6)

In the above examples, c is assigned to a geometric object (sphere), c can also be assigned to a list of objects.

 > $\mathrm{line}\left(\mathrm{l2},\left[\mathrm{point}\left(A,0,0,0\right),\mathrm{point}\left(B,1,0,0\right)\right]\right),\mathrm{sphere}\left(c,{x}^{2}+{y}^{2}+{z}^{2}=1,\left[x,y,z\right]\right):$
 > $\mathrm{intersection}\left(H,\mathrm{l2},c\right)$
 intersection:   "two points of intersection"
 ${H}$ (7)
 > $H$
 $\left[{\mathrm{l2_intersect1_c}}{,}{\mathrm{l2_intersect2_c}}\right]$ (8)
 > $\mathrm{detail}\left(H\right)$
 $\left[\begin{array}{ll}{\text{name of the object}}& {\mathrm{l2_intersect1_c}}\\ {\text{form of the object}}& {\mathrm{point3d}}\\ {\text{coordinates of the point}}& \left[{1}{,}{0}{,}{0}\right]\end{array}{,}\begin{array}{ll}{\text{name of the object}}& {\mathrm{l2_intersect2_c}}\\ {\text{form of the object}}& {\mathrm{point3d}}\\ {\text{coordinates of the point}}& \left[{-1}{,}{0}{,}{0}\right]\end{array}\right]$ (9)

The following is an example with unknown parameters, which returns the message FAIL.

 > $\mathrm{sphere}\left(s,\left[\mathrm{point}\left(o,0,0,0\right),1\right]\right):$
 > $\mathrm{IsOnObject}\left(\mathrm{point}\left(B,1,1,a\right),s,'\mathrm{cond}'\right)$
 IsOnObject:   "hint: unable to determine if a^2+1 is zero"
 ${\mathrm{FAIL}}$ (10)
 > $\mathrm{assume}\left(\mathrm{cond}\right)$
 > $\mathrm{IsOnObject}\left(\mathrm{point}\left(B,1,1,a\right),s\right)$
 ${\mathrm{true}}$ (11)

 See Also