geom3d
ArePerpendicular
test if two objects are perpendicular to each other
Calling Sequence
Parameters
Description
Examples
ArePerpendicular(dseg1, dseg2, cond)
ArePerpendicular(l1, l2, cond)
ArePerpendicular(l1, p1, cond)
ArePerpendicular(p1, p2, cond)
ArePerpendicular(s1, s2, cond)
dseg1, dseg2
-
directed line segments
l1, l2
lines
p1, p2
planes
s1, s2
spheres
cond
(optional) name
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.
with⁡geom3d:
Show that the following spheres are mutually orthogonal:
assume⁡a,real,a≠0:
sphere⁡s1,x2+y2+z2=a2,x,y,z:
sphere⁡s2,x2+y2+z2−2⁢a⁢y−2⁢a⁢z+a2=0,x,y,z:
sphere⁡s3,x2+y2+z2−2⁢a⁢x−2⁢a⁢z+a2=0,x,y,z:
sphere⁡s4,x2+y2+z2−2⁢a⁢x−2⁢a⁢y+a2=0,x,y,z:
forito3doforjfromi+1to4doifArePerpendicular⁡s‖i,s‖jthenprint⁡i,j,trueelseprint⁡i,j,falseendifenddoenddo
1,2,true
1,3,true
1,4,true
2,3,true
2,4,true
3,4,true
See Also
geom3d[AreParallel]
geom3d[line]
geom3d[plane]
geom3d[sphere]
Download Help Document