sphere - Maple Help

geom3d

 sphere
 define a sphere

 Calling Sequence sphere(s, [A, B, C, D], n, 'centername'=m) sphere(s, [A, B], n, 'centername'=m) sphere(s, [A, rad], n, 'centername'=m) sphere(s, [A, p], n, 'centername'=m) sphere(s, eqn, n, 'centername'=m)

Parameters

 s - the name of the sphere A, B, C, D - points p - plane rad - number which is the radius of the sphere eqn - the algebraic representation of the sphere (i.e., a polynomial or an equation) n - (optional) list of three names representing the names of the axes 'centername'=m - (optional) m is a name of the center of the sphere to be created

Description

 • A sphere is the set of all points in space that have the same distance from the center.
 • A sphere s can be defined as follows:
 – from four points A, B, C, and D.
 – from the two points which make a diameter of the sphere s.
 – from the center of s and its radius. The input is a list of two elements where the first element is a point, the second element is a number.
 – from a point A and a plane p. The sphere defined is the one with center A and is tangent to the plane p.
 – from its algebraic representation eqn. The input is an equation or a polynomial. In case the optional argument n is not given, if the environment variables _EnvXName, _EnvYName and _EnvZName are assigned to three names, these three names will be used as the names of the axes. If not, Maple will prompt for input of the names of the axes.
 • To access the information relating to a sphere s, use the following function calls:

 form(s) returns the form of the geometric object (i.e., sphere3d if s is a sphere). center(s) returns the name of the center of s. radius(s) returns the radius of s. area(s) returns the surface area of s. volume(s) returns the volume of s. Equation(s) returns the equation that represents the sphere. xname(s), yname(s), or zname(s) returns the name of the axis; or FAIL if the axis is not assigned to any name. detail(s) returns a detailed description of the given sphere s.

 • The command with(geom3d,sphere) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{geom3d}\right):$
 > $\mathrm{_EnvXName}≔x:$$\mathrm{_EnvYName}≔y:$$\mathrm{_EnvZName}≔z:$

Find the equation of the sphere through the origin o and three points $A,B,C$ whose coordinates are $\left[a,0,0\right],\left[0,b,0\right],\left[0,0,c\right]$.

Make sure that $A,B,C$ are not the same as the origin

 > $\mathrm{assume}\left(a,\mathrm{real},a\ne 0,b,\mathrm{real},b\ne 0,c,\mathrm{real},c\ne 0\right):$
 > $\mathrm{point}\left(o,0,0,0\right),\mathrm{point}\left(A,a,0,0\right),\mathrm{point}\left(B,0,b,0\right),\mathrm{point}\left(C,0,0,c\right):$
 > $\mathrm{sphere}\left(s,\left[o,A,B,C\right]\right)$
 ${s}$ (1)
 > $\mathrm{Equation}\left(s\right)$
 ${-}{x}{}{\mathrm{a~}}{-}{y}{}{\mathrm{b~}}{-}{z}{}{\mathrm{c~}}{+}{{x}}^{{2}}{+}{{y}}^{{2}}{+}{{z}}^{{2}}{=}{0}$ (2)
 > $a≔'a':$$b≔'b':$$c≔'c':$

$C$ is a fixed point on $\mathrm{OZ}$ and $U,V$ are variable points on $\mathrm{OX},\mathrm{OY}$ respectively. Find the locus of a point $P$ when the lines $\mathrm{PU},\mathrm{PV},\mathrm{PC}$ are mutually at right angles.

Make necessary assumptions:

 > $\mathrm{assume}\left(\mathrm{t1},\mathrm{real},\mathrm{t2},\mathrm{real},\mathrm{t3},\mathrm{real},\mathrm{t1}\ne 0,\mathrm{t2}\ne 0,\mathrm{t3}\ne 0,x\ne 0,y\ne 0,z\ne 0\right):$

Define points $C,U,V$

 > $\mathrm{point}\left(C,\left[0,0,\mathrm{t1}\right]\right),\mathrm{point}\left(U,\left[\mathrm{t2},0,0\right]\right),\mathrm{point}\left(V,\left[0,\mathrm{t3},0\right]\right):$

Let $P=\left[x,y,z\right]$

 > $\mathrm{point}\left(P,\left[x,y,z\right]\right):$

Define lines $\mathrm{PU},\mathrm{PV}$, and $\mathrm{PC}$

 > $\mathrm{line}\left(\mathrm{PU},\left[P,U\right]\right),\mathrm{line}\left(\mathrm{PV},\left[P,V\right]\right),\mathrm{line}\left(\mathrm{PC},\left[P,C\right]\right):$

It is obvious that there is not enough information to determine if $\mathrm{PU},\mathrm{PV}$, and $\mathrm{PC}$ are mutually at right angles. Check for the conditions that make them mutually at right angles:

 > $\mathrm{ArePerpendicular}\left(\mathrm{PU},\mathrm{PV},'\mathrm{cond1}'\right);$$\mathrm{ArePerpendicular}\left(\mathrm{PU},\mathrm{PC},'\mathrm{cond2}'\right)$
 ${\mathrm{FAIL}}$
 ${\mathrm{FAIL}}$ (3)
 > $\mathrm{ArePerpendicular}\left(\mathrm{PV},\mathrm{PC},'\mathrm{cond3}'\right)$
 ${\mathrm{FAIL}}$ (4)

Take a look at the conditions:

 > $\mathrm{cond1},\mathrm{cond2},\mathrm{cond3}$
 ${-}{\mathrm{x~}}{}\left({-}{\mathrm{x~}}{+}{\mathrm{t2~}}\right){-}\left({\mathrm{t3~}}{-}{\mathrm{y~}}\right){}{\mathrm{y~}}{+}{{\mathrm{z~}}}^{{2}}{=}{0}{,}{-}{\mathrm{x~}}{}\left({-}{\mathrm{x~}}{+}{\mathrm{t2~}}\right){+}{{\mathrm{y~}}}^{{2}}{-}\left({\mathrm{t1~}}{-}{\mathrm{z~}}\right){}{\mathrm{z~}}{=}{0}{,}{{\mathrm{x~}}}^{{2}}{-}\left({\mathrm{t3~}}{-}{\mathrm{y~}}\right){}{\mathrm{y~}}{-}\left({\mathrm{t1~}}{-}{\mathrm{z~}}\right){}{\mathrm{z~}}{=}{0}$ (5)
 > $\mathrm{expand}\left(\mathrm{cond2}\right)-\mathrm{expand}\left(\mathrm{cond1}\right)$
 ${-}{\mathrm{z~}}{}{\mathrm{t1~}}{+}{\mathrm{y~}}{}{\mathrm{t3~}}{=}{0}$ (6)

the above shows that $y\mathrm{t3}=z\mathrm{t1}$. Substitute this identity into $\mathrm{cond3}$

 > $\mathrm{subs}\left(y\mathrm{t3}=z\mathrm{t1},\mathrm{lhs}\left(\mathrm{expand}\left(\mathrm{cond3}\right)\right)\right)$
 ${-}{2}{}{\mathrm{z~}}{}{\mathrm{t1~}}{+}{{\mathrm{x~}}}^{{2}}{+}{{\mathrm{y~}}}^{{2}}{+}{{\mathrm{z~}}}^{{2}}$ (7)

define a sphere s from the above condition:

 > $\mathrm{sphere}\left(s,,\left[x,y,z\right]\right)$
 ${s}$ (8)

check:

 > $\mathrm{coordinates}\left(\mathrm{center}\left(s\right)\right)=\mathrm{coordinates}\left(C\right)$
 $\left[{0}{,}{0}{,}{\mathrm{t1~}}\right]{=}\left[{0}{,}{0}{,}{\mathrm{t1~}}\right]$ (9)
 > $\mathrm{radius}\left(s\right)=\mathrm{distance}\left(\mathrm{center}\left(s\right),\mathrm{point}\left(o,0,0,0\right)\right)$
 $\sqrt{{{\mathrm{t1~}}}^{{2}}}{=}\sqrt{{{\mathrm{t1~}}}^{{2}}}$ (10)