Interactive Symmetry Generator
A CS285 course project by Michael Wittman
A chain of tori produced by the symmetry generator.
Goals
The goal of this project was to provide an interactive facility to allow
users to experiment with with 3D symmetry. A second, more specific goal
was to give users the ability to interactively create and prototype 3D
symmetric sculptures. The basic problems addressed by the project were
the addition of symmetry operations and interactive controls to the
existing sculpture generator.
Accomplishments
To support the underlying symmetry operations, classes were developed
to be used within the sculpture generator. These provide the support for
displays of symmetry such as glide or rotational symmetry, for arbitrary
objects within the sculpture generator. These classes are meant to
provide symmetry operations on an abitrary class, regardless of whether it
is interactively controlled.
The two available symmetry operations are defined as follows. The glide
symmetry class gives the user control of 9 parameters. These are three triples
of rotation, vector, and extent. The symmetric
object is then generated by taking the original object, replicating it
extent times in the vector direction, adding a
rotation at each replication. This is done for all three triples
to produce a parallelepiped-like region (assuming the vectors are
linearly independent).
A fairly simple application of the glide symmetry class. This was the
result of setting the vectors to (9,0,0), (0,9,0), (0,0,9), the
rotations to 90, 0, 0, and the extents to 4, 3, 4. (The torus has inner
radius 8, outer radius 10.)
A not-so-simple application, but this object was produced with solely
the glide symmetry operations. The extents were 3, 3, 3, the vectors were
in the x, y, and z directions and had lengths less than the torus outer
radius, and I used an arbitrary rotation for each vector to make it look
interesting.
The rotational symmetry class allows the user to specify a 3D rotational
symmetry group, and symmetry operations are performed based on that group.
Here are a few examples, starting with our original object in C1 symmetry.
C1
C5
D1H
S21
The other part of the project provides interactive controls for the above
classes. This is accomplished by using user-interface classes (one per
symmetry class) and short Tcl files for the actual UI elements. This gives
the user a uniform window for each symmetry operation, which is available
through the "Root" button in the standard UI. Also available through both
symmetry user interfaces is a button which will pop-up the original
object's user interface.
Implementation
All of the symmetry operations in the symmetry classes are performed at the
level of OpenGL, making the operations transparent to the replicated
object. This works by drawing the object multiple times for each call to
the symmetry object's Draw function, once for each replication. Each
replication (via symmetry operation) is done on the OpenGL matrix stack,
followed by a call to the object's Draw function to draw the object at the
replication location.
Conclusion
With the exception of the C++/Tcl interface necessary for a user interface
class, the implementation of the project was fairly straightforward. The
existing object-oriented class structure of the viewer was essentially what
allowed the symmetry object to be included in a relatively elegant manner.
In the design phase of this project, the main stumbling block was
distinguishing that the glide symmetry and rotational symmetry are two
separate operations, not one big symmetry operation. With that
observation, it was relatively easy to code each of the two simpler
operations.
Further Info
Symmetry classes user's manual
Symmetry classes source code
A tarfile of this directory (for Carlo)
Notes
The code available is in runnable condition, however it does have some rough
edges and a few things which are not fully implemented. I will try to
correct the most egregious of these and update it sometime soon.
wittman@cs.berkeley.edu