
The programs in this folder help explain two ideas.

First, the two programs,

   Position_Model_Vertex_Color_LineSegment_ver1.java
   Position_Model_Vertex_Color_LineSegment_ver3.java

demonstrate how to build a Scene data structure out of
Position, Vector and Model objects, and also how to build a
Model object out of Vertex, Color, and LineSegment objects.

Run each program to see the image file it creates. Then
carefully read each program's source code to see how we
instantiate all the objects needed to create those images.


Second, the four programs,

   Position_Model_Vertex_Color_LineSegment_ver2.java
   Position_Model_Vertex_Color_LineSegment_ver2_Pipeline2.java
   Position_Model_Vertex_Color_LineSegment_ver4_.java
   Position_Model_Vertex_Color_LineSegment_ver4_Pipeline2.java

help us understand how the renderer's first three pipeline stages,
the Model2Camera, Projection, and Viewport transformations, work.
When you run these programs, look very carefully at the logging
output. You can see the transformation steps that the renderer
does in these three stages.

You can see much of the same information that is in the logging
output in the scene graphs created by GraphViz. Compare the stage0,
stage1, stage2, and stage3 scene graph pictures to see what happens
in each pipeline stage.

The renderer has two slightly different versions of the rendering
pipeline, called Pipeline.java and Pipeline2.java. The Pipeline.java
renderer pushes every Model through all the pipeline stages before
moving on to the next Model. The Pipeline2.java renderer pushes all
the Models through one pipeline stage before moving on to the next
stage. The Pipeline2.java program can build an intermediate Scene
data structure that holds the Models that a pipeline stage creates.

The scene0 data structure is the Scene before it is given to the
renderer pipeline. The scene1 data structure is the Scene created by
the first pipeline stage (Model2Camera). The scene1 data structure is
used as the input to the second pipeline stage (Projection). The
second pipeline stage builds the scene2 data structure. The scene3 data
structure is the Scene created by the third pipeline stage (Viewport)
when it is given scene2 as its input.
