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

Online Help

All Products    Maple    MapleSim


geom3d

  

segment

  

define a segment

  

dsegment

  

define a directed segment

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

segment(seg, [P1, P2])

segment(seg, P1, P2)

dsegment(seg, [P1, P2])

dsegment(seg, P1, P2)

Parameters

seg

-

the name of the segment (or directed segment)

P1, P2

-

two points

Description

• 

A convex combination of two distinct points P1x1&comma;y1&comma;z1 and P2x2&comma;y2&comma;z2 is any point P3x3&comma;y3&comma;z3 such that for some a in the range 0<=a<=1, we have x3=ax1+1ax2 and y3=ay1+1ay2 and z3=ax1+1az2.

• 

Given two distinct points P1 and P2, the line segment P1P2 is the set of convex combinations of P1 and P2. We call P1 and P2 the endpoints of segment P1P2.

• 

Sometimes the ordering of P1 and P2 matters, and we speak of directed segment P1P2.

• 

A line segment seg is defined by the two endpoints P1 and P2. Its two endpoints are P1 and P2.

• 

A directed segment seg is defined by the two endpoints P1 and P2. The tail is P1 and the head P2.

• 

To access the information relating to a segment (or directed segment) seg, use the following function calls:

form(seg)

returns the form of the geometric object

 

(i.e., segment3d if seg is a line segment, and dsegment3d if

 

seg is a directed segment.

DefinedAs(seg)

returns a list of two endpoints of seg if

 

seg is a segment, and a list of the tail and head of seg

 

if seg is a directed segment.

• 

The command with(geom3d,segment) allows the use of the abbreviated form of this command.

Examples

withgeom3d&colon;

define two points A(0,0,0) and B(1,1,1)

pointA&comma;0&comma;0&comma;0,pointB&comma;1&comma;1&comma;1&colon;

define the segment AB

segmentAB&comma;A&comma;B

AB

(1)

formAB

segment3d

(2)

DefinedAsAB

A&comma;B

(3)

mapcoordinates&comma;

0&comma;0&comma;0&comma;1&comma;1&comma;1

(4)

See Also

geom3d[midpoint]