Modifying and extending the basic polyhedron program.
To do these exercises you must
run
DX and the polyhedron program.
When the image window appears,
click on the Windows menu of the Image window and select the
Open VIsual Program Editor (VPE) item. The program source should appear.
Remember that you can get help in DX
on any module by selecting the "context sensitive
help" item from the help menu, then clicking the left mouse button on a module.
- Annotate each vertex with its position in space.
- Add a input tab to the Collect module by selecting it, then
typing cntl-A.
- Connect the output of the "vertices" receiver to the
fourth (data) input of the Construct module. This will cause each vertex
to have associated with it a vector data value equal to its position.
- Add a AutoGlyph module by:
- Clicking on the Annotation Catagory at the upper-left
side of the VPE.
- Clicking on the AutoGlyph item of the list in the lower-left
side of the VPE.
- Clicking to the right of the Collect
place the new AutoGlyph module.
- Connect the output of the Construct module to the AutoGlyph module.
- Connect the output of the AutoGlyph module to the Collect module.
- Double-click the AutoGlyph module and enter the string
text in the "type" field.
- Execute the program by selecting the Execute Once item from
the Execute menu.
The program should now look like
this,
and
will generate an
image with each vertex labeled.
- Annotate each vertex with its sequence number index.
- Add a input tab to the Collect module by selecting it, then
typing cntl-A.
- Add an Inquire module by:
- Clicking on the Structuring Catagory at the upper-left
side of the VPE.
- Clicking on the Inquire item of the list in the lower-left
side of the VPE.
- Clicking to the right of the Construct
place the new Inquire module.
- Add an Enumerate module by:
- Clicking on the Realization Catagory at the upper-left
side of the VPE.
- Clicking on the Enumerate item of the list in the lower-left
side of the VPE.
- Clicking to the right of the Construct
place the new Enumerate module.
- Add a AutoGlyph module by:
- Clicking on the Annotation Catagory at the upper-left
side of the VPE.
- Clicking on the AutoGlyph item of the list in the lower-left
side of the VPE.
- Clicking to the right of the Collect
place the new AutoGlyph module.
- Add a Color module by:
- Clicking on the Transformation Catagory at the upper-left
side of the VPE.
- Clicking on the Color item of the list in the lower-left
side of the VPE.
- Clicking to the right of the Collect
place the new Color module.
- Connect the output of the "vertices" receiver module to the Inquire module.
- Connect the output of the Inquire module to the third
(count) input of the Enumerate module.
- Connect the output of the Edumerate module to the fourth
(data) input of the Construct module.
- Connect the output of the Construct module to the AutoGlyph module.
- Connect the output of the AutoGlyph module to the Color module.
- Connect the output of the Color module to the Collect module.
- Double-click the AutoGlyph module and enter the string
text in the "type" field.
- Double-click the Color module and enter the string
black in the "color" field.
- Double-click the Inquire module and enter the string
count in the "inquiry" field.
- Double-click the Enumerate module and enter the number
0 in the "start" field, and enter the number 1
in the "delata" field.
- Execute the program by selecting the Execute Once item from
the Execute menu.
The program should now look like
this,
and
will generate an
image with each vertex labeled.
- Hierarchical modeling.
An object may be geometrically manipulated before it is rendered. This
version of the program will make four scaled and rotated copies of the
tetrahedron, then translate the copies to the vertices of the original
tetrahedron and animate them.
The presentation of
methods will be somewhat compressed.
- Add the following modules (refer to the
program for module placement):
- A Rotate module from the Rendering catagory.
- A Scale module from the Rendering catagory. Set
the "scaling" field to 0.5.
- Four Tranlate module from the Rendering catagory.
Set the "translation" input of each to [1,1,1], [1,-1,-1],
[-1,-1,1], [-1,1,-1] respectively.
- An Collect module from the Structuring catagory. Expand the
number of inputs to five.
- A Sequencer module from the Special catagory. Double click
the module, then click the ellipsis in the upper right corner
of the sequencer widget. Set the Min to 0, the Max to 340 and the
Increment to 20.
- Connect the modules as shown in the link above. The Collect
module shown at the top is the original collect.
- Execute the program by clicking the "play" button on the
Sequencer widget.
The program
will generate an
animation with five tetrahedra.