geometry
segment
define a segment
dsegment
define a directed segment
Calling Sequence
Parameters
Description
Examples
segment(seg, [P1, P2])
segment(seg, P1, P2)
dsegment(seg, [P1, P2])
dsegment(seg, P1, P2)
seg
-
the name of the segment (or directed segment)
P1, P2
two points
A convex combination of two distinct points P1⁡x1,y1 and P2⁡x2,y2 is any point P3⁡x3,y3 such that for some a in the range 0<=a<=1, we have x3=a⁢x1+1−a⁢x2 and y3=a⁢y1+1−a⁢y2.
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., segment2d if seg is a line segment, and dsegment2d 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(geometry,segment) allows the use of the abbreviated form of this command.
The command with(geometry,dsegment) allows the use of the abbreviated form of this command.
with⁡geometry:
define two points A(0,0) and B(1,1)
point⁡A,0,0,point⁡B,1,1:
define the segment AB
segment⁡AB,A,B
AB
form⁡AB
segment2d
DefinedAs⁡AB
A,B
map⁡coordinates,
0,0,1,1
See Also
geometry[coordinates]
geometry[DefinedAs]
geometry[form]
geometry[point]
Download Help Document