SPACE - A Manifold Exploration Program 1. Overview

advertisement
1. Overview
SPACE - A Manifold Exploration Program
1. Overview
This appendix describes the manifold exploration program SPACE that is a companion to this book. Just
like the GM program, the SPACE program should be considered as a starting point, in this case a starting
point for exploring the geometry of surfaces and 3-dimensional manifolds. The program comes with some
basic functionality for creating and exploring these manifolds and provides the reader with an easy to use
and easy to extend environment. Again, only minimal knowledge of Windows programming and C++ is
required (unless of course the user wants to get fancy). Only a brief overview of the SPACE program is
presented here. For more details one will have to consult the documentation that comes with the program.
2. Overview of User Interface
The SPACE program represents manifolds as 3-dimensional cells or solids in R3 with identifications on
their boundary. There are three possible views of the world called the LOCAL, PLANE, and GLOBAL
views. The default view is the LOCAL view which shows a 3-dimensional perspective wireframe view of
these solids in the same way that any geometric modeling program would. Figure 1 shows the basic
layout of the screen and this default view when the SPACE program is started. We see the LOCAL view
with the camera at (10,10,10) looking towards the origin of the world coordinate system that is displayed
as a small frame with unique markings for the x-, y-, and z-axes. Like in the GM program, the main
menus appear along the right hand side of the screen. The rest of the screen is divided into several areas.
Figure 1 The main screen
1
SPACE – A Manifold Exploration Program
Figure 2 The items on the STATUS line above the graphics area
Figure 3 The choices of the GRAPHICS menu to the right of the graphics area
Figure 4 The GRAPHICS menu and scroll bar below graphics area
The TITLE line: This shows the icon and name of the SPACE program along with the standard
three Windows buttons on the extreme right.
The STATUS line: This is the line immediately below the TITLE line. It shows such things as the
name of the current object and the current frame (a reference coordinate system). See Figure 2.
The GRAPHICS area: This is the black area immediately below the STATUS line where are the
display takes place. It has a title line at the top which specifies the view mode.
The GRAPHICS menu: There are two parts to this menu, the VERTICAL GRAPHICS menu along
the right side of the GRAPHICS area shown in Figure 3 and the HORIZONTAL GRAPHICS menu
on the line immediately below the GRAPHICS area shown in Figure 4 minus the scroll bar.
The IO line: This is the area between the HORIZONTAL GRAPHICS menu and the HINT line at
the very bottom of the screen. Here is where the typical program/user interaction would take place.
For example, if choosing a menu item for creating a box, this is where the query for the dimensions of
the box would appear. Pop-up menus are placed in the menu area.
The HINT line: This is the line on the bottom of the screen where hints are shown. System
messages may also appear on this line.
2
2. Overview of User Interface
(a)
(b)
(c)
Figure 5 The MAIN/CREATE/MANIFOLD menus
A close-up of the main menu is shown in Figure 5(a). Clicking on a menu item will either pop up
another menu with its title below the title of the previous menu or carry out an action that may involve
interacting with the user on the IO line. For example, clicking on the Create item would pop up the menu
shown in Figure 5(b). Note how the title “CREATE” of this menu is below the title “MAIN” of the main
menu. Finally, clicking the Manifold item in the create menu pops up the menu shown in Figure 5(c). To
back up in the menu tree one needs to click on the title of the parent menu. For example, clicking on the
“CREATE” title in Figure 5(c) would restore the menus as shown in Figure 5(b).
Figures 6-9 show an example of the different views that one has in the SPACE program assuming that
we are in the default wireframe mode. The world consists of the unit sphere S3. Figure 6, 7, and 8 show
Figure 6 A LOCAL wireframe view of S3
3
SPACE – A Manifold Exploration Program
Figure 7 A PLANE view of S3
the LOCAL, PLANE, and GLOBAL view of the sphere, respectively. The LOCAL view is a standard
perspective view of objects in R3. The PLANE view corresponds to an orthographic projection of R3 onto
the x-y plane. The GLOBAL view corresponds to the view of an observer from inside of the manifold. In
our example the boundary cells of our manifold have not yet been “pierced”, so that all that the observer
can see is the boundary of the cell in which he is located. The observer is represented as a red cone at the
origin pointing in the y-direction in the LOCAL view and as a red arrow in the PLANE view. One can
Figure 8 A GLOBAL view of S3
4
2. Overview of User Interface
Figure 9 A GLOBAL and LOCAL view of S3
also show both the GLOBAL and the LOCAL views simultaneously on the top and bottom half of the
GRAPHICS area, respectively. See Figure 9. One can see that the top view is the active one by the fact
that its title line is solid whereas the bottom view has a grayed-out title line.
One works with the SPACE program by activating appropriate menu items and then entering any
needed data on the IO line. As a general rule pressing the ESC button or the right button on the mouse
will abort the current action.
To exit SPACE one needs to click on the standard Windows exit button at the top right-hand corner
of the screen. If the world is nonempty, then the user will be asked to reconfirm his/her desire to quit
before the program actually exits.
3. The Graphics Menu
The GRAPHICS menu along the bottom and right side of the GRAPHICS area are available to the user at
all times.
First, consider the items in Figure 3.
The S button: Pressing it will print a query on the IO line that will let the user change between
wireframe, constant shading, or smooth shading mode. The default mode for the LOCAL and GLOBAL
views is wireframe mode as shown in Figures 6 and 8. Figures 12, 13, 15, 16, and 17 in Section 6 below
show smoothly shaded views. Only wireframe mode is possible in the PLANE view.
The V button: Pressing it will print a query on the IO line that will let the user change between
having a one or two view display. The default is to display one view as shown in Figures 6-8. Switching
to the two view mode splits the graphics area into two windows. The top window would have a GLOBAL
view of the world and the bottom, the LOCAL view. See Figure 9.
5
SPACE – A Manifold Exploration Program
The N button: Pressing it will cycle between the LOCAL, PLANE, and GLOBAL views. The
default view at startup is the LOCAL view.
The M button: Pressing it will cycle between types of moves with the symbol (“S” or “R”) for the
move type shown immediately below it.
S −
R −
spin about focal point
rotate
The O button: Pressing it will cycle between type (MOVE_OBJ_TYPE) of object that will be moved
with move commands with the symbol (“V”, “O”, “C”, “S” or “L”) for the move type shown immediately
below it.
Symbol
MOVE_OBJ_TYPE
---------------------------------------------V
camera/viewer
O
observer (the default)
C
cell
S
shape
L
light
The ∧ and ∨ buttons: These are really a shrunk scroll bar and control zoom.
The action of the scroll bar below the zoom buttons depends on the current view:
LOCAL view:
PLANE view:
GLOBAL view:
Controls the move specified by the M button of the current object of type
MOVE_OBJ_TYPE. (Cameras will be spun vertically about their focal
point).
Pans camera vertically.
Does nothing at the moment
Next, consider the items in Figure 4.
The VwAll button: This will position the camera so that all objects in the world are visible and
centered on the screen. The orientation of the original camera is preserved and the camera is only
translated appropriately.
The VwItm button: This allows the user to pick an item (cell or object) and the view will then be
changed via a translation of the camera so that the picked object appears at the center of the screen.
The Point button: This lets the user pick a point on the graphics area with the mouse that will then
become the new center of the screen.
The StdVw button: This resets the view to the standard view where one is in perspective mode and
the camera is at (10,10,10) looking towards the origin with the y-axis as the “up” direction.
The CelCol button: This lets the user change the color of a cell.
The HideWF button: This lets the user hide (make invisible) a WALL or facet.
The RstVis button: This resets facet visibility to default mode.
6
3. The Graphics Menu
The TglVis button: This toggles the SPACE view visibility of all 2-dimensional cells. Either all nonboundary 2-dimensional cells become invisible or all current WALLs (see Section 5) are made visible.
The DelObj button: This lets the user pick an OBJECT that will then be removed from the world.
The Rfrsh button: This refreshes the view.
The action of the horizontal scroll bar on the right depends on the current view:
LOCAL view:
Controls the move specified by the M button of the current item of type
MOVE_ITM_TYPE. (Cameras will be spun horizontally about their focal
point).
Pans camera horizontally.
Does nothing at the moment
PLANE view:
GLOBAL view:
4. Keyboard Graphics Moves
The movement caused by pressing certain keys depends on the move mode MOVE_ITM_TYPE, the
view, and whether the NUMLOCK key is on or not. If one turns the NUMLOCK key on and one is in the
GLOBAL view, one switches into a mode that simulates “flying” through the manifold. One controls the
direction and speed of the flight with certain keys on the keypad and several other keys.
NUMLOCK off:.
GLOBAL view:
Motions in this view only apply to the observer.
→/←
↑/↓
HOME/PGUP
END/PGDN
:
:
:
:
Rotates the observer clockwise or counter-clockwise in xy-plane.
Moves the observer in the corresponding direction parallel to the z-axis.
Rotates the observer clockwise or counter-clockwise in yz-plane.
Moves the observer in the corresponding direction parallel to the x-axis.
LOCAL view:
MOVE_ITM_TYPE = observer:
→/←
↑/↓
HOME/PGUP
END/PGDN
:
:
:
:
Rotates the observer clockwise or counter-clockwise in xy-plane.
Moves the observer in the corresponding direction parallel to the z-axis.
Rotates the observer clockwise or counter-clockwise in yz-plane.
Moves the observer in the corresponding direction parallel to the x-axis.
MOVE_ITM_TYPE = anything but the observer:
→/←
↑/↓
:
:
Rotates the camera clockwise or counter-clockwise in xz-plane.
Moves camera in the corresponding direction along its z-axis or view
direction.
7
SPACE – A Manifold Exploration Program
HOME/PGUP :
END/PGDN :
Rotates the camera clockwise or counter-clockwise in yz-plane.
Pans the camera in the corresponding direction along the x-axis.
PLANE view:
HOME/PGUP: Always pans the camera in the corresponding direction along the vector (1,1).
MOVE_ITM_TYPE = observer:
→/←
↑/↓
END/PGDN
:
:
:
Rotates the observer clockwise or counter-clockwise in xy-plane.
Moves the observer in the corresponding direction parallel to the y-axis.
Moves the observer in the corresponding direction parallel to the x-axis.
MOVE_ITM_TYPE = anything but the observer:
→/←
↑/↓
END/PGDN
:
:
:
Pans the camera in the corresponding x-direction.
Pans the camera in the corresponding y-direction.
Pans the camera in the corresponding direction parallel to the vector
(1,−1).
NUMLOCK on and in GLOBAL view:
4
6
2
8
:
:
:
:
turn left
turn right
turn up
turn down
+
-
:
:
increase speed
decrease speed
/
*
:
:
restore default values for flying
toggles how speed is modified – whether by time or by distance between
successive views
5. The Main Menu
Before giving a brief description of the items in the main menu we need to explain how the SPACE
program deals with manifolds. Manifolds (including surfaces) are treated as cell (CW) complexes but in
two ways, so that they have two cell structures associated to them. There is a low level structure which
considers a manifold as a union of simple cells, such as blocks (polygons in the case of surfaces), with
identifications. The high level structure generalizes the notion of a cell to consist of unions of simple cells
and corresponds to associating an arbitrary CW complex cell structure to the manifold. Manifolds always
start out with a low level cell structure and a high level structure that is the same. From that point on
however the user really only considers the manifold in terms of its high level cell structure with the low
level one used primarily by the code to carry out the various operations requested by the user. The low
level structure is never changed. It is the high level cell structure that the user modifies, typically to
reduce the number of cells. Simplifying the cell structure of a manifold is accomplished by piercing and
collapsing existing cells. (To pierce a cell is to remove it from the cell structure. To collapse a k-cell f
through a “free” (k−1)-cell e in its boundary is to remove f and e and from the cell structure.) Since a
surface S is represented by the 3-manifold S×[0,1], piercing or collapsing an edge e of S will correspond
to piercing or collapsing the face e×[0,1].
8
5. The Main Menu
Definition. A REDUCED manifold is one whose high level cell structure that cannot be pierced or
collapsed any further.
Definition. A (k−1)-dimensional cell in a k-dimensional cell complex is called a WALL.
In the GLOBAL view mode the observer cannot see through a WALL. When the user creates a
manifold, it only has a low level cell structure. Every face of each of its simple top-dimensional cells is
therefore a WALL. This means that in the GLOBAL view mode one cannot see outside of the cell that
contains the observer. Once one starts piercing cells however one will be able to see further and further.
In order to help a user visualize what one sees in the GLOBAL view (the view from inside a
manifold) one can mark WALLs and create shapes in the manifold.
We are now ready to describe the main menu items and the submenus they activate.
The Create menu: This menu shown in Figure 5(b) has three items.
Manifold −
Surface
−
Shapes
−
This pops up another menu that enables the user to create 3-dimensional
manifolds. One can create individual cells (block, sphere, or S×[0,1], where S is
a regular planar polygon) and define identifications along their boundary.
One can create the “standard” manifolds S3, P3, S1×S2, S1×S1×S1, lens spaces,
or manifolds of the form S×[0,1], where S is a closed surface specified by its
genus and orientability. Finally, one can create the manifold by specifying a
text file with the .MNF extension which contains its definition.
This pops up another menu that enables the user to create a surface S that will
be displayed in 2 ½-dimensional mode (as S×[0,1]). One can create the surface
that is a regular polygon with s sides and radius r or one can specify the surface
by means of its genus and orientability.
This pops up another menu that enables the user to define shapes in the cell that
contains the observer. One can choose from block, sphere, cylinder, cone,
rectangle, and facet. One can also move these shapes. A shape inside of a cell
is called an object.
The Move menu: In this menu one can translate or rotate the current object interactively with a
mouse with respect to the current frame. One can also specify transformations more precisely by entering
translation vectors or rotations on the IO line. This menu works the same as the corresponding menu in
the GM program.
The Edit menu: At the moment this menu consists of only one item which allows the user to empty
out the world.
The Glue menu: This menu only works in the LOCAL view mode. The idea is to let the user create
new objects by specifying identifications of facets in the case of 3-dimensional manifolds and edges in the
case of surfaces. The user can also query which faces, edges, or vertices are identified with which other
ones.
The Pierce menu: This menu enables the user to pierce individual WALLs of the manifold or have
the program automatically pierce as many WALLs as possible until no more can be pierced. A kdimensinal WALL can be pierced only if there are two (k+1)-dimensional cells adjacent to it and they are
distinct. One can also have the program automatically pierce all the WALLs in the 2- and 1-dimensional
skeleton of the manifold until no more piercing is possible.
9
SPACE – A Manifold Exploration Program
The Collapse menu: This menu enables the user to perform various automatic collapse operations in
the 2- and 1-dimensional skeleton of the manifold.
The Reduce item: This applies a sequence of pierce and collapse operations to obtain a REDUCED
manifold.
The Homology menu: This menu allows the user to compute the homology groups of the manifold
using the high level cell structure. One can have a single homology groups printed on the IO line or write
out all homology groups to a .PRN file. Other related data such as generators of the homology groups and
incidence matrices can also be written to a file.
The Mark menu: Here we can pick a WALL and define a curve in it (mark it).
The Utils menu: The items in this menu enable a user to change the number of cells that we can see
through in the GLOBAL view, to toggle the visibility in the current view of various items including that
of the coordinate axes and the window dimensions (if we are in PLANE view mode), to change the
directory where .IMA files are stored, and to test writing text with OpenGL.
The Save menu: This allows the user to save all the currently defined manifolds to a binary file. The
default name of the file is “space.ima”, but if such a file already exists in the .IMA directory, then the user
is given the opportunity to change the name to avoid overwriting the existing file.
The Restore item: Clicking this menu item will display a list of all the .IMA files that were saved
previously in the Save menu. The user can then select a file from the list by clicking on it with the mouse
or by typing the name of a file on the IO line. The contents of the file will then become the new world. If
the current world is nonempty, the user will first be asked to reconfirm the fact that it should be deleted.
The Render menu: The purpose of this menu is to let the user change various aspects of the
rendering process. For example, one can toggle whether lighting computations are performed, toggle
whether lights are local or located at infinity, toggle whether or not lights are used, define new lights and
their properties, change the material properties of objects, and add predefined textures to cells.
The VisTests menu: This menu is for testing aspects of the SPACE program. See the SPTECH.TXT
document for details.
The DatTests menu: This is another menu for testing aspects of the SPACE program. See the
SPTECH.TXT document for details.
6. Two Examples
In this section we shall describe in detail the steps needed to carry out some sample tasks. Assume that the
SPACE program was just started. The world will be empty and the screen will look as in Figure 1. To
create the manifold S3 we click on the Sphere item in the manifold menu. We would get the wireframe
view of its cells shown in Figure 6. We would also see the observer represented as a red cone at the origin
pointing in the y-direction. Pressing the “N” button on the VERTICAL GRAPHICS menu would switch
us into PLANE view mode shown in Figure 7. The observer is represented by a red arrow in this view.
Next, suppose that we reduce the default cell structure of S3 (by pressing the Reduce item in the main
10
6. Two Examples
menu). The reduced cell structure of S3 consists of one abstract 3-cell and one abstract 0-cell. Now press
the “N” button on the VERTICAL GRAPHICS menu. We will now get the GLOBAL view of S3 shown
in Figure 10. We are now the observer looking straight ahead inside the manifold. We can see through all
the boundaries of our basic cells. The default value of the number of basic cells that we can see through is
two. In wireframe mode we use the color green to indicate that we could look further if we were to
increase this number. If we had encountered a wall, then the lines would be drawn in the color of the cell
(typically red since that is the default cell color). Figure 11 shows what we would see if we were to press
the “V” button on the VERTICAL GRAPHICS menu and specify two views.
Returning to the single view using the “V” button, we now press the “S” button on the VERTICAL
GRAPHICS menu, and switch into a smoothly shaded view. See Figure 12. The blue color with white
spots, which is intended to simulate a night sky with stars, indicates faces that we could see through
except that we have reached our maximum number of cells that we can see through. Finally, changing the
number of cells that we can see through to four via the Max Dpth item in the utils menu we will get the
picture shown in Figure 13. There are now more “stars.”
Figures 14-17 show what the SPACE program would show in the case of 2-dimensional manifolds or
surfaces. Figure 14 shows our LOCAL view wireframe representation of the 2-sphere S2. Recall that what
we are representing S2 using the 2 ½ dimensional representation S2×[0,1]. In the local view we see
D2×[0,1] with implied identifications on S1×[0,1]. Figure 15 shows the same thing with shading turned on
and the “ceiling” D2×1 made invisible. The reduced cell structure of S2 consists of a single 0-cell and one
2-cell. Figure 16 is a GLOBAL view of this reduced sphere. We are allowing ourselves to only look
through two cells. The default color of the “floor” we are walking on (S2×0) is brown and the ceiling
(S2×1) is blue. The starry sky in the distance again indicates that we could look further if we wanted.
Allowing ourselves to look through six cells produces Figure 17. Figure 18 shows this same world after a
yellow sphere OBJECT has been added. The fact that we see multiple copies of this sphere is a result of
the fact that as we look out into our world we are looking through the start cell multiple times.
Figure 10 A GLOBAL view of a wireframe reduced S3
11
SPACE – A Manifold Exploration Program
Figure 11 A GLOBAL and LOCAL view of S3
Figure 12 A 2-level shaded GLOBAL view from inside S3
12
6. Two Examples
Figure 13 A 4-level shaded GLOBAL view from inside S3
Figure 14 A LOCAL wireframe view of 2 ½ dimensional S2
13
SPACE – A Manifold Exploration Program
Figure 15 A LOCAL shaded view of 2 ½ dimensional S2 without a ceiling
Figure 16 A 2-level shaded GLOBAL view from “inside” S2
14
6. Two Examples
Figure 17 A 6-level shaded GLOBAL view from “inside” S2
Figure 18 A 6-level shaded GLOBAL view from “inside” S2 with sphere OBJECT
15
SPACE – A Manifold Exploration Program
16
Download