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

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

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

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

The distance between two intersecting lines is 0.

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

Compatibility

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