Line - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Student[MultivariateCalculus]

  

Line

  

Create and initialize a line object

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Line(eqn, opts)

Line(expr, opts)

Line(eqn1, eqn2, opts)

Line(expr1, expr2, opts)

Line(vt, opts)

Line(eqnlst, opts)

Line(exprlst, opts)

Line(p1, v, opts)

Line(v, pt, opts)

Line(p1, p2, opts)

Line(p1, P1, opts)

Line(P1, p1, opts)

Line(P1, P2, opts)

Line(ln, opts)

Parameters

eqn

-

Linear equation of a line in 2D

expr

-

Linear expression, equated to 0 to get a line in 2D

eqn1, eqn2

-

Equations of two intersecting planes

expr1, expr2

-

Expressions which, when equated to 0, define two intersecting planes

vt

-

Vector defining a generic point on the line parametrically

eqnlst

-

List of parametric equations, defining a generic point on the line

exprlst

-

List of parametric expressions, defining a generic point on the line

p1, p2

-

Points on the line, specified as lists of coordinates

v

-

Direction Vector of the line

P1, P2

-

Plane defined by Student[MultivariateCalculus]

ln

-

Existing Line object

opts

-

(optional) equations controlling the representation or the plot of the line

Options

• 

The opts arguments can contain one or more of the following options.

• 

parameter = name

  

The variable name used in the parametric form. This is used in interpreting the parametric forms of the call to the Line function, when obtaining the parametric form of the line using the GetRepresentation command, and with eval as explained above. The default is t.

• 

variables = list

  

The variables to be used in the line's equation.  This is used in interpreting the equation and expression forms of the call to the Line function, and when obtaining equations for the line. The default is x,y,z.

• 

id = positive integer, name, or string

  

Lines display as << Line n >>, where n is an identification for the line that is by default a positive integer assigned in order of creation. The id option can be used to force the line to be given a different identification. It is an error to use the same identification for two different lines that are both in use.

Description

• 

The Line command creates a line object that can be operated on or graphed. The line can be in two- or three-dimensional space.

• 

Lines can be specified in the following ways:

– 

A linear equation eqn, such as ax+by+c=0, defining a line in two-dimensional space.

– 

An expression expr of the form ax+by+c, which is set equal to 0 to obtain a line in two-dimensional space.

– 

Two linear equations, eqn1 and eqn2, such as ax+by+cz+d=0, which together define a line in three-dimensional space.

– 

Two linear expressions, expr1 and expr2, such as ax+by+cz+d, which are set equal to 0 to obtain a line in three-dimensional space.

– 

A Vector vt specifying the line in parametric form, such as 2&comma;3+t·4&comma;5 or 2+4t&comma;3+5t&comma;12t.

– 

A list eqnlst of parametric equations, such as x=2&comma;y=3t&comma;z=2t.

– 

A list exprlst of parametric equations, such as 2&comma;3t&comma;2t.

– 

A point p1, such as 1&comma;2&comma;3, and a nonzero Vector v, such as 2&comma;−1&comma;0, giving a point on the line and the direction of the line, respectively. The point and direction can also be specified in the other order.

– 

Two different points p1 and p2 on the line, such as 1&comma;2 and 3&comma;1.

– 

A point p1, such as 1&comma;2&comma;3, and a Plane object P1 defined earlier, such as Plane2&comma;4&comma;5&comma;2&comma;−1&comma;0. The line this defines is the one that contains p1 and is normal to P1. The point and plane can also be specified in the other order.

– 

Two intersecting Plane objects P1 and P2 defined earlier, such as Plane2&comma;4&comma;5&comma;2&comma;−1&comma;0 and Plane2&comma;−1&comma;0&comma;2&comma;4&comma;5. The line this defines is the intersection between P1 and P2.

– 

A line ln defined earlier, such as Line1&comma;2&comma;3&comma;1. (This can be useful to change the names of the coordinate variables and the parameter, using the options explained below.)

• 

It is possible to specify two mathematically identical lines using different Line commands.

• 

The coefficients and coordinates defining a Line can contain parameters. For example, we can define a line containing the points 2&comma;3&comma;a and 1&comma;a+b&comma;3 with the command Line2&comma;3&comma;a&comma;1&comma;a+b&comma;3.

  

These parameters must be different from the coordinate variables (set by the variables option explained below; by default x&comma;y or x&comma;y&comma;z), and different from the parameter used for the parametric form of the line (set by the parameter option explained below; by default t).

• 

The following is a list of commands available to Line objects:

AreOrthogonal

AreParallel

AreSkew

Contains

Distance

Equal

GetDimension

GetDirection

GetIntersection

GetPlot

GetPoint

GetRepresentation

Intersects

Projection

 

 

• 

In addition, there is some special behavior for the eval command when applied to a Line. If the line contains parameters, as in the example Line2&comma;3&comma;a&comma;1&comma;a+b&comma;3 above, then one can use eval to substitute values for those parameters. For example, we might evaluate the line given above at a=2 to obtain the line through the points 2&comma;3&comma;2 and 1&comma;b+2&comma;3.

  

Another possibility is to evaluate at a value for the parameter used for the parametric form of the line (set by the parameter option explained below; the default is t). This will return the point one obtains for the given value of the parameter. For example, a line defined as Line1&comma;0&comma;−1+t·3&comma;−1&comma;2 can be evaluated at t=2 to obtain the point 7&comma;−2&comma;3.

  

Finally, one can rename the coordinate variables using eval: if one evaluates the line above at x=u&comma;z=v, then one obtains an identical line in the space with coordinates u, y, and v.

Examples

withStudentMultivariateCalculus&colon;

Lines in 2D

l1Line4x3y=10&colon;GetRepresentationl1

t·34+8565

(1)

l2Line4x3y8&colon;GetRepresentationl2

t·34+32252425

(2)

l3Line2&comma;3+t·4&comma;5&comma;id=l3&colon;GetRepresentationl3

t·45+23

(3)

Note how lines l1 and l2 are displayed using their automatically assigned identification, but l3 has the explicitly specified identification l3:

l1,l2,l3

<< Line 1 >>,<< Line 2 >>,<< Line l3 >>

(4)

l4Line1&comma;2&comma;4&comma;5&colon;GetRepresentationl4

t·45+12

(5)

l5Line3&comma;0&comma;1&comma;5&colon;GetRepresentationl5

t·−45+30

(6)

Lines in 3D

l6Line4x3y+2z=10&comma;2x+y=5&colon;GetRepresentationl6

t·−2410+347254

(7)

l7Line4x3y+2z8&comma;2x+y+3&colon;GetRepresentationl7

t·−2410+176073301112

(8)

l8Line4&comma;5&comma;2&comma;2&comma;3&comma;1&comma;parameter=k&colon;GetRepresentationl8

k·45−2+231

(9)

l9Lineu=a+1&comma;v=22a&comma;w=a3&colon;GetRepresentationl9

a·1−23+120

(10)

l10Linea+b&comma;22ab&comma;a3&comma;parameter=a&comma;variables=u&comma;v&comma;w&colon;GetRepresentationl10

a·1−23+b2b0

(11)

l11Line1&comma;2&comma;3&comma;Plane2&comma;4&comma;5&comma;2&comma;1&comma;0&colon;GetRepresentationl11

t·2−10+123

(12)

l12LinePlane2&comma;4&comma;5&comma;2&comma;1&comma;0&comma;Plane2&comma;1&comma;0&comma;2&comma;4&comma;5&comma;variables=u&comma;v&comma;w&colon;GetRepresentationl12

t·−5−1010+000

(13)

l13Linel9&comma;variables=x&comma;y&comma;z&comma;parameter=k&colon;GetRepresentationl13&colon;

Some previously defined lines in other standard forms.

GetRepresentationl4&comma;form=parametric

x=1+4t&comma;y=2+5t

(14)

GetRepresentationl5&comma;form=vectors

t·−45+30

(15)

GetRepresentationl5&comma;form=combined_vector

34t5t

(16)

eval can be used for substituting the unknowns and the free variable of the vector form.

evall9&comma;a=0&semi;evall13&comma;k=0

1&comma;2&comma;0

1&comma;2&comma;0

(17)

evall10&comma;a=3

b+3&comma;4b&comma;9

(18)

l14evall10&comma;b=3&semi;GetRepresentationl10

l14<< Line 13 >>

a·1−23+b2b0

(19)

evall10&comma;a=3&comma;b=3

6&comma;−7&comma;9

(20)

Query the properties of individual lines.

GetDirectionl1

34

(21)

GetDirectionl3

45

(22)

GetDirectionl10

1−23

(23)

GetPointl4

1&comma;2

(24)

GetPointl8

2&comma;3&comma;1

(25)

Determine the relationship between two lines.

GetIntersectionl1&comma;l3

46&comma;58

(26)

These two lines have no intersection.

GetIntersectionl1&comma;l2

(27)

AreParallell6&comma;l7

true

(28)

AreParallell6&comma;l8

false

(29)

AreSkewl6&comma;l8

true

(30)

Distancel6&comma;l8

8113342668

(31)

evalf

1.108860998

(32)

Compatibility

• 

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

• 

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

See Also

Student

Student[MultivariateCalculus]

Student[MultivariateCalculus][Plane]