]>
What you have seen so far is a high-level program using the graphics facility. We now turn to the more basic notions of points, lines, and curves in three-dimensional graphs. These facilities use small floats (objects of type DoubleFloat) for data. Let us first give names to the small float values and .
The small float 0.
The small float 1.
The @ sign means ``of the type.'' Thus is of the type DoubleFloat. You can also say .
Points can have four small float components: coordinates and an optional color. A ``curve'' is simply a list of points connected by straight line segments.
Create the point with color zero, that is, the lowest color on the color map.
Create the point with color zero.
Create the curve (well, here, a line) from to .
We make this line segment into an arrow by adding an arrowhead. The arrowhead extends to, say, on the left, and to, say, on the right. To describe an arrow, you tell Axiom to draw the two curves and We also decide through experimentation on values for , the ratio of the size of the arrowhead to the stem of the arrow, and , the angle between the arrowhead and the arrow.
Invoke your favorite editor and create an input file called arrows.input. This input file first defines the values of
and , then defines the function makeArrow to draw an arrow from point to .
Read the file and then create an arrow from the point to the point .
Read the input file defining makeArrow.
Construct the arrow (a list of two curves).
Create an empty object of type .
Add each curve of the arrow to the space .
Create a three-dimensional viewport containing that space.
Here is a better viewing angle.