Segment primitives can be used directly to construct shapes. A shape is constructed in this way by generating a number of segments, and adding these segments to the shape. Segment definition primitives are only meant for internal use in Bifrost. It is not recommended to use these primitives, except for defining circular spline segments, but instead to use the shape definition operations described in Shape Definition Primitives.
A line segment is described by two control points: Begin (= FirstPoint) and End (= LastPoint). A line segment is constructed by assigning values to the Begin and End points:

Resulting line segment

As mentioned earlier there are two different kinds of spline segments: circular and noncircular splines. A circular spline is always considered closed, and a noncircular spline is considered closed if the last operation performed is Close. Noncircular splines are typically used in construction of shapes consisting of both line and spline segments, and circular splines are useful for making circles and ellipses. Spline segments have three operations used for creating the spline:
The following examples illustrate the use of AddControl and Close for a noncircular spline:

Open noncircular spline:



Closed noncircular spline:

The next examples illustrate the use of AddControl for circular splines:

Circular spline with three controlpoints:  

Circular spline with four controlpoints: 
Notice that a circular spline is inherently closed.
When the segment is defined it can be added to a shape with two shape primitives: AddLine and AddSpline.
The following example illustrates the use of AddLine:

Two line segments 
Resulting shape: 
The following example illustrates the use of and AddSpline using the two splines defined previously:

Resulting shape: 
In the case where the spline is not closed, i.e. FirstPoint does not coincide with LastPoint of the shape, the spline is moved to the appropriate position by AddSpline:

Two lines 


A Spline 


Resulting shape: 
It should be clear from the examples that it is complicated to use the segment definition primitives for shape construction. Therefore, for purpose of convenience and to make the graphics system more powerful, Bifrost also includes the small shape construction language presented earlier.
The Bifrost Graphics System  Reference Manual  © 19912004 Mjølner Informatics 
[Modified: Tuesday October 24^{th} 2000 at 15:02]
