home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
cad
/
hyperg11.arj
/
HYPERGEO.DOC
< prev
next >
Wrap
Text File
|
1992-05-27
|
144KB
|
3,174 lines
HYPERGEO
Version 1.1
A program for the investigation of the geometrical
properties of four-dimensional hyperspace.
USER'S GUIDE AND PROGRAM REFERENCE MANUAL
Stuart Esten
33 Banks Avenue
Lexington, MA 02173
USA
HYPERGEO Version 1.1 Page ii
COPYRIGHT NOTICE
HYPERGEO is Copyrighted (c) 1992 by Stuart Esten.
This document is Copyrighted (c) 1992 by Stuart Esten.
ALL RIGHTS RESERVED.
DISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITIES
Due to the nature of computer programming it is impossible to
guarantee the performance of this product. The author makes no
warranty, expressed or implied, in regard to this program and its
accompanying data files and documentation. In no event shall the
author of this program be liable for incidental or consequential
damages relating to or arising out of its use.
HYPERGEO Version 1.1 Page iii
LICENSE
HYPERGEO is a copyrighted computer program. It is not public domain
or free software.
Copies of the program are made available on a trial basis to
prospective users according to the distribution system known as
"shareware". Persons acquiring a shareware copy of HYPERGEO are
granted a limited license to use the program for an evaluation
period not to exceed 30 days. At the end of that time they must
either become registered users of HYPERGEO by paying the requisite
registration fee or cease using the program. Recipients of the
shareware copy of HYPERGEO may make duplicate copies of the program
material for the express purpose of distribution to other
prospective users, provided that:
* Each copy contains all HYPERGEO program files, data files,
and documentation files complete and unmodified;
* No payment is charged for the shareware copies beyond normal
charges for the cost of the diskette and its shipment and
handling.
Registered users of HYPERGEO are granted license to use the software
without time limit on a single computer. A registered copy of the
HYPERGEO program material may not be duplicated other than for
back-up purposes. A registered copy of HYPERGEO may not be
distributed to others.
HYPERGEO Version 1.1 Page iv
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
ASSOCIATION OF SHAREWARE PROFESSIONALS OMBUDSMAN POLICY
This program is produced by a member of the Association of Shareware
Professionals (ASP). ASP wants to make sure that the shareware
principle works for you. If you are unable to resolve a
shareware-related problem with an ASP member by contacting the
member directly, ASP may be able to help. The ASP Ombudsman can
help you resolve a dispute or problem with an ASP member, but does
not provide technical support for members' products. Please write
to the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442-9427 or
send a CompuServe message via CompuServe Mail to ASP Ombudsman
70007,3536.
HYPERGEO Version 1.1 Page v
Table of Contents
Section 1. Introduction....................................... 1-1
Section 2. From Hyperspace to the Video Screen................ 2-1
2.1 From Four Dimensions to Three.................. 2-1
2.1.1 Projection................................. 2-1
2.1.2 Intersection............................... 2-2
2.2 From Three Dimensions to Two................... 2-2
Section 3. The HYPERGEO Program............................... 3-1
3.1 General Structure.............................. 3-1
3.2 The HYPERGEO Display Screen.................... 3-3
3.3 Geometry Manipulations......................... 3-6
3.3.1 Rotations.................................. 3-7
3.3.2 Translation of the Intersecting Hyperplane. 3-10
3.3.3 View Control............................... 3-11
3.4 Special 3-D Geometry Definition................ 3-12
Section 4. Inner Workings..................................... 4-1
4.1 Units.......................................... 4-1
4.2 Verification of the Geometry Definition........ 4-1
4.3 Calculating 4-D to 3-D Projections............. 4-2
Section 5. Restrictions and Limitations....................... 5-1
5.1 Geometry Definition File....................... 5-1
5.2 Mathematical Precision......................... 5-2
Section 6. Supplied Geometry Definition Files................. 6-1
Appendix A. Geometry Definition File........................... A-1
Appendix B. Configuration File................................. B-1
Appendix C. Command Line Arguments............................. C-1
Appendix D. Interactive Commands............................... D-1
D.1 Keyboard Commands and the Modifier Keys........ D-1
D.2 Mouse Selected Interactive Commands............ D-2
D.3 Interactive Parameter Specification............ D-3
D.4 HYPERGEO Interactive Keyboard Commands......... D-4
Appendix E. Running HYPERGEO under Microsoft Windows........... E-1
Appendix F. Registration Form.................................. F-1
HYPERGEO Version 1.1 Page 1-1
Section 1. Introduction
"I tried turning the hypercube around, moving it away, bringing
it up close, turning it around another way. Suddenly I could
feel it! The hypercube had leaped into palpable reality, as I
learned how to manipulate it, feeling in my fingertips the power
to change what I saw and change it back again. The active control
at the computer console created a union of kinesthetics and visual
thinking which brought the hypercube up to the level of intuitive
understanding."
"The Mathematical Experience"
Philip J. Davis & Reuben Hersh
For reasons known only to the Great Cosmic Programmer, the universe in
which we dwell possesses three spatial dimensions. Our senses of
physical perception operate intuitively and naturally in these three
dimensions. Indeed, it requires an act of intellectual imagination
to consider the nature of alternative dimensional realities. With some
contrivance we can picture the peculiar qualities of a world aware of
only two dimensions. This is the substance of Edwin Abott Abott's
famous fantasy "Flatland" (written from the viewpoint of Abott's two-
dimensional narrator A Square). We can make the mental adjustment
required to conceive of a two-dimensional universe by imagining one of
our three dimensions to be somehow squeezed down to zero extent and thus
out of existence. It is a simple matter to draw pictures of
two-dimensional objects; in fact, the nature of writing surfaces and
writing implements is such that all our drawings are already limited to
two dimensions (it is only the insistently three-dimensional nature of
our sense of sight that causes us to "see" depth in our flat artwork).
Perceptions in two dimensions are accessible because they already exist
within our three-dimensional space and because we have at hand ready
physical analogs in the form of flat surfaces of solid objects.
In "Flatland", Abott makes his narrator aware of the existence of
three-dimensional "Spaceland" although A Square is unable to fully
conceive of its nature. He further contemplates the analogous
relationship between Spaceland and a still higher universe possessing
four dimensions. In this scenario we, the inhabitants of our familiar
three-dimensional reality, become the Flatlanders, constitutionally
unable to perceive the totality of the encompassing higher realm.
When we try to imagine the shape and configuration of "hyperobjects" -
that is, objects constructed in four dimensions - we are stopped short
by the inability of our conceptual powers to find a place for the fourth
dimension. For whatever reason, there simply is no way to twist or
HYPERGEO Version 1.1 Page 1-2
rearrange four separate orthogonal dimensions so they make spatial sense
to us.
Our best hope for grasping the essence of four-dimensional reality lies
in somehow reducing the full complexity of hyperobjects to a simplified
image that can be represented in three dimensions. Although the full
four-dimensional "depth" of the hyperobject's geometry cannot be fully
conveyed this way in a single image, it is possible by generating
sequences of such images - each corresponding to a different orientation
of the hyperobject in four-dimensional space - to begin to comprehend
the shape of the fourth dimension. Naturally, computers and the
capabilities of computer graphics are ideally suited for use as tools in
generating such images, and it is well within the powers of the typical
personal computer equipped with a standard display device to serve as a
research platform for the investigation of hyperspace.
HYPERGEO Version 1.1 Page 2-1
Section 2. From Hyperspace to the Video Screen
When a computer is used to generate images derived from a
four-dimensional hyperobject, two separate stages of geometric
transformation must be performed. First, the four-dimensional object
must be reduced to a particular three-dimensional image based on the
object's orientation and position in hyperspace. Second, the resulting
three-dimensional image must be represented on the flat, two-dimensional
surface of the computer's display device. Because each of these
transformations entails the loss of dimensional information, it is
desirable to provide the computer user with as much control as possible
over the manner in which the images are constructed and displayed.
2.1 From Four Dimensions to Three
There are two basic approaches for generating a three-dimensional image
from a four-dimensional object: projection and intersection. Each is
highly analogous to the same technique applied to the reduction of a
three-dimensional object to a flat, two-dimensional representation.
2.1.1 Projection
Projection is the mathematically simpler of the two. It entails the
construction of an imaginary "viewscreen" in hyperspace and the
projection of each point in the hyperobject onto that viewscreen. The
calculations are performed by considering the straight lines that run
between each point in the hyperobject and a fixed four-dimensional
viewpoint; the desired projection points are the intersections of these
lines with the viewscreen. But because this is four-dimensional
hyperspace, the viewscreen is itself a three-dimensional "hyperplane"
(not just a simple two-dimensional plane), and the projection points all
possess three dimensions. The positions of the viewpoint and viewscreen
in hyperspace relative to the hyperobject determine the degree of
"perspective" in the resulting three-dimensional image. (This process
is entirely analogous to the projection of a 3-D object onto a flat 2-D
viewscreen; in fact, just such a 3-D to 2-D projection is used
subsequently to generate the final graphical output.)
In a 4-D to 3-D projection, every point in the original hyperobject is
always visible as a corresponding projected point in the 3-D image
(although, of course, a point may from time to time happen to be hidden
behind other points or lines). The overall 3-D image that results is a
network of connected lines corresponding to the vertexes and edges of
the 4-D hyperobject; it is not itself a simple 3-D polyhedron. The
complexity of this network relates directly to the four-dimensional
structure of the hyperobject.
HYPERGEO Version 1.1 Page 2-2
2.1.2 Intersection
The second approach for reducing a four-dimensional hyperobject to a
three-dimensional image involves calculating the intersection of the
hyperobject with a three-dimensional hyperplane. This can be thought of
as cutting a "slice" through the hyperobject and viewing the resulting
cross-section. But again, because the cutting instrument is a
hyperplane in the case of the 4-D to 3-D intersection, the object that
is determined by the cut is three-dimensional and forms a simple 3-D
polyhedron - assuming that the original 4-D hyperobject is itself simple
and is externally convex. (The 3-D to 2-D analogy involves making a
planar cut through the 3-D geometry and viewing the flat polygonal
outline of the cross-section.)
In a 4-D to 3-D intersection, the only portion of the hyperobject that
contributes to the 3-D image is that lying exactly on the intersecting
hyperplane; all the rest is lost and invisible. For this reason, an
intersection can result in very minimal 3-D polyhedra such as pyramids
and box shapes, even from a complex hyperobject. In fact, if the
intersecting hyperplane is positioned (in hyperspace) entirely outside
the extents of the hyperobject, the resulting 3-D image will be empty.
It is generally most revealing to examine the sequence of intersections
that result when the cutting hyperplane is gradually moved through the
hyperobject, starting at one face or edge and working across to the
opposite. By taking a number of such sequences for various orientations
of the hyperobject in four-space, the user can achieve a sense of its
"extradimensional" structure.
2.2 From Three Dimensions to Two
All the options available in the HYPERGEO program for converting a
three-dimensional image into a viewable two-dimensional picture on the
computer's display are variations of the projection technique referred
to above. Each 3-D point is projected onto a 2-D viewscreen by
calculating where the line that runs between the 3-D point and a fixed
3-D viewpoint intersects the viewscreen. However, unlike the case for
4-D to 3-D projections, for 3-D to 2-D projections the viewscreen and
viewpoint don't have to be invented; they correspond to the surface of
the real display device and the eye of the (presumably real) viewer.
Given this basic technique for projecting a 3-D image onto a flat
screen, a great deal can be done to enhance the meaningfulness of the
resulting 2-D picture. The following alternatives are available:
* Orthographic Projection
This is the simplest and least revealing form of 2-D image. It is
generated by assuming the viewpoint to be at infinity and projecting
all 3-D points orthogonally onto the screen. The resulting picture
is a "wire-frame" representation of the 3-D object's edges.
HYPERGEO Version 1.1 Page 2-3
* Perspective Projection
This is a straightforward linear projection similar to orthographic
except that it uses a finite value for the distance between the
viewpoint and the screen. It also generates a wireframe
representation but provides a sense of perspective which gives some
sense of 3-D depth. It is enhanced by allowing the user to modify
the apparent eye-to-screen distance, thus adjusting the amount of
perspective in the picture.
* Stereoscopic Projection (Anaglyph)
This uses the realistic eye-to-screen distance of the simple
perspective approach, but two separate images are generated which
correspond to the projections as perceived by the right and left eye
(the calculation of the projections takes into account the
distance between the eyes). When the two images are displayed in
contrasting colors (typically red and blue or red and green), they
can be viewed through filtering "3-D" glasses which cause the brain
to perceive the image with full three-dimensional depth. Although
wearing the colored glasses is somewhat cumbersome, this method
produces far and away the most vivid and revealing impressions of
the structure of the 3-D object.
(The general technique of generating dual projections that
correspond to each eye's separate view is known as "stereoscopic"
projection. The particular instance of stereoscopic viewing that
uses different colors for the two projections with matching colored
filters for the eyes is called an "anaglyph".)
* Hidden-line Projection
This approach begins with the wire-frame representation generated by
a normal perspective projection. Additional calculations are
performed that prevent the display of any edge lying behind a face
of the 3-D object. This causes the object to appear opaque. The
calculations required to determine which edges (or portions of an
edge) to hide are extensive and slow the program down considerably.
* Solid Projection
A solid projection performs all the processing required by a
hidden-line projection plus some additional calculations to
determine the orientation of each visible face of the 3-D object.
Rather than drawing the edge outlines of the object, the faces are
filled in using either a density of fill pattern or a particular
HYPERGEO Version 1.1 Page 2-4
shade of color that corresponds to the obliqueness of the face as
seen from a theoretical light source; faces that are most directly
illuminated are filled the brightest. The result is a fairly
realistic rendering of the 3-D object as solid. The calculations
required make solid projections even slower than hidden-line
projections.
(Note: since hidden-line and solid projections require the 3-D
object to be a simple polyhedron, they can only be used with 3-D
images created by a 4-D intersection, not those created by 4-D
projections.)
HYPERGEO Version 1.1 Page 3-1
Section 3. The HYPERGEO Program
HYPERGEO is a program written for the IBM-PC and compatible computers
running the PC-DOS or MS-DOS operating system. It requires about 180K
bytes of memory plus whatever is needed for the data requirements of the
particular geometry currently active in the program. For most ordinary
objects (including the basic hypercube) memory requirements are quite
modest, but they can increase tremendously for very large and complex
four-dimensional geometries. The program does not make use of expanded
or extended memory, so the 640K DOS barrier is the absolute limiting
factor on the size of geometries that can be handled by HYPERGEO.
The program will generate graphical output for EGA, VGA, or Hercules
display devices. It does not support CGA graphics. For Hercules (and
optionally for the others) the graphics are monochrome, and the
stereoscopic anaglyph display mode is unavailable. The performance of
HYPERGEO is identical on EGA and VGA systems with the exception of two
areas in which the VGA's higher performance is utilized: first, all
graphics are drawn with the higher VGA display resolution (640x480
pixels); and second, the enhanced VGA color capabilities are used to
provide superior solid surface rendering. No non-standard, so-called
"super-VGA" display modes are supported in this version.
HYPERGEO performs extensive floating-point calculations, and the speed
of the program will be enhanced considerably by the presence of a math
coprocessor chip such as an 80287 or 80387. If the system has a math
coprocessor, HYPERGEO will detect its presence automatically. All
features are functional without a coprocessor, but performance will be
as much as several times slower.
If a mouse pointing device is on the system, it can be used to invoke
the interactive rotation commands (see below). However, a mouse is not
required since all commands can be executed through keyboard entry.
Only the left and right mouse buttons are used, so a two-button mouse is
as good as a three-button mouse.
3.1 General Structure
The HYPERGEO program accepts a description of the topology of a
four-dimensional hyperobject. This description is contained in a
"geometry definition file" which is a plain text file that can be edited
by the user. It contains coordinate information for each vertex point
of the hyperobject plus connectivity information that indicates which
vertexes are joined by edges. See Appendix A for a complete discussion
of the format of this file. The program analyzes the topology and
determines which edges form external faces and, in turn, which faces
form external hyperfaces.
HYPERGEO Version 1.1 Page 3-2
The program also accepts various parameters that control the manner in
which the hyperobject is displayed. There are two ways in which these
parameters are given to the program: through a special configuration
file or as command-line arguments. (Note: There is not a complete
correspondence between all possible configuration file parameters and
all possible command-line arguments. Some parameters can be specified
only in the configuration file and some only as command-line arguments.)
See Appendix B for a full description of the format of the configuration
file and Appendix C for a description of the available command-line
arguments.
A section of configuration parameters can also be appended to the end of
a geometry definition file following all topology information; the
format is the same as in the primary configuration file. In effect,
this acts as a secondary configuration file which will apply only to
that particular geometry file.
The order of precedence for conflicting parameters is as follows.
Command-line arguments take the highest precedence and will always
override a corresponding parameter in the configuration file. Also,
configuration parameters contained in a geometry definition file take
precedence over corresponding parameters in the primary configuration
file. Finally, every parameter has a pre-defined default value which
will be used in the absence of any specification via the configuration
file or the command line. The default values for all parameters are
listed in the appendixes. To summarize the order of precedence for the
various avenues of parameter specification, they are, from highest to
lowest:
* Command line arguments
* Configuration parameters in current geometry definition file
* Configuration parameters in primary configuration file
* Program's internal default values
It should be noted that no configuration file or command-line arguments
are absolutely required. The program will operate without them using
reasonable default values.
Once all geometry and configuration information has been read in and
processed, the HYPERGEO program creates a display of the image of the
hyperobject. At this point, the user has access to a set of commands
which facilitate the interactive manipulation of the hyperobject's
display. These interactive commands are described throughout subsequent
sections of this document and are summarized in Appendix D.
HYPERGEO Version 1.1 Page 3-3
3.2 The HYPERGEO Display Screen
The screen displayed by the HYPERGEO program consists of two areas: the
primary graphics area where the image of the geometrical object being
examined is displayed, and an optional menu and mouse control pad area.
The user may select whether or not to display the menu area. If it is
not displayed, the primary graphics area is the entire screen. When
the menu area is displayed, it occupies the right edge of the screen,
and the primary graphics area fills the entire remaining screen.
The menu area lists a number of display parameters that may be modified
interactively by the user. It also contains a panel of command
selection boxes that may be activated by the mouse to perform various
rotations of the object being displayed. A mouse is not required for
the HYPERGEO program; all mouse functions may also be invoked through
keyboard commands. However, the mouse does provide a more naturally
intuitive feeling of control over the manipulation of the geometry being
studied. The mouse functions are only available when the menu area is
displayed. (All keyboard commands are always available regardless of
whether the menu area is displayed or not.)
The HYPERGEO program automatically scales and centers the geometry
display within the primary graphics area. The user may subsequently
modify the scale and position of the display as desired.
Some of the interactive commands will prompt for additional keyboard
input (such as a numeric value, a color name, or a file name). This is
done using a special prompting window which pops up in the middle of the
primary graphics area. The user should type in the appropriate entry
which will echo in the prompting window, and should terminate the entry
by pressing <Enter>; this indicates that the entry is complete and
correct and initiates the particular command. Pressing <Esc> at any
time while a prompting window is displayed will dismiss the window and
cancel the command.
A similar message window will appear whenever an error condition (such
as invalid command input) must be reported. No user input is asked for;
the window serves only to convey a message. Once it has been read, the
user may dismiss the window by pressing any key.
A special message window is the HYPERGEO Information Window. This
window contains some basic data describing the geometry and topology of
the currently active object, and it also contains the HYPERGEO copyright
statement. By default, the Information Window is displayed
automatically upon the initial start up of the program and every time a
new geometry definition is read in. However, the program may be
configured to bypass this. An interactive command exists to display the
Information Window at any time during normal operation of the HYPERGEO
program. The Information Window is a normal message window and may be
dismissed by pressing any key.
HYPERGEO Version 1.1 Page 3-4
On-line help is available at all times within the HYPERGEO program. An
interactive command brings up the display of a help window that
temporarily overwrites the entire screen. The help window contains a
brief description of each of the interactive commands that the user may
invoke to manipulate the active geometry. Pressing any key dismisses
the help window and returns the HYPERGEO display to its previous state.
Note: The HYPERGEO program does NOT use the (more or less) standard F1
key to bring up its on-line help window. Instead it uses the '?' key.
This frees the function keys (including F1) to accommodate other
interactive commands.
For systems with color EGA or VGA displays, the user has control over
the colors used to draw the various components which comprise the
overall graphical output. The colors are specified using statements in
the configuration file and may be set to any one of the sixteen standard
EGA colors (listed in Appendix B). In addition, the color used to draw
the actual edge lines of the geometrical object itself can be modified
interactively from within the HYPERGEO program. In the absence of any
user specification, HYPERGEO uses a set of default colors which are
believed to provide an attractive and comfortably viewable appearance
(although, of course, such matters are subject to the contentiousness of
individual tastes).
There are eight separate components that together make up the total
HYPERGEO display, and each can be assigned a different color:
* Primary background
This is the background color which covers the entire screen
(including the optional menu area) before any graphics are
drawn. It may be any color, but a dark shade such as black or
the default dark gray is recommended for visibility. This is
especially so when using the stereoscopic (anaglyph) display
mode, which requires a dark background to produce a good 3-D
effect. (Black is probably the most vivid in this respect, but
dark gray is a bit easier on the eyes for extended viewing.)
Default: dark gray
* Primary foreground
This is the color used to draw the actual edge lines of the
geometrical object as it is projected onto the computer's
display screen. This color is also used for the transient data
values displayed in the menu area. Naturally, the primary
foreground color should give a good contrast with the primary
background color.
Default: white
HYPERGEO Version 1.1 Page 3-5
* Menu
This color is used for drawing the outlines and fixed labels of
the data items and the mouse control pad section in the menu area
of the HYPERGEO program. It is also used for the display of the
name of the geometry definition file which the user may select
to have appear in the upper, left corner of the primary graphics
area.
Default: yellow
* Geometry axis vectors
As the user rotates the geometrical object in hyperspace, the
HYPERGEO program keeps track of the orientation of each of the
axes of the object's original coordinate system. A projection
onto 3-space of the unit vector drawn from the origin along each
axis may optionally be displayed as part of the primary geometry
graphics. This assists in visualizing the displacement of the
original orientation of the object in all the dimensions of
hyperspace.
Default: cyan
* Message window background
This is the background color for all prompting and message
windows.
Default: brown
* Message window text
This is the text color for all prompting and message windows.
Default: white
* Help window background
This is the background color used in the on-line help window.
Default: light gray
HYPERGEO Version 1.1 Page 3-6
* Help window text
This is the color used for the text in the on-line help window.
Default: black
Two other colors are used in the HYPERGEO primary graphics, the red and
blue used by the stereoscopic anaglyph display. However, these colors
are fixed by the requirements of the "3-D" viewing glasses and are not
modifiable by the user.
Color is also used in the surface rendering of the solid display mode,
which may be used with images produced by 4-D intersections, but its use
and configurability are complicated by the differing capabilities of EGA
and VGA display devices. For EGA systems, the colors used for solid
surface rendering are fixed by the program and are not modifiable by the
user; these colors give an acceptable gradation of shades from light to
dark and are not colors available in the sixteen standard EGA colors.
For VGA, the program takes full advantage of the enhanced color
capabilities of the display device, in particular its ability to
generate over 256,000 discrete shades. HYPERGEO uses eight variations -
ranging from very light to very dark - of a single VGA color to produce
the consistent shadings necessary for realistic solid surface rendering.
The user can specify the base color (in terms of a VGA red/green/blue
color definition) from which HYPERGEO will generate the eight graduated
shadings.
For either EGA or VGA, the user may select not to use color for solid
surface rendering, but to instead use variable pattern fill, which just
uses the primary foreground color. Variable pattern fill is always used
on monochrome systems.
3.3 Geometry Manipulations
Central to the operation of the HYPERGEO program is the ability to
interact with the geometry as it is being displayed and to have the
picture on the screen respond to the user's directions. It is just this
ability to manually manipulate the hyperobject in all four dimensions of
hyperspace that creates a sense of "hands-on" control and establishes an
intuitive feel for the extradimensional shape of the hyperobject.
In light of the two-stage process required to capture an image of a
four-dimensional geometrical object on a two-dimensional computer
display screen (first, 4-D to 3-D reduction, and second, 3-D to 2-D
projection), HYPERGEO provides interactive functions to manipulate the
geometry both in its original hyperspace configuration (in 4-space) and
in its reduced three-dimensional representation (in 3-space). In
HYPERGEO Version 1.1 Page 3-7
addition, the program allows the user to control a number of parameters
that determine how the final 2-D picture is generated.
A word or two is needed here on the subject of coordinate systems. The
HYPERGEO program uses the letters X, Y, Z, and W to label the four
coordinates in hyperspace. Wherever ordering is significant (as, for
example, in the specification of coordinates within a geometry
definition file), the order is (X,Y,Z,W). As is conventional with
computer graphics, three-dimensional coordinate systems are
"left-handed"; thus, the positive Z-axis points away from the viewer and
into the screen.
3.3.1 Rotations
The primary method of examining an object is to turn it about to view it
from many different angles. In this manner, it becomes possible to
discover the overall nature of something which - for whatever reason -
is not immediately accessible in its entirety to our perceptions. In
the HYPERGEO program, rotations in all possible directions are available
through interactive commands, and it is possible to position the
geometry in whatever orientation is desired.
Rotations can be performed either on the 4-D geometry before it is
reduced to a 3-D image, or on the 3-D geometry of the reduced image
itself. The effect of the two classes of rotation is different, not
only because of how they are handled by the HYPERGEO program, but also
because of fundamental differences between the structure of 3-space and
that of 4-space.
In our familiar 3-space, rotations are performed about an "axis" which
is a straight line in space. The rotation leaves all points on the axis
unchanged while all other points in 3-space move in circles that are
centered on the axis and that lie in a plane perpendicular to the axis.
However, in 4-space, there are an infinite number of lines that pass
through a given point on a plane and that are perpendicular to the
plane. Thus when a hyperobject is rotated so that the points in a
particular plane move in circles about a fixed point on the plane, it is
not correct to say that the rotation takes place around an axis. It is
most meaningful to our three-dimensional minds to think of 4-D rotations
as being "on" or "of" a particular plane rather than being "around"
anything. (Actually, rotations in hyperspace take place around a plane
in the sense that for any given direction of hyperspatial rotation there
is a plane on which no points move, namely, the plane determined by any
two distinct lines perpendicular to the rotating plane and passing
through the rotational centerpoint on it. This is virtually impossible
to picture for our 3-D brains, so it is simpler to refer to such
rotations in terms of the plane which is being rotated.)
Any particular spatial orientation can be reached by performing an
appropriate sequence of rotations of the planes determined by pair-wise
HYPERGEO Version 1.1 Page 3-8
combinations of the space's coordinate lines. In our 3-space there are
three such planes: the XY-plane, the XZ-plane, and the YZ-plane. In
hyperspace, which has four orthogonal coordinate axes, there are six
planes that form the basis for all rotations: XY, XZ, XW, YZ, YW, and
ZW. (In 3-space the rotations are normally referred to by the name of
the axis around which the rotation occurs rather than the plane of the
rotation.) HYPERGEO has interactive commands for performing rotations
of all nine planes. For all HYPERGEO rotations, the coordinate system's
origin is always the centerpoint; thus the origin is never moved by any
rotation. (Note: the configuration file accepts a parameter for
repositioning the origin within the original geometry; this in turn has
the effect of repositioning the center of all rotations to any desired
point in hyperspace.)
All rotations in HYPERGEO are in incremental steps of the current Turn
Angle. The value of the Turn Angle can be set by the user in the
configuration file, and it can also be modified interactively at any
time. Its current setting in degrees is displayed in the menu area.
The Turn Angle can be set to a large number of degrees (say, 30 or 45)
for rapid rotations of the object, and then reduced to a smaller value
for fine positioning. Interactive commands exist for rotating the
object one incremental step, through either a positive or negative Turn
Angle, within any one of the three 3-D and six 4-D base rotational
planes. Also, there are commands for automating any one of the possible
modes of rotation; in these automated modes HYPERGEO continues to
perform incremental rotations in the specified direction as rapidly as
the computer's processing speed will allow.
The HYPERGEO program provides two features to assist the user in keeping
track of the orientation of the active object in hyperspace as it
undergoes various rotations. First, there is the ability to display the
projected image of all four unit vectors emanating from the origin along
the four hyperspace coordinate axes. This provides good visual feedback
of how the object is turning in hyperspace. Second, the menu area
contains data fields that display the angular displacement of each
coordinate axis from its initial, unrotated position. These
displacement angles can vary from 0 degrees (when the axis is coincident
with its initial alignment) to 180 degrees (indicating that it has been
rotated to point in the completely opposite direction).
It is important to understand how four-dimensional rotations of the
hyperobject in hyperspace differ from three-dimensional rotations of the
reduced image in normal 3-space. The critical point is that rotations
in 4-space affect the shape and structure of the reduced 3-D image and
do not necessarily produce directly equivalent rotations of that 3-D
image. Rotations in 3-space, on the other hand, are performed after the
4-D to 3-D reduction, and they always directly rotate the 3-D image;
they never alter its shape.
To clarify this, consider what is going on as the hyperobject is turned
in hyperspace. If the program is using 4-D to 3-D intersection mode,
HYPERGEO Version 1.1 Page 3-9
the slicing hyperplane will pass through varying cross-sections of the
object, and these cross-sections will be three-dimensional polyhedra of
varying topologies. The 3-D polyhedra themselves will not necessarily
rotate. For the projection mode of 4-D to 3-D reduction, rotations of
the hyperobject will have the effect of altering the pattern of the
network of connected edges that is projected into 3-space, but the
motion of the network will not be any simple three-dimensional rotation.
This distinction - that 4-D rotations alter the shape and structure of
the reduced 3-D image, while 3-D rotations rotate the image - while
generally true, is, alas, not the whole story. Four-dimensional
rotations behave differently depending on whether or not the plane of
the rotation contains the W-axis. In HYPERGEO, 4-D to 3-D intersections
always occur along a hyperplane that is defined by a constant W value,
and 4-D to 3-D projections always are performed onto a hyperplane that
is similarly defined by a constant W value. For this reason, rotations
that occur on planes that do not contain the W-axis do not alter the
shape of the resulting 3-D image (because they do not modify the
W-coordinate of any points in the hyperobject). Instead, they behave
like 3-D rotations of the corresponding plane (for example, a 4-D
rotation of the XY-plane has the same effect as a 3-D rotation around
the Z-axis). The net outcome of all this is that the 4-D rotations of
the XY-, XZ-, and YZ-planes look like simple 3-D rotations and have the
same effect on the appearance of the object's display in HYPERGEO as 3-D
rotations around the Z-, Y-, and X-axes, respectively. The other three
4-D rotations (that is, of the XW-, YW-, and ZW-planes) do alter the 3-D
image's shape and do not resemble any simple 3-D rotations.
One final point is needed to complete this discussion of rotations.
Although 4-D rotations of the XY-, XZ-, and YZ-planes look the same as
3-D rotations around the Z-, Y-, and X-axes, they are not treated the
same by the HYPERGEO program. The 4-D rotations permanently alter the
orientation of the hyperobject in 4-space as that orientation is
calculated and remembered by the program; they are cumulative in the
sense that each subsequent 4-D rotation takes as its initial orientation
the one arrived at by the previous 4-D rotation. 3-D rotations, on the
other hand, do not permanently modify the four-dimensional orientation
of the hyperobject; rather, they serve as temporary repositionings of
the current 3-D image in 3-space. For this reason, 3-D rotations are
most useful as a means of examining the shape of the current 3-D image
expressly without altering the 4-D orientation of the hyperobject that
produced that image. A 4-D rotation performed following a sequence of
3-D rotations reverts back to the most recent 4-D orientation for its
starting position since that is the permanent orientation remembered by
HYPERGEO. The transient 3-D rotations of the reduced image are lost and
forgotten. (It is worth noting that although the 4-D rotations may look
like 3-D rotations, they involve the additional computational effort of
updating the permanent 4-D database and thus are noticeably slower.)
This functional distinction between 4-D and 3-D rotations is reflected
in the way HYPERGEO reports the hyperobject's orientation. In
HYPERGEO Version 1.1 Page 3-10
particular, the axis displacement angles (displayed in the menu area)
and the axis vectors (displayed in the primary graphics area) are only
affected by 4-D rotations. During temporary, 3-D rotations, they remain
unchanged and continue to indicate the permanent 4-D orientation from
which the next 4-D rotation will proceed.
3.3.2 Translation of the Intersecting Hyperplane
For the intersection mode of 4-D to 3-D reductions, the program
calculates the three-dimensional intersection of the hyperobject with a
hyperplane that is defined by the equation, w = k, that is, having a
constant W coordinate value. (In four dimensions, a linear equation of
the four coordinate variables, Ax + By + Cz + Dw = E, defines a
hyperplane. A hyperplane can perhaps best be envisioned as a normal
three-dimensional space that is situated in hyperspace and has zero
extent into the fourth dimension. Our universe at any given instant can
be considered a hyperplane in four-dimensional space-time.) The shape
of this intersection can be varied by rotating the hyperobject; this
approach has been discussed in the above section on rotations. However,
the intersection can also be modified by moving the hyperplane through
hyperspace, in particular, by moving it along the W-axis by altering the
value for 'k' in the hyperplane's equation. The HYPERGEO program
provides interactive commands for performing such a translation of the
intersecting hyperplane. (It should be emphasized that the position of
the intersecting hyperplane only has an effect in the intersection mode
of 4-D geometry reduction; it is irrelevant when using projection mode.)
Two parameters relate to the interactive translation of the intersecting
hyperplane: the current W value of the hyperplane's equation, and the
amount by which that value will be incremented (or decremented) for each
translation of the hyperplane. Both of these values are displayed in
the HYPERGEO menu area: the current W value of the intersecting
hyperplane is called the W-INTER parameter, and the incremental step
value is called DELTA-W. An interactive command exists that increments
the W-INTER value by the value of DELTA-W and updates the HYPERGEO
display accordingly. Another command serves to decrement the W value
and thus move the intersecting hyperplane in the reverse direction. In
addition, both parameters may be explicitly set to any desired numeric
value using other interactive functions. The initial values of the
W-INTER and DELTA-W parameters may also be set in the HYPERGEO
configuration file. If W-INTER is not specified by the user in the
configuration file, its default value is calculated as the average of
the minimum and maximum W values for the active geometrical object thus
centering the intersecting hyperplane within the geometry.
Translation of the intersecting hyperplane is most revealing when it
proceeds from one edge or face of the hyperobject, through its entire
body, and on to the opposite side. A feature exists which automates
just such a traversal of the hyperplane. It continuously increments the
W value until the body of the hyperobject is exited. The direction of
HYPERGEO Version 1.1 Page 3-11
translation is then reversed and the W value is continuously decremented
until the opposite side of the hyperobject is reached. The direction of
translation continues to be reversed at each extreme so that the
hyperplane passes back and forth (in hyperspace) through the entire body
of the hyperobject. Performing such passes upon varying orientations of
the hyperobject in hyperspace provides an excellent method for acquiring
a sense of its four-dimensional shape. (Note: the effective speed of
the hyperplane's motion along the W-axis can be adjusted by setting the
DELTA-W value appropriately.)
3.3.3 View Control
The final step in the processing chain that leads from the specification
of the geometry of a four-dimensional hyperobject to the depiction of an
image of that object on the computer screen is the generation of the
two-dimensional graphical output. As described above in a previous
section of this document, the program uses a number of variations of a
basic 3-D to 2-D linear projection to perform this step. The user has
access to several interactive commands with which to adjust a number of
parameters that affect the appearance of the final display. Paramount
among these is the output display mode.
As outlined earlier, there are five possible projection modes in which
the final graphical output can be presented: orthographic, perspective,
stereoscopic anaglyph, hidden-line, and solid. The selection of a
particular mode is one of the parameters which the user can modify; any
one of the five modes can be invoked at any time (with some exceptions -
see below). A data field in the menu area shows which mode is in
effect. Whenever the display mode is changed, the program immediately
redraws the representation of the current geometry using the method of
the new mode. The basic orientation of the hyperobject remains fixed
across any such switch in display mode.
The exceptions referred to in the preceding paragraph are as follows:
first, the stereoscopic anaglyph mode cannot be invoked on monochrome
systems (since the anaglyph requires red and blue); and second, the
hidden-line and sold display modes can only be selected if the 4-D to
3-D reduction step is using 4-D intersection, not 4-D projection (since
4-D projections do not produce a 3-D geometry which is a solid 3-D
polyhedron amenable to hidden-line analysis).
Two numeric parameters are key in the calculations which generate the
graphics seen on the screen. First, the eye-to-screen distance is used
to calculate all forms of 3-D to 2-D projection (except orthographic, in
which the eye-to-screen distance is effectively infinite). The
eye-to-screen distance is shown as a data item in the menu area. It can
be adjusted up or down interactively by the user. Decreasing the
eye-to-screen distance has the effect of enhancing the perceived degree
of perspective in the picture, and increasing the distance reduces the
perspective. The eye-to-screen distance can be adjusted in increments
HYPERGEO Version 1.1 Page 3-12
or decrements equal to 10% of its current value, or it can be set to an
explicit numeric value. The program will allow the eye-to-screen
distance to be reduced to a very small value; however, it should never
be made so small that the viewpoint effectively enters the object being
displayed as this results in distorted and meaningless graphics.
The second key display parameter is the scale factor which is the ratio
of geometry units to screen inches. This value determines the apparent
size of the object as finally drawn on the screen. The scale ratio is
displayed as a data field in the menu area. It can be adjusted up or
down in increments of 10% of the current value, or it can be assigned an
explicit numeric value. When a new geometry file is read in, and if
there is no overriding information in the configuration file, the
program automatically sets the scale ratio so the image of the object
fits comfortably within the primary graphics area allowing plenty of
room for rotations.
Both the eye-to-screen distance and the display scale ratio can be
specified in the configuration file.
3.4 Special 3-D Geometry Definition
The designed function of the HYPERGEO program is the display and
examination of the properties of four-dimensional geometrical objects.
The program's input is normally expected to be a geometry definition
file that specifies four coordinate values for each vertex point. All
of the preceding discussion has been in terms of this basic scenario.
However, the program will also accept geometry definitions of
three-dimensional objects and will display them with all features
available that relate to the 3-D level of processing. When the input
geometry is three-dimensional, all of the program's commands that
normally perform operations in four dimensions are deactivated; if the
user selects a keyboard command that only operates on four-dimensional
geometries, a message window appears with an explanation that the
command is not applicable to the current 3-D object, and the command is
ignored. In special 3-D geometry mode, the section of the mouse control
pad area that contains the selection boxes for 4-D rotations is shaded
over with a stippled pattern, and those mouse functions cannot be
selected.
A 3-D geometry definition file has the same format as a 4-D file (see
Appendix A) with two exceptions: first, the value of the "number of
dimensions" field is 3 instead of 4; and second, each point has only
three coordinates, not four.
When operating upon a 3-D geometry definition, the program treats all
3-D rotations as permanent modifications to the object's database. The
displayed axis angle displacements and the unit axis vectors are changed
upon 3-D rotations. (Recall that for 4-D geometries these items remain
fixed during 3-D rotations and are only changed when a 4-D rotation is
performed.)
HYPERGEO Version 1.1 Page 4-1
Section 4. Inner Workings
4.1 Units
The coordinates of the geometry definition are considered to be in
so-called "geometry units" which are not assumed to have any particular
relation to any real physical unit. Regardless of the size of the
coordinate values, HYPERGEO will scale the display to fit within the
visible screen area. Some of the parameters that can be specified by
the user are expressed in geometry units and must be entered that way.
Other parameters, in particular, those relating to the projection of the
final 2-D image on the computer's screen, are expressed in real-world
units. The program uses inches for all real-world dimensions, and the
display scale is expressed as a ratio of geometry units to inches (the
inches here refer to distances on the face of the computer's display
screen).
In the detailed reference material contained in the appendixes to this
document and in all program prompts and messages it is always indicated
what units a particular data value is expressed in.
4.2 Verification of the Geometry Definition
When HYPERGEO reads in a geometry definition file, either 4-D or 3-D, it
analyzes the topology of the described object. The number of vertexes,
edges, faces, and (for 4-D) hyperfaces is calculated, and various
aspects of the input file and its derived topology are checked for
validity:
* The number of dimensions must be either 3 or 4.
* Every vertex must have at least as many edges connected to it as
the number of dimensions.
* All edge connections must be consistently specified between both
connected vertexes, that is, if vertex #1 is in the connection
list of vertex #2, vertex #2 must be in vertex #1's list, also.
* The numbers of vertexes, edges, faces, and (for 4-D) hyperfaces
must agree with the theoretical values as given by Euler's
Formula or its hypergeometric version.
If any of these checks fails, an error message is displayed, and when
the message window is dismissed, the program exits back to DOS.
HYPERGEO Version 1.1 Page 4-2
4.3 Calculating 4-D to 3-D Projections
To project the original 4-D geometry onto 3-space, an imaginary
viewscreen (which is a three-dimensional hyperplane) and an imaginary
viewpoint must be positioned in hyperspace. The HYPERGEO program uses
the so-called "radius" of the hyperobject to determine where the
viewscreen and viewpoint are located. The radius of the hyperobject is
the maximum four-dimensional distance from the origin of all of the
object's vertex points. The viewscreen is positioned at a distance
equal to the hyperobject's radius along the negative W-axis and normal
(or "hypernormal") to that axis. The viewpoint is located at a distance
equal to 1.5 times the radius along the negative W-axis.
This arrangement produces properly sized images with a reasonable
measure of 4-D "hyperperspective" if the configuration of vertex points
in the geometry definition is more or less symmetrical in hyperspace
about the origin. Ideally, the geometry specification should be
perfectly symmetrical, with all vertex points lying on the surface of a
hypersphere centered on the origin. This is possible with the regular
four-dimensional "polytopes". (A polytope is the extra-dimensional
equivalent of a 3-D polyhedron; a regular four-dimensional polytope has
hyperfaces that are all identical polyhedra and that all adjoin one
another across identical polygonal faces at identical angles.)
HYPERGEO Version 1.1 Page 5-1
Section 5. Restrictions and Limitations
5.1 Geometry Definition File
The database maintained by the HYPERGEO program is dynamically allocated
and expands to fit the size of the geometry being handled so there are
no precise and absolute capacity limits on how big and complicated an
object may be. The ultimate barrier is the 640K limit of available
memory under DOS. Although I have not done the actual experiment, my
guess is that the two largest regular four-dimensional polytopes, with
120 and 600 hyperfaces respectively (and as many as 1200 edges and
faces), would far overwhelm HYPERGEO and DOS with their memory
allocation requirements. (In any event, if, through some miracle, those
geometries could be made to fit in memory, the computations involved in
their topological analysis and 3-D image generation would be so
prolonged as to reduce the program's responsiveness to a state that
could only be described as "glacier-like".)
For more reasonably sized geometries, the most important restriction is
that all 4-D hyperobjects must be "simple" and externally convex.
(Simple means the object must be solid without any holes passing through
it.) For 3-D geometries, the requirement that the object be externally
convex is removed, but it must still be a simple polyhedron, and all its
faces must be simple polygons without internal edges.
As mentioned above, HYPERGEO performs some checking on the topological
correctness of the input geometry. However, to be truthful, this
checking is not very comprehensive; it can certainly fail to detect some
errors in the input, and when it does find errors, the messages issued
are not as helpful as could be wished in pinpointing the problem. I am
sure that it would be possible to get the program to misbehave quite
seriously, including hanging or crashing, by feeding it pernicious input
data. Therefore, until a future version of the program possesses
improvements in this regard, the user must take some pains to insure
that all new geometry definition files are created carefully and
accurately. If the program crashes upon startup, consider that to be a
very loud, broadband error message, and check the geometry file closely.
(However, HYPERGEO is not totally deficient in this regard, and it will
issue error messages when certain problems are detected. A geometry
definition file with only a handful of conventional errors will be
handled adequately.)
HYPERGEO Version 1.1 Page 5-2
5.2 Mathematical Precision
All calculations in HYPERGEO are performed using double precision
floating-point arithmetic. The double precision word length is 64 bits
which provides about fifteen decimal digits of accuracy. Any
floating-point values given to the program (such as coordinates in the
geometry definition file or scale ratio in the configuration file) may
usefully contain up to fifteen digits.
HYPERGEO Version 1.1 Page 6-1
Section 6. Supplied Geometry Definition Files
The HYPERGEO program comes with several "ready-to-run" geometry
definition files, including both 4-D and 3-D objects. These files
include four of the six regular four-dimensional polytopes and all five
of the three-dimensional regular polyhedra. (As indicated above, the
remaining two regular 4-D polytopes are almost certainly too big and
complex to fit in HYPERGEO under DOS; they also are too far beyond my
powers of hypergeometric comprehension to capture in a HYPERGEO input
file.)
All of the supplied geometry definition files have the file extension
.GEO, and the root portion of the file name corresponds to the name of
the geometric object contained in the file (with some abbreviations as
required by DOS file name length limits). The regular four-dimensional
polytopes are in the files:
File Name Vertexes Edges Faces Hyperfaces
------------ -------- ----- ----- ----------
5CELL.GEO 5 10 10 5
HYPRCUBE.GEO 16 32 24 8
16CELL.GEO 8 24 32 16
24CELL.GEO 24 96 96 24
Note that the polytope names are of the form 'N-cell' where N is the
number of hyperfaces. Also, the hypercube, technically and to be
consistent, could be called the 8-cell (just as the cube could be called
a 'hexahedron' and the square a 'tetragon'). The two 4-D regular
polytopes that aren't included here are the 120-cell and the 600-cell.
(Note: The 24-cell can be quite slow to read in and to display using
hidden-line and solid modes.)
HYPERGEO Version 1.1 Page 6-2
For three dimensions, all of the regular polyhedra names except "cube"
are of the form '<prefix>hedron' where <prefix> is the Greek numeral
indicating the number of faces: tetrahedron, octahedron, dodecahedron,
and icosahedron. The HYPERGEO geometry definition file names are formed
from just the prefix without the base 'hedron':
File Name Vertexes Edges Faces
------------ -------- ----- -----
TETRA.GEO 4 6 4
CUBE.GEO 8 12 6
OCTA.GEO 6 12 8
DODECA.GEO 20 30 12
ICOSA.GEO 12 30 20
In addition to the regular polytopes and polyhedra, the following
geometry definition files are also included:
File Name Dimensions Geometrical Object
------------ ---------- -----------------------------------
BLOCKS.GEO 3 A three-dimensional cross formed by
stacking cubes along each of the three
coordinate dimensions.
STELLA.GEO 3 The "stella octangula", an interesting
polyhedron formed by merging two 3-D
tetrahedra.
HG.GEO 3 A shape that forms the HYPERGEO logo by
presenting the outline of the letter 'H'
when viewed from two of the three
orthogonal directions and the outline of
the letter 'G' when viewed from the
third. (Note: This geometry can be
quite slow to read in, and is very slow
for hidden-line and solid display modes
- although the results are attractive.)
HYPERGEO Version 1.1 Page 6-3
HYTETRA.GEO 4 These four objects are "hyperprisms"
HYOCTA.GEO 4 derived from the 3-D regular polyhedra
HYDODECA.GEO 4 contained in their names. A hyperprism
HYICOSA.GEO 4 is formed by positioning two 3-D objects
in hyperspace at a given separation
along the W-axis and connecting each of
the pairs of corresponding points
between the two objects. The resulting
hyperobject has two hyperfaces that are
the same shape as the base 3-D object
plus an additional number of hyperfaces
equal to the number of faces in the base
3-D object. These additional hyperfaces
are 3-D prisms whose end faces are the
same polygonal shape as the faces of the
base 3-D object. Thus, for example, the
HYTETRA.GEO hyperobject is based on the
3-D tetrahedron; it has two hyperfaces
that are tetrahedra and four hyperfaces
that are prisms with triangular end
faces. (Note: Technically the hypercube
is itself a hyperprism - one based on
the cube - but since it is also one of
the regular 4-D polytopes, it is not
included in this series.)
HYPERGEO Version 1.1 Page A-1
Appendix A. Geometry Definition File
This appendix describes the format of the geometry definition file.
This file is the primary input to the HYPERGEO program. It specifies
the topology and dimensions of the geometrical object to be displayed.
In particular, the file contains the coordinate values for all vertex
points of the object plus connectivity information that indicates which
vertexes are joined by edges.
The geometry definition file is an ordinary text file that can be edited
using any available text editor. It is read by the HYPERGEO program a
line at a time; each line comprises one complete data record, and there
is no way to continue data across multiple lines. The maximum length of
a line is 255 characters.
The geometry definition file can contain notes and comments that are not
part of the data read by the program, but serve as human-readable
annotation. This is indicated by preceding any such comments with the
character '!'. HYPERGEO ignores any '!' character plus whatever follows
it on the same line. If the first character on a line is a '!', the
entire line is skipped by the program. If the '!' character appears
following some data on a line, that data is read by the program, but
everything after the '!' is ignored.
The geometry definition file can contain any number of blank lines,
which are ignored. A line which contains only comment text is
considered by the program to be a blank line.
Every geometry definition file must begin with two particular data
lines. The first contains a single integer value which is the number of
dimensions of the geometric object; this number must be either 3 or 4.
The second line contains a single integer that is the number of vertex
points in the geometry. Following these two lines, there must be one
line with point data for each vertex point.
Each point data line contains the coordinate and connectivity
information for a single vertex point. Its format is:
n: x.x y.y z.z [w.w] p1 p2 p3 [... pN]
where 'n' is the sequence number of the point data line; 'x.x', 'y.y',
'z.z', and 'w.w' are the X, Y, Z, and W coordinates of the point; and
'p1' through 'pN' are the sequence numbers of all other points connected
to this point by edges.
Each point's sequence number serves to identify the point within the
file. It is the number used in the connection lists, and it is also the
number used to refer to the point in any error messages that may be
issued. All point sequence numbers are integers, and they must be in
HYPERGEO Version 1.1 Page A-2
ascending order within the file; the first point data line must have
sequence number 1, and the last point data line must have a sequence
number equal to the total number of vertex points in the object.
The coordinate values are floating-point numbers and may contain an
optional decimal point and fractional digits. They may also contain a
decimal exponent in standard scientific notation format. The coordinate
values may be in any units desired; the program always scales the final
display to fit the screen. The W coordinate must be specified for a
four-dimensional geometry and must not be specified for a
three-dimensional one.
The list of connected points contains the sequence numbers of all points
connected to the point described by the given data line. Connection
information must be symmetrical, that is, if point A is in point B's
connection list, point B must also be in point A's connection list. It
is an error for a point to be in its own connection list. Unlike the
coordinate values, the program has no way of knowing how many
connections should exist for each point and hence cannot directly report
an error if there are too few or too many. Therefore, it is incumbent
upon the user to construct these lists with some care.
Except for the ':' that must follow the sequence number, no punctuation
is used to separate the data values, just one or more spaces.
Following all point data, the geometry definition file may optionally
contain configuration information. If it appears, it must consist of
statements that are identical in format to the primary configuration
file (see Appendix B). Configuration parameters specified in a geometry
definition file override corresponding parameters set in the primary
configuration file, but they remain in effect only while that geometry
definition file is active in the HYPERGEO program.
Note: There is no formal delimiter that marks the end of the geometry
data and the start of configuration data in a geometry definition file.
The program expects to find a number of point data lines equal to the
total number of vertex points as specified on the second data line of
the file. Any non-comment lines found in the file after that number of
point data lines have been read are assumed to be configuration data.
This can lead to some very long and confusing error reports if the
number of point data lines is not correct.
HYPERGEO Version 1.1 Page B-1
Appendix B. Configuration File
This appendix describes the format of the HYPERGEO configuration file.
This file allows the user to set a number of parameters that control
various aspects of the program's performance. The file is read once
upon start-up of the program, and is reread each time a new geometry
definition file is entered.
In addition to the configuration file, similar configuration information
may also be contained in any geometry definition file. The format is
the same in both places, but the parameter specifications in the geometry
definition file override those in the primary configuration file;
however, they are in effect only while that geometry file is active in
the program (see Appendix A).
A command line argument exists that allows the user to specify the name
of the particular primary configuration file to use. This permits
multiple configuration files to exist and to be selected as desired for
different executions of HYPERGEO. If no configuration file name is
specified via a command line argument, the program tries to open one
called HYPERGEO.CFG. It is not an error if this default configuration
file cannot be opened, but it is a fatal error if a configuration file
whose name is specified by the command line argument cannot be opened.
The configuration file is an ordinary text file that can be edited using
any available text editor. It is read by the HYPERGEO program a line at
a time; each line comprises one complete data record, and there is no
way to continue data across multiple lines. The maximum length of a
line is 127 characters.
The configuration file can contain notes and comments that are not part
of the data read by the program, but serve as human-readable annotation.
This is indicated by preceding any such comments with the character '!'.
HYPERGEO ignores any '!' character plus whatever follows it on the same
line. If the first character on a line is a '!', the entire line is
skipped by the program. If the '!' character appears following some
data on a line, that data is read by the program, but everything after
the '!' is ignored.
The configuration file can contain any number of blank lines, which are
ignored. A line which contains only comment text is considered by the
program to be a blank line.
Each data line in the configuration file contains a single parameter
definition. The format of each line is simply the key word identifying
the parameter followed by whatever data values the particular parameter
requires. No punctuation should be used; all parameters and values
should be separated by one or more spaces.
HYPERGEO Version 1.1 Page B-2
The case of letters used in the configuration file does not matter, so
lower or upper case (or both) can be used as desired. However, the
program is absolutely unforgiving about spelling; all parameter key
words must be spelled exactly as they are shown in this document - no
abbreviations, no hyphens instead of underscores, no near misses.
Most parameters take a single data value, either a number or another key
word. Some parameters take a sequence of several numeric values, and
some take no value at all. Numeric values that are inherently integral
must be entered as pure integers. Where floating-point values are
appropriate, the data item may include a decimal point and fractional
digits as well as an exponent in scientific notation.
Errors encountered by the program while trying to read a configuration
file (or configuration data in a geometry definition file) are reported
in a message window. All configuration file errors are fatal and
terminate the program after the error message window is dismissed.
The following is a list of all parameters that may be specified in the
HYPERGEO configuration file or a geometry definition file:
Parameter: COLOR
COLOR_BACKGROUND
COLOR_VECTOR
COLOR_MENU
COLOR_MESSAGE_BACKGROUND
COLOR_MESSAGE_TEXT
COLOR_HELP_BACKGROUND
COLOR_HELP_TEXT
Value: A color name chosen from the sixteen standard EGA colors.
The possible colors are:
BLACK
BLUE
GREEN
CYAN
RED
MAGENTA
BROWN
LIGHTGRAY
DARKGRAY
LIGHTBLUE
LIGHTGREEN
LIGHTCYAN
LIGHTRED
LIGHTMAGENTA
YELLOW
WHITE
HYPERGEO Version 1.1 Page B-3
Use: These eight parameters set the colors used for each of the
component parts of the HYPERGEO display:
COLOR - Primary geometry graphics plus the transient
text values in the menu area
COLOR_BACKGROUND - Screen background
COLOR_VECTOR - Unit axis vectors
COLOR_MENU - Outlines and fixed labels in menu area plus
the mouse control pad; also the geometry file name
COLOR_MESSAGE_BACKGROUND - Background color for all
message and prompting windows
COLOR_MESSAGE_TEXT - Text color for all message and
prompting windows
COLOR_HELP_BACKGROUND - Background color of the on-line
help screen
COLOR_HELP_TEXT - Text color of the on-line help screen
The screen background color should be a dark color (BLACK or
DARKGRAY) if the stereoscopic anaglyph mode of display is to
be used.
Default: COLOR WHITE
COLOR_BACKGROUND DARKGRAY
COLOR_VECTOR CYAN
COLOR_MENU YELLOW
COLOR_MESSAGE_BACKGROUND BROWN
COLOR_MESSAGE_TEXT WHITE
COLOR_HELP_BACKGROUND LIGHTGRAY
COLOR_HELP_TEXT BLACK
HYPERGEO Version 1.1 Page B-4
Parameter: COLOR_SOLID
Value: A red/green/blue color specification in the form of three
integers each in the range 0 to 63. The integers should be
entered without punctuation, separated by spaces.
Use: On VGA color systems, defines the colors to be used for
surface rendering in solid display mode.
For solid surface rendering the program uses eight shades of
graduated intensity based on the same color. The shades
range from light to dark and are used to represent the
varying degrees of illumination received by the different
faces of the object from a theoretical light source.
The color specified by the COLOR_SOLID parameter defines the
lightest of the eight shades; the program creates the
remaining seven to be increasingly dark variations.
Therefore, the color specified should be fairly light, that
is, have relatively high values for the red, green, and blue
color components.
Note: This parameter is only meaningful on systems with VGA
color graphics.
Default: 53 63 43
This defines a light, slightly grayish green. It produces a
spectrum of eight shades that range through medium
gray-greens down to a dark, evergreen green.
Parameter: DELTA_W
Value: numeric value (floating-point)
Use: Specifies the incremental step amount used to modify the W
intersection value during execution of the HYPERGEO command
for translation of the intersection hyperplane (Page Up/Page
Down - see the section on Interactive Commands below). This
value is in the units of the geometry definition.
Because this parameter is in units that pertain to a
particular geometry definition, it is most useful in a
geometry definition file; however, it may be specified in
the primary configuration file.
Default: 0.05 times the span of the geometrical object. The "span"
is the greatest extent of the object in any one of its three
or four dimensions.
HYPERGEO Version 1.1 Page B-5
Parameter: DISPLAY_INFO
Value: One of: OFF
ON
Use: Specifies whether or not the HYPERGEO information window
should be displayed automatically at program start up and
whenever a new geometry definition file is entered.
Default: ON
Parameter: DISPLAY_MENU
DISPLAY_NAME
DISPLAY_VECTOR
Value: One of: OFF
ON
Use: Specifies whether a particular component of the HYPERGEO
display will be drawn.
DISPLAY_MENU controls the display of the menu area which
occupies the right edge of the screen. If display of the
menu area is specified OFF, the entire screen is used for
the primary geometry graphics (in this state, the mouse
functions are not available).
DISPLAY_NAME controls the display of the name of the
geometry definition file; if ON, the name will be displayed
at the upper, left corner of the screen.
DISPLAY_VECTOR controls the display of the coordinate axis
vectors. The axis vectors are displayed as dotted lines in
the primary graphics; each vector is labelled with the name
of its axis, X, Y, Z, or W.
Note: Regardless of the DISPLAY_VECTOR setting, the axis
vectors are not displayed in hidden-line or solid display
mode.
Default: DISPLAY_MENU ON
DISPLAY_NAME ON
DISPLAY_VECTOR OFF
HYPERGEO Version 1.1 Page B-6
Parameter: DISPLAY_MODE
Value: One of: ANAGLYPH
HIDDEN_LINE
ORTHOGRAPHIC
PERSPECTIVE
SOLID
Use: Specifies the display mode used to draw the primary geometry
graphics.
Note: The HIDDEN_LINE and SOLID modes cannot be used with
4-D to 3-D projections (only intersections). If they are
specified together with the PROJECTION parameter (see
below), a warning message will be issued, and the program
will revert to PERSPECTIVE mode.
Default: PERSPECTIVE
Parameter: EPSILON
Value: numeric value (floating-point)
Use: Specifies a small value to be used as an effective zero in
all floating-point comparisons required by the program's
calculations.
This value is unitless; all calculations are performed
internally on normalized coordinates.
Default: 1.0E-8
Note: The performance of some of the algorithms used in
hidden-line and solid surface displays is very sensitive to
this value. The default was set after much experimentation
and appears to provide reliable behavior almost all of the
time. The user fiddles with this value at his own risk.
HYPERGEO Version 1.1 Page B-7
Parameter: EYE_DISTANCE
Value: numeric value (floating-point)
Use: Specifies the viewing distance, that is, the distance
between the eye and the display screen. This value is in
inches. It determines the degree of perceived perspective
in the various display modes. For greatest realism, it
should be set to accurately reflect the true eye-to-screen
distance for the user's normal viewing position.
Decreasing the EYE_DISTANCE enhances the perspective effect,
which can be useful. However, the EYE_DISTANCE should never
be reduced to the point that the viewpoint appears to enter
the object; this cause the graphics to become distorted and
meaningless.
Default: 30.0
Parameter: EYE_SEPARATION
Value: numeric value (floating-point)
Use: Specifies the distance in inches between the viewer's eyes.
This value is used in the perspective calculations required
for the separate left- and right-eye images of the
stereoscopic anaglyph display.
Default: 2.5
Note: This default value should be entirely acceptable for
all users save those with close relatives residing in remote
upper reaches of the Himalayas.
HYPERGEO Version 1.1 Page B-8
Parameter: INTERSECTION
Value: None
Use: Causes HYPERGEO to use the intersection mode of 4-D to 3-D
reduction (rather than projection mode).
The INTERSECTION parameter is meaningless for
three-dimensional geometries.
INTERSECTION and PROJECTION (see below) are mutually
exclusive alternatives; if both appear in configuration file
data, the final one encountered will take precedence.
Default: By default HYPERGEO uses intersection mode for 4-D to 3-D
reductions.
Parameter: ORIGIN
Value: Coordinate values as a sequence of three (for 3-D) or four
(for 4-D) floating-point numbers. Values should be entered
without delimiting punctuation, using only spaces as
separation.
Use: Permits translating the geometry along any (or all) of the
coordinate axes. The coordinate values specified define the
new origin which is to be used by HYPERGEO as a centerpoint
for all rotations.
The ORIGIN parameter may only be used in configuration data
appearing within a geometry definition file; it may not be
used in the primary configuration file. This is because the
validity of the origin coordinates - in terms of their
number and the units they are in - depends on the associated
geometry definition. Also, the translation is applied
dynamically to the geometry point definitions as they are
read in.
The ORIGIN coordinate values are in the same units as the
original vertex point coordinates in the geometry definition
file.
Default: The origin is assumed to be (0,0,0) for 3-D and (0,0,0,0)
for 4-D geometries.
HYPERGEO Version 1.1 Page B-9
Parameter: PROJECTION
Value: None
Use: Causes HYPERGEO to use the projection mode of 4-D to 3-D
reduction (rather than intersection mode).
The PROJECTION parameter is meaningless for
three-dimensional geometries.
PROJECTION and INTERSECTION (see above) are mutually
exclusive alternatives; if both appear in configuration file
data, the final one encountered will take precedence.
Default: By default HYPERGEO uses intersection mode for 4-D to 3-D
reductions.
Parameter: RATIO
Value: numeric value (floating-point)
Use: Specifies the scale ratio at which the display is drawn.
The units of this value are: geometry units per screen inch.
Because this parameter is in units that pertain to a
particular geometry definition, it is most useful in a
geometry definition file; however, it may be specified in
the primary configuration file.
Default: Autoscale: the display is scaled to fit comfortably within
the primary graphics area allowing ample room for rotations.
HYPERGEO Version 1.1 Page B-10
Parameter: SCREEN_HEIGHT
SCREEN_WIDTH
Value: numeric value (floating-point)
Use: These two parameters specify the vertical and horizontal
size in inches of the actual area on the display screen in
which graphics are drawn. They can best be determined for a
particular monitor by simply using a ruler to measure the
height and width of the displayed area on the face of the
screen.
The precise accuracy of these parameters isn't critical, but
they are useful to insure that the program's display scale
is consistent between the horizontal and vertical
directions (so that squares look square and not rectangular,
for example).
Default: SCREEN_HEIGHT 6.0
SCREEN_WIDTH 8.0
Note: These default values are about right for the typical
12-inch monitor.
HYPERGEO Version 1.1 Page B-11
Parameter: SOLID_FILL
Value: One of: COLOR
PATTERN
Use: Specifies whether to use color or pattern for surface
rendering in solid display mode.
Solid surface rendering that uses color displays the faces
of the object with varying levels of color brightness to
indicate how they are illuminated by a theoretical light
source. If pattern is used instead, the same effect is
achieved by varying the density of fill (displayed with a
single color) used to render the object's solid faces.
If color is used, the COLOR_SOLID shades (see above) are
used for VGA graphics, and a set of eight pre-programmed
colors are used for EGA graphics.
If pattern is used, it is displayed using the color
specified for the primary geometry graphics.
Note: This parameter is only meaningful on systems with
color graphics capability (EGA or VGA); on monochrome
systems, PATTERN is always used.
Default: COLOR (for EGA and VGA color systems)
PATTERN (for monochrome systems)
Parameter: TURN
Value: numeric value (floating-point)
Use: Specifies the incremental step angle used by all interactive
rotation commands. This value is specified in degrees.
Default: 5.0
HYPERGEO Version 1.1 Page B-12
Parameter: VECTOR_LENGTH
Value: numeric value (floating-point)
Use: Specifies the length in screen inches of the unit axis
vectors which may optionally be displayed as part of the
primary geometry graphics (see DISPLAY_VECTOR above). The
VECTOR_LENGTH is the length an axis vector appears on the
screen when it is situated parallel to the XY-plane. As the
object is rotated, the various axis vectors will appear to
rotate with it and become visibly shorter as they assume
different oblique orientations.
Default: 1.0
Parameter: W_INTER
Value: One of: CENTERED
numeric value (floating-point)
Use: Specifies the W-coordinate value at which a four-dimensional
hyperobject will be "sliced" when using 4-D to 3-D
intersection mode (that is, the value 'k' in the equation,
w = k, of the intersecting hyperplane). If a numeric value
is specified, it should be in the same units as the geometry
definition.
When CENTERED is specified, the program automatically
calculates the W value to use as the average of the minimum
and maximum of all W coordinate values in the geometry
definition. This slices the hyperobject more or less down
the middle.
Because this parameter is in units that pertain to a
particular geometry definition, it is most useful in a
geometry definition file; however, it may be specified in
the primary configuration file.
Default: CENTERED
HYPERGEO Version 1.1 Page B-13
The following is an example of a HYPERGEO configuration file:
! Example HYPERGEO Configuration File
!
PROJECTION ! change from default Intersection
Color_Background Black
Color_Vector LightMagenta ! very vivid
COLOR_SOLID 63 53 43 ! flesh tone - produces darker
! shades that range through cocoa
! on down to dark reddish-brown
display_vector on
vector_length 2.0 ! up from default 1 inch
TURN 45 ! big angle for fast rotations
DISPLAY_MODE anaglyph ! start up in 3-D graphics mode
HYPERGEO Version 1.1 Page C-1
Appendix C. Command Line Arguments
The HYPERGEO command line consists of the name of the program's
executable file, HYPERGEO.EXE, followed optionally by additional
parameters that are passed to the program. This additional text is used
to transmit control specifications to the HYPERGEO program. Parameters
passed to a program in this manner are called command line arguments.
Note: Normally the .EXE extension is not typed when the program is being
executed since DOS knows it without being told.
The HYPERGEO program accepts a number of command line arguments that can
be used to control the behavior of the program. Many of the command
line arguments perform a function identical to parameters that can be
specified in the HYPERGEO configuration file. Whenever a command line
argument and a configuration file parameter are in conflict, the command
line argument takes precedence. Furthermore, the command line
specifications will continue to override configuration parameters that
might be contained in any new geometry definition files that are read
into the program interactively.
Each command line argument consists of a single key letter that is
entered on the HYPERGEO command line. The key letters should be typed
on the command line with a preceding hyphen, for example,
HYPERGEO -a
Multiple arguments can either be strung together following a single
hyphen or typed separately preceded by individual hyphens; thus,
HYPERGEO -aIv
and
HYPERGEO -a -I -v
are equivalent.
Several arguments are flags indicating that a file name follows them
immediately on the command line. For these arguments, there must be no
other argument letters following them before the file name. There may,
however, be one or more (or no) spaces between the flag letter and the
file name.
In all instances, the case (lower or upper) of the key letter is
significant. A number of arguments use the two cases of the same letter
to mean opposite settings of a single parameter. All arguments that use
only one case of a letter require it to be lower-case; it will be
rejected as an error if typed in upper-case.
HYPERGEO Version 1.1 Page C-2
(Confession: The standard notation of using a hyphen to prefix command
line argument letters is styled after the Unix convention. HYPERGEO
follows this usage, and hyphens will always work. However, to be
candid, the arguments will also be handled correctly if preceded by a
slash ('/', NOT a back-slash) or by nothing at all. The only possible
source of confusion is with file names appearing in the command line,
but as long as all file names are always correctly and immediately
preceded by their flag argument, the hyphen (or slash) prefix is
superfluous and can be dispensed with.)
Most arguments perform an independent function and can be used in any
desired combination with other arguments. However, five of the
arguments serve to set the value of a single parameter, the 3-D graphic
display mode, and they are mutually exclusive. These arguments are -a,
-h, -o, -p, and -s; if more than one of them appears in a HYPERGEO
command line, the one typed last takes effect.
The following is a list of all command line arguments for the HYPERGEO
program:
Argument: -a
Use: Selects the stereoscopic anaglyph mode of display.
This argument is mutually exclusive with -h, -o, -p, and -s.
Default: Perspective display mode.
Argument: -b
Use: Instructs HYPERGEO to create all graphics in black and white
even if the graphics display device supports color. This
can be useful when a monochrome monitor is connected to a
color graphics controller card.
With black and white graphics the stereoscopic anaglyph mode
is unavailable, and solid surface fill always uses patterns.
Default: Color if graphics device supports it, else monochrome.
HYPERGEO Version 1.1 Page C-3
Argument: -c
Use: Specifies the name of a HYPERGEO configuration file to use.
The argument letter must be followed on the command line by
the file name, with no other arguments intervening. The
file name can contain full DOS path information; if there is
no path specified, it is assumed to exist in the current
directory. If the file name specification has no extension,
it is assumed to have the extension .CFG.
If this argument is used and the specified file cannot be
opened, it is a fatal error and HYPERGEO terminates. It is
not an error, however, if the default configuration file
cannot be opened.
Default: HYPERGEO.CFG in current directory
Argument: -f
Use: Specifies the name of a HYPERGEO geometry definition file to
use. The argument letter must be followed on the command
line by the file name, with no other arguments intervening.
The file name can contain full DOS path information; if
there is no path specified, it is assumed to exist in the
current directory. If the file name specification has no
extension, it is assumed to have the extension .GEO.
If either the geometry file specified by this argument or
the default geometry file cannot be opened, it is a fatal
error and HYPERGEO terminates.
Default: HYPRCUBE.GEO in current directory
This is the standard four-dimensional hypercube.
Argument: -g/-G
Use: Selects the method for reducing the 4-D geometry to a 3-D
image for display. The lower-case argument, -g, selects
intersection mode, and the upper-case argument, -G, selects
projection mode.
Default: Intersection mode
HYPERGEO Version 1.1 Page C-4
Argument: -h
Use: Selects the hidden-line mode of 3-D display.
This argument is mutually exclusive with -a, -o, -p, and -s.
Also, hidden-line display mode cannot be used with 4-D
projections. If this argument is used together with the -G
argument, a warning message is issued and the program starts
up in perspective display mode.
Default: Perspective display mode.
Argument: -i/-I
Use: Specifies whether or not to display the special HYPERGEO
information window automatically upon program start up and
whenever a new geometry definition file is read. The
lower-case argument, -i, selects automatic display, and the
upper-case argument, -I, deactivates it.
Default: The information window is automatically displayed.
Argument: -m/-M
Use: Specifies whether or not to display the menu area along the
right edge of the screen. The menu area lists a number of
parameters that describe the current display and that can be
modified interactively within the HYPERGEO program. It also
contains a mouse control pad area which allows the mouse to
be used for controlling rotations of the geometry. If the
menu area is not displayed, the primary geometry graphics
use the entire screen area; the mouse may not be used
without the display of the menu area.
The lower-case argument, -m, selects display of the menu
area, while the upper-case argument, -M, causes the menu not
to be displayed.
Default: The menu area is displayed.
HYPERGEO Version 1.1 Page C-5
Argument: -n/-N
Use: Specifies whether or not to display the name of the geometry
definition file in the upper, left corner of the graphics
display.
The lower-case argument, -n, selects display of the file
name, while the upper-case argument, -N, causes the name not
to be displayed.
Default: The geometry definition file name is displayed.
Argument: -o
Use: Selects the orthographic mode of 3-D display.
This argument is mutually exclusive with -a, -h, -p, and -s.
Default: Perspective display mode is used.
Argument: -p
Use: Selects perspective display mode.
This argument is mutually exclusive with -a, -h, -o, and -s.
Default: Perspective display mode.
Argument: -s
Use: Selects solid display mode.
This argument is mutually exclusive with -a, -h, -o, and -p.
Also, solid display mode cannot be used with 4-D
projections. If this argument is used together with the -G
argument, a warning message is issued and the program starts
up in perspective display mode.
Default: Perspective display mode.
HYPERGEO Version 1.1 Page C-6
Argument: -v/-V
Use: Specifies whether or not to display the unit axis vectors
along with the primary geometry graphics.
The lower-case argument, -v, selects display of the axis
vectors, while the upper-case argument, -V, causes the axis
vectors not to be displayed.
Note: Regardless of the setting of this option, the axis
vectors are never displayed in hidden-line or solid display
mode.
Default: The unit axis vectors are not displayed.
Argument: -?
Use: Prints to the screen a description of the appropriate syntax
and usage of these command line arguments and terminates the
HYPERGEO program.
Default: No syntax description is printed.
The following is an example of a HYPERGEO command line:
HYPERGEO -f cube -cc:\configs\special.dat -Gav -I
This command invokes the following command line argument functions:
* Use the geometry definition file CUBE.GEO located in the current
directory
* Use the configuration file SPECIAL.DAT located in the directory
C:\CONFIGS\
* Use projection mode for reducing the 4-D geometry to a 3-D image
* Use stereoscopic anaglyph display mode for the 3-D image
* Display the unit axis vectors
* Deactivate the automatic display of the HYPERGEO information
window
HYPERGEO Version 1.1 Page D-1
Appendix D. Interactive Commands
When the HYPERGEO program is executed, it accepts any command line
arguments, reads in the appropriate configuration file (if any) and
geometry definition file, and generates the initial display of the
geometric object. From that point on, the program remains responsive to
a set of interactive commands which enable the user to manipulate the
orientation of the object and to modify the various parameters that
control the manner in which the display is generated. Many of these
interactive commands affect the same parameters that can be initially
set through the configuration file and command line arguments.
All interactive commands are invoked using either the keyboard or the
mouse. The mouse (if the system has one) provides an alternative means
for invoking the commands for rotation of the object; if there is no
mouse, keyboard commands can be used to perform the same functions.
(Also, if the menu area is not displayed, the mouse cannot be used, and
the keyboard equivalents must be similarly resorted to in its stead.)
D.1 Keyboard Commands and the Modifier Keys
The keyboard commands consist of either a single keystroke or a single
keystroke accompanied by the simultaneous pressing of one of the
standard keyboard modifier keys: Shift, Ctrl, or Alt. These modifier
keys are only used with some of the interactive commands, and in all
cases they have a consistent meaning:
Shift - Used with keystrokes that invoke the various rotations; it
causes the direction of rotation to be reversed, that is,
to be equivalent to a negative turn angle.
Note: For all command keystrokes that are letters, if
the Shift key has no special meaning for that command, the
command may be entered equivalently in either lower or
upper case. Only three letter commands (X, Y, and Z) have
special Shift-modified meanings.
Ctrl - Used with keystrokes for the rotation commands plus the
command for translating the intersecting hyperplane along
the W-axis in hyperspace; causes the command action to be
repeated continuously as fast as the computer's processing
speed will allow. This "command automation" is stopped by
pressing any key.
In the case of the hyperplane translation command, the
automated motion is automatically reversed in direction
each time the intersecting hyperplane reaches an extreme
HYPERGEO Version 1.1 Page D-2
of the hyperobject. This causes the hyperplane to move
continuously back and forth through the entire body of the
hyperobject.
Alt - Used with keystrokes for the rotation commands; has the
same "command automation" effect as the Ctrl modifier
except the rotation is in the reverse direction. The
continuous, automated rotation is stopped by pressing any
key.
D.2 Mouse Selected Interactive Commands
When the mouse is used to invoke a rotation command, no special
modifiers are necessary since the action of the mouse buttons provides
the equivalent control. A rotation command can be invoked with the
mouse (whenever the HYPERGEO menu area is displayed) by moving the mouse
so the cursor is over the selection box labeled with the coordinate
letters indicating the desired axis or plane of rotation; this will
highlight the selection box. To begin the rotation, press the left or
right mouse button; the right mouse button causes a rotation in the
positive direction, and the left mouse button rotates the object in the
negative direction. The rotation will continue as long as the mouse
button remains pressed. A single incremental rotation can be achieved
by quickly clicking and releasing the mouse button.
There are nine rotation command selection boxes in the HYPERGEO menu
area, divided into two sections: 3-D axial rotations, and 4-D planar
rotations. All nine are available for 4-D geometries, but only the
three 3-D rotations can be selected when the input geometry is
three-dimensional. The 4-D rotation selection boxes are labeled with
the letters of the two coordinates specifying the plane of the rotation;
thus, selecting the box labeled "XY" initiates a rotation in hyperspace
of the XY-plane. The 3-D rotation selection boxes are labeled with the
single letter of the axis around which the rotation occurs: X, Y, or Z.
If your system has no mouse or if the menu area isn't displayed (or if
you simply prefer to use the keyboard), there is an equivalent keyboard
command for each of the nine mouse rotations:
Keystroke Mouse Selection Box Label
--------- -------------------------
X X
Y Y
Z Z
F1 YZ
F2 XW
F3 XZ
F4 YW
F5 XY
F6 ZW
HYPERGEO Version 1.1 Page D-3
The keystrokes F1, F3, and F5 correspond to the YZ, XZ, and XY 4-D
planar rotations. Note that these are the three rotations that occupy
the top row of the six 4-D rotation selection boxes and that they are
the 4-D rotations that don't involve the W coordinate. These three
rotations produce the same visual effect in the geometry display as the
three 3-D rotations whose selection boxes are directly above them in the
menu area: X, Y, and Z.
The keystrokes F2, F4, and F6 correspond to the three 4-D rotations that
do involve the W coordinate: the XW, YW, and ZW planar rotations. These
are the 4-D rotations that occupy the bottom row of selection boxes
within the menu area. They do not correspond in effect to any of the
3-D rotations.
D.3 Interactive Parameter Specification
Some of the interactive commands prompt for the input of a value to be
assigned to a program parameter. This value is generally either a
numeric quantity, a file name, or a particular key word. The input is
requested from the user via a prompting window which pops up in the
primary graphics area when the command is executed. The prompting
window contains an entry line in which the user's typed response
is echoed. After typing in the appropriate value, the user should
indicate that the entry is complete and correct by pressing <Enter>;
this will cause the command to accept the typed in value for the given
parameter. A prompting window may be cancelled at any time by pressing
<Esc>; this aborts the command that caused the prompting window to
appear.
Prompts that accept character input - either key words or file names -
are case insensitive; upper or lower case may be used as desired.
Numeric values may be either integers or floating-point numbers
depending upon the context of the command. If a floating-point number
is appropriate, it may be entered with an optional decimal point and
fractional digits and may include an optional decimal exponent in
scientific notation.
If the user's entry in a prompting window is invalid, an error message
window will appear. Like all HYPERGEO message windows, it can be
dismissed by pressing any key. All errors resulting from incorrect
input to interactive parameter prompts are non-fatal; the program will
continue running, ready for the next interactive command, once the
message window is dismissed.
HYPERGEO Version 1.1 Page D-4
D.4 HYPERGEO Interactive Keyboard Commands
The following is a list of all HYPERGEO interactive commands that can be
entered from the keyboard while the program is displaying an active
geometry:
Keystroke: ?
Use: Displays the on-line help screen. This screen contains a
brief description of the interactive commands available
within the HYPERGEO program (that is, the contents of this
Appendix).
The on-line help screen can be dismissed by pressing any
key. This returns the program to the graphics state it was
in prior to the '?' command.
Keystroke: A
Use: Selects the stereoscopic anaglyph mode of display.
If the program is operating with monochrome graphics, the
stereoscopic anaglyph display cannot be used; a message
window will appear indicating this, and the current display
mode will not be changed.
HYPERGEO Version 1.1 Page D-5
Keystroke: C
Use: Accepts a new color specification for drawing the primary
graphics.
In most cases, this will be the single EGA color used to
draw the edge outlines of the geometrical image being
displayed. (The primary graphics color is also used for the
transient data value fields within the HYPERGEO menu area.)
The command accepts a value which is the name of one of the
sixteen standard EGA colors:
BLACK
BLUE
GREEN
CYAN
RED
MAGENTA
BROWN
LIGHTGRAY
DARKGRAY
LIGHTBLUE
LIGHTGREEN
LIGHTCYAN
LIGHTRED
LIGHTMAGENTA
YELLOW
WHITE
However, if solid display mode is currently active and the
system has VGA color capability, the command will accept a
new specification for the eight graduated shades of color to
be used for solid surface rendering. The value to be
entered is a red/green/blue number triple in the form of
three integers in the range 0 to 63. This defines the
lightest of the eight shades; the program will calculate
seven additional, darker shades from this to create the full
range required for realistic surface rendering.
Keystroke: D
Use: Accepts a new delta value that will be used to increment (or
decrement) the W-value of the intersecting hyperplane. This
delta value is used by the interactive command which
performs a translation of the intersecting hyperplane on
geometries being displayed via the 4-D intersection mode
(see Page Up/Page Down below).
The value entered is a positive floating-point number. It
is in the units of the currently active geometry.
HYPERGEO Version 1.1 Page D-6
Keystroke: E
Use: Accepts a new value for the eye-to-screen distance. This
parameter is used in the generation of all 3-D to 2-D screen
projections. Decreasing the eye-to-screen distance enhances
the amount of apparent perspective in the display. For
greatest realism, the eye-to-screen distance should be set
to correspond to the true distance between the viewer's eyes
and the screen.
It is possible to set the eye-to-screen distance to any
arbitrarily small positive value. However, it should never
be made so small that the viewpoint appears to enter the
object being displayed. This will result in distorted and
meaningless graphics.
The value entered is a positive floating-point number. It
is in inches.
Keystroke: F
Use: Accepts the name of a new geometry definition file. The
name may include a full DOS path specification. If no path
is specified, the file is assumed to be in the current
directory. If no extension is specified, the extension .GEO
is assumed.
Keystroke: G
Use: Switches between the two modes of 4-D to 3-D geometry
reduction: intersection and projection.
Because hidden-line and solid displays cannot be used with
4-D to 3-D projections, if either of those two modes is in
effect when the program switches from 4-D intersection to
4-D projection, perspective display mode is automatically
selected.
The G command is not applicable to three-dimensional
geometric objects.
Keystroke: H
Use: Selects hidden-line display mode.
If the current geometrical object is four-dimensional and
the 4-D to 3-D reduction mode is projection, the hidden-line
display cannot be used.
HYPERGEO Version 1.1 Page D-7
Keystroke: I
Use: Displays the special HYPERGEO Information Window. This
window contains a summary of the current object's topology,
plus a number of related program parameters. For the
topology, the window shows:
* number of dimensions
* number of vertex points
* number of edges
* number of faces
* number of hyperfaces (4-D geometries only)
* span (geometry units)
* radius (geometry units)
The "span" of an object is calculated by finding the minimum
and maximum extents of the object in each of its three or
four dimensions; the span is the largest difference between
the minimum and maximum extents in a single dimension. The
"radius" of an object is the greatest distance in
(hyper)space of any vertex point from the origin.
Additional parameters shown are:
* screen height and width (inches)
* horizontal and vertical pixels per inch
* free memory (bytes)
The HYPERGEO Information Window is an ordinary message
window; it can be dismissed by striking any key.
Keystroke: M
Use: Toggles on and off the display of the HYPERGEO menu area.
The menu area must be displayed to enable the use of the
mouse for command selection.
Keystroke: N
Use: Toggles on and off the display of the name of the current
geometry definition file.
From time to time, interactive manipulations of the current
object may cause the graphics of the displayed geometry to
pass over the text of the geometry definition file name and
partially or wholly erase it. The display of the file name
can be restored by toggling it off and then on again using
two 'N' commands in immediate succession.
HYPERGEO Version 1.1 Page D-8
Keystroke: O
Use: Selects orthographic display mode.
Keystroke: P
Use: Selects perspective display mode.
Keystroke: Q
Use: Quits the HYPERGEO program and returns to DOS.
Keystroke: R
Use: Accepts a new value for the current display scale ratio. A
smaller scale ratio increases the size of the image on the
screen, while a larger scale ratio decreases it.
The value entered is a positive floating-point number. Its
units are geometry units per screen inch.
Keystroke: S
Use: Selects solid display mode.
If the current geometrical object is four-dimensional and
the 4-D to 3-D reduction mode is projection, the solid
display mode cannot be used.
Keystroke: T
Use: Accepts a new value for the turn angle. The turn angle is
the basic incremental angle used by each of the rotation
commands. A large turn angle is useful for rapid
manipulation of the geometrical object under study. Smaller
angles can be used for fine positioning.
The value entered is a positive floating-point number. Its
units are degrees.
HYPERGEO Version 1.1 Page D-9
Keystroke: V
Use: Toggles on and off the display of the unit axis vectors.
Regardless of the setting of this toggle, the unit axis
vectors are not displayed with hidden-line or solid display
mode.
Keystroke: W
Use: Accepts a new value for the W-coordinate of the intersecting
hyperplane used for 4-D to 3-D intersections. Repositioning
the intersecting hyperplane at various W-coordinate values
provides a means for examining the hypergeometrical
structure of the current object.
It is possible (indeed, easy) to assign a value to this
parameter that causes the intersecting hyperplane to lie
entirely outside the extents of the current object in
hyperspace. This results in an empty display. The program
has no feature for "finding" the object in hyperspace in
such cases, so it behooves the user to remember the extents
of the object. (This is no problem if the original geometry
contains the origin point; then, setting the hyperplane's
W-coordinate to zero will restore the display.)
The value entered is a floating-point number. It is in
geometry units.
Note: This command has no apparent effect if the program is
currently using the projection method of 4-D to 3-D image
reduction. However, the next time intersection mode is
entered, the modified W coordinate value of the intersecting
hyperplane will be used.
HYPERGEO Version 1.1 Page D-10
Keystroke: X
Y
Z
Use: Executes a three-dimensional rotation of the current 3-D
image about the particular axis: X, Y, or Z. The size of
the rotation is determined by the current turn angle.
When the active geometry is four-dimensional, all 3-D
rotations are transient and operate only on the immediate
3-D image which has been derived from the hyperobject's
geometry via a 4-D to 3-D reduction using either projection
or intersection. In this case, the program does not update
the display of the unit axis vectors or the values shown in
the menu's axis angle data fields during 3-D rotations.
For three-dimensional geometries, however, 3-D rotations are
permanent; the internal database is modified accordingly,
and the unit axis vectors and the displayed values for the
axis angles are updated with each 3-D rotation.
By themselves, the X, Y, and Z keys produce a single
incremental rotation in the positive direction. This effect
can be altered by combining the keystroke with the
simultaneous pressing of one of the standard keyboard
modifier keys (for example, Shift-X is entered by pressing
and holding down the Shift key, then pressing X):
Shift - Reverses the direction of the rotation
Ctrl - Automates continuous rotations in the positive
direction. The rotations are performed as fast
as the system's processing speed will allow. To
stop the animation, press any key.
Alt - Automates continuous rotations in the negative
direction. The rotations are performed as fast
as the system's processing speed will allow. To
stop the animation, press any key.
HYPERGEO Version 1.1 Page D-11
Keystroke: F1
F2
F3
F4
F5
F6
Use: Executes a four-dimensional rotation of the current
hyperobject's geometry in hyperspace. The six function keys
F1 through F6 correspond to the six possible coordinate
planes in which 4-D rotation may occur:
F1 - YZ plane
F2 - XW plane
F3 - XZ plane
F4 - YW plane
F5 - XY plane
F6 - ZW plane
The size of the rotation is determined by the curent turn
angle.
After each 4-D rotation, the hyperobject's geometry is
reduced to a 3-D image using the currently active method
(intersection or projection), and the 3-D image is converted
into a 2-D display on the computer's screen using the
currently active display mode (orthographic, perspective,
stereoscopic anaglyph, hidden-line, or solid).
By themselves, the F1 through F6 keys produce a single
incremental rotation in the positive direction. This effect
can be altered by combining the keystroke with the
simultaneous pressing of one of the standard keyboard
modifier keys (for example, Shift-F1 is entered by pressing
and holding down the Shift key, then pressing F1):
Shift - Reverses the direction of the rotation
Ctrl - Automates continuous rotations in the positive
direction. The rotations are performed as fast
as the system's processing speed will allow. To
stop the animation, press any key.
Alt - Automates continuous rotations in the negative
direction. The rotations are performed as fast
as the system's processing speed will allow. To
stop the animation, press any key.
HYPERGEO Version 1.1 Page D-12
Keystroke: 3
4
Use: Performs continuous automated random rotations. The
keystroke '3' continuously executes the three 3-D rotations
in a randomly determined order, and '4' randomly executes
the six 4-D rotations. All rotations are in a positive
angular direction with a size determined by the current turn
angle. To stop the automation, press any key.
Keystroke: Home
Use: Restores the orientation of the current geometry as it
existed when the geometry definition file was first read in.
All axis angles are reset to zero degrees, and (for 4-D
geometries) the W coordinate of the intersecting hyperplane
is reset to its original value.
Keystroke: End
Use: Restores the current geometry to the orientation it was in
prior to the most recent Home command (see above).
Parameters reset include the axis angles and (for 4-D
geometries) the W coordinate value of the intersecting
hyperplane.
If no Home command has yet been performed on the current
geometry, the End command has no effect.
Keystroke: +
-
Use: Performs a "zoom" operation on the visible image. The '+'
command enlarges the graphical display, and the '-' command
reduces it.
These commands operate by changing the display scale ratio.
The '+' command reduces the scale ratio by 10% of its
current value, and the '-' command increases it by 10%.
HYPERGEO Version 1.1 Page D-13
Keystroke: Insert
Delete
Use: Alters the degree of perceived 3-D perspective for the
currently displayed image. These commands operate by
modifying the eye-to-screen distance. The Insert command
increases apparent perspective; it moves the viewpoint in
towards the object by reducing the eye-to-screen distance by
10% of its current value. The Delete command decreases the
perspective effect; it moves the viewpoint away from the
object by increasing the eye-to-screen distance by 10%.
The eye-to-screen distance should not be reduced to the
point that the viewpoint enters the 3-D geometry of the
displayed image. This will result in distorted and
meaningless graphics.
Keystroke: Page Up
Page Down
Use: Performs a translation of the intersecting hyperplane. The
hyperplane is moved along the W-axis in hyperspace. The
size of the translation is determined by the value of the
DELTA_W parameter. The Page Up command increments the W
coordinate of the intersecting hyperplane by this delta
amount, and the Page Down command decrements it.
Note: This command has no apparent effect if the program is
currently using the projection method of 4-D to 3-D image
reduction. However, the next time intersection mode is
entered, the modified W coordinate value of the intersecting
hyperplane will be used.
By themselves, the Page Up and Page Down commands perform a
single incremental translation of the intersecting
hyperplane. When combined with the simultaneous pressing of
the Ctrl key, these keystrokes initiate the continuously
automated motion of the hyperplane through the body of the
current four-dimensional geometry. (For example, to enter
Ctrl-Page Up, first press and hold down the Ctrl key, then
press Page Up.) In automated mode, the direction of the
hyperplane's motion is reversed each time it reaches an
extreme edge of the hyperobject, that is, the point at which
it ceases to intersect the hyperobject in hyperspace. Thus,
the hyperplane, continues to move back and forth through the
entire body of the hyperobject. The automated motion is
stopped by pressing any key.
HYPERGEO Version 1.1 Page D-14
Keystroke: Arrow Keys: Left, Right, Up, Down
Use: These keys move the position of the current graphical
display on the screen.
When a new geometry is read in, HYPERGEO automatically
centers the display within the primary graphics area. The
arrow keys may be used to reposition it as required by
subsequent rotations or other interactive manipulations.
HYPERGEO Version 1.1 Page E-1
Appendix E. Running HYPERGEO under Microsoft Windows
The program file supplied with HYPERGEO (HYPERGEO.EXE) is a standard DOS
executable; it is not a special Windows program. However, it can be run
under Windows using that system's ability to execute non-Windows DOS
programs. Two files are supplied with HYPERGEO to assist in adding the
program to the Windows Program Manager: an icon file (HYPERGEO.ICO), and
a Program Information File (HYPERGEO.PIF).
The procedure to follow to add a new program to a particular program
group within the Program Manager is described in the Windows User's
Guide in the section "Adding Program Items and Documents to a Group" in
the Program Manager chapter (page 88 for Windows 3.0). Within the
Program Item Properties dialog box that appears, the name of the
HYPERGEO PIF file (including its DOS path) should be entered in the
Command Line text box. You should also supply the name of the icon file
by choosing the "Change Icon..." option from the Program Item Properties
dialog box. Enter the icon file name (HYPERGEO.ICO) along with its full
DOS path in the File Name text box within the Select Icon dialog box.
One final step may be necessary to enable the running of HYPERGEO in
Windows. The supplied PIF file has an entry which specifies the
program's start-up directory. This initially contains the path
specification C:\HYPERGEO. If you have installed HYPERGEO in a
different directory, you will have to change this entry in the PIF to
reflect the actual directory in which the program executable
HYPERGEO.EXE exists. To modify a PIF you use the Windows PIF Editor.
This is described fully in the Section "Working with PIFs and the PIF
Editor" (page 444 for Windows 3.0) and subsequent sections in the
chapter "More About Applications" in the Windows User's Guide.
The PIF Editor also lets you specify any optional command line
parameters you wish to pass to HYPERGEO each time it is executed.
The PIF file as supplied will cause HYPERGEO to run as a full-screen DOS
program.
HYPERGEO Version 1.1 Page F-1
Appendix F. Registration Form
Stuart Esten
33 Banks Ave.
Lexington MA 02173
USA
HYPERGEO Customer Registration Form
Name and Address:
____________________________________________________________
____________________________________________________________
____________________________________________________________
____________________________________________________________
Diskette size: 5-1/4" ( ) 3-1/2" ( )
HYPERGEO - includes latest version of program
and one pair of plastic 3-D glasses:
_____ copies at $20 each = _____________
Additional 3-D glasses: ______ pairs at $2 each = _____________
Massachusetts residents add 5% state sales tax = _____________
Shipment outside of U.S. and Canada add $5 = _____________
Total = _____________
For domestic orders payment should be via check payable to Stuart Esten.
Foreign orders should use an International Money Order denominated in
dollars. For either domestic or foreign orders cash is acceptable.
(Please use the back of this form for any comments, suggestions, or
criticisms you have concerning the HYPERGEO program.)