Distance - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Student[MultivariateCalculus]

  

Distance

  

return the distance between lines, planes, or points

 

Calling Sequence

Parameters

Description

Examples

Compatibility

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⁡StudentMultivariateCalculus:

> 

l1≔Line⁡0,2,6,10,15,20:

> 

l2≔Line⁡−3,7,3,2,3,4:

> 

AreParallel⁡l1,l2

true

(1)
> 

d≔Distance⁡l1,l2

d≔1238⁢2929

(2)

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

> 

evalf⁡d

6.533732100

(3)
> 

Distance⁡l1,−5,−6,2

545⁢2929

(4)

The distance between two intersecting lines is 0.

> 

l3≔Line⁡−3,7,3,7,1,6:

> 

Intersects⁡l2,l3

true

(5)
> 

Distance⁡l2,l3

0

(6)
> 

l4≔Line⁡5,2,9,−2:

> 

l5≔Line⁡0,0,9,−2:

> 

Distance⁡l4,l5

28⁢8585

(7)
> 

p1≔Plane⁡1,0,0,0,2,0,0,0,3:

> 

Distance⁡p1,2,3,4

237

(8)
> 

p2≔Plane⁡10⁢x+2⁢y−2⁢z=5:

> 

p3≔Plane⁡5⁢x+y−z=1:

> 

Distance⁡p2,p3

36

(9)
> 

l6≔Line⁡−2,3,−10,7,0,0:

> 

p2≔Plane⁡3,6,1,0,0,7:

> 

Intersects⁡p2,l6

false

(10)
> 

Distance⁡p2,l6

11

(11)

Compatibility

• 

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

• 

For more information on Maple 17 changes, see Updates in Maple 17.

See Also

Student[MultivariateCalculus]

Student[MultivariateCalculus][Line]

Student[MultivariateCalculus][Plane]

Student[MultivariateCalculus][Equal]

Student[MultivariateCalculus][AreParallel]

Student[MultivariateCalculus][Intersects]