Student[MultivariateCalculus] - Maple Programming Help

Home : Support : Online Help : Education : Student Packages : Multivariate Calculus : Lines and Planes : Student/MultivariateCalculus/Distance

Student[MultivariateCalculus]

 Distance
 return the distance between lines, planes, or points

 Calling Sequence Distance(pl1, pl2)

Parameters

 pl1, pl2 - Line, Plane, list; Line or Plane object defined in Student[MultivariateCalculus], or a point in 2D or 3D.

Description

 • The Distance command calculates the distance between two lines, planes or points.
 • If the arguments intersect, the Distance command returns zero.
 • The answer is not necessarily simplified. The command evalf can be used to convert the answer to a floating point value.

Examples

 > with(Student[MultivariateCalculus]):
 > l1 := Line([0,2,6], <10,15,20>):
 > l2 := Line([-3,7,3], <2,3,4>):
 > AreParallel(l1,l2);
 ${\mathrm{true}}$ (1)
 > d := Distance(l1,l2);
 ${d}{≔}\frac{\sqrt{{1238}}{}\sqrt{{29}}}{{29}}$ (2)

The floating point value of this expression can be obtained with evalf.

 > evalf(d);
 ${6.533732100}$ (3)
 > Distance(l1, [-5,-6,2]);
 $\frac{\sqrt{{545}}{}\sqrt{{29}}}{{29}}$ (4)

The distance between two intersecting lines is 0.

 > l3 := Line([-3,7,3], [7,1,6]):
 > Intersects(l2, l3);
 ${\mathrm{true}}$ (5)
 > Distance(l2, l3);
 ${0}$ (6)
 > l4 := Line([5,2], <9,-2>):
 > l5 := Line([0,0], <9,-2>):
 > Distance(l4, l5);
 $\frac{{28}{}\sqrt{{85}}}{{85}}$ (7)
 > p1 := Plane([1,0,0],[0,2,0],[0,0,3]):
 > Distance(p1, [2,3,4]);
 $\frac{{23}}{{7}}$ (8)
 > p2 := Plane(10*x+2*y-2*z=5):
 > p3 := Plane(5*x+y-z=1):
 > Distance(p2, p3);
 $\frac{\sqrt{{3}}}{{6}}$ (9)
 > l6 := Line([-2,3,-10], <7,0,0>):
 > p2 := Plane([3,6,1], <0,0,7>):
 > Intersects(p2,l6);
 ${\mathrm{false}}$ (10)
 > Distance(p2,l6);
 ${11}$ (11)

Compatibility

 • The Student[MultivariateCalculus][Distance] command was introduced in Maple 17.