ArePerpendicular - Maple Help

geom3d

 ArePerpendicular
 test if two objects are perpendicular to each other

 Calling Sequence ArePerpendicular(dseg1, dseg2, cond) ArePerpendicular(l1, l2, cond) ArePerpendicular(l1, p1, cond) ArePerpendicular(p1, p2, cond) ArePerpendicular(s1, s2, cond)

Parameters

 dseg1, dseg2 - directed line segments l1, l2 - lines p1, p2 - planes s1, s2 - spheres cond - (optional) name

Description

 • The routine returns true if the given objects are perpendicular to each other; false if they are not; and FAIL if it is unable to reach a conclusion.
 • In case of FAIL, if the third optional argument is given, the condition that makes the given objects perpendicular to each other is assigned to this argument.
 • The command with(geom3d,ArePerpendicular) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{geom3d}\right):$

Show that the following spheres are mutually orthogonal:

 > $\mathrm{assume}\left(a,\mathrm{real},a\ne 0\right):$
 > $\mathrm{sphere}\left(\mathrm{s1},{x}^{2}+{y}^{2}+{z}^{2}={a}^{2},\left[x,y,z\right]\right):$
 > $\mathrm{sphere}\left(\mathrm{s2},{x}^{2}+{y}^{2}+{z}^{2}-2ay-2az+{a}^{2}=0,\left[x,y,z\right]\right):$
 > $\mathrm{sphere}\left(\mathrm{s3},{x}^{2}+{y}^{2}+{z}^{2}-2ax-2az+{a}^{2}=0,\left[x,y,z\right]\right):$
 > $\mathrm{sphere}\left(\mathrm{s4},{x}^{2}+{y}^{2}+{z}^{2}-2ax-2ay+{a}^{2}=0,\left[x,y,z\right]\right):$
 > $\mathbf{for}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}i\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{to}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}3\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{for}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}j\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{from}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}i+1\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{to}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}4\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{if}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathrm{ArePerpendicular}\left(s‖i,s‖j\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{then}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathrm{print}\left(i,j,\mathrm{true}\right)\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{else}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathrm{print}\left(i,j,\mathrm{false}\right)\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{if}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\phantom{\rule[-0.0ex]{2.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}\phantom{\rule[-0.0ex]{0.0em}{0.0ex}}\mathbf{end}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{do}$
 ${1}{,}{2}{,}{\mathrm{true}}$
 ${1}{,}{3}{,}{\mathrm{true}}$
 ${1}{,}{4}{,}{\mathrm{true}}$
 ${2}{,}{3}{,}{\mathrm{true}}$
 ${2}{,}{4}{,}{\mathrm{true}}$
 ${3}{,}{4}{,}{\mathrm{true}}$ (1)