Exercise 1 should be a fun,
fairly easy undertaking. Its intention is
to get you into the frame
of mind of interactive geometric computation.
It is due in one week (actually,
eight days), on Tuesday 17 February.
We'll show off the more
interesting resulting executables in class.
The first thing you should
do is read through the brief overview
of "gvis," a framework
we built with help from Eric Amram. Then,
compile, run, and look
through the code. It has a reasonably generic
structure allowing extensible
geometric primitives (object.[CH]) and 3D
interaction techniques
(app.[CH], especially the UserUpdate() method).
Start with something simple
and easy. Use fdesign to add a control
of your choice to the UI.
For example, add a button or a choice to
control some aspect of
the display. Add a slider to change a parameter
of the physical simulation.
Tell fdesign which callback it should
generate when the control
you've added is manipulated, then add a
wrapper for this callback
to ui.C. Now modify your program (by editing
app.[CH] or object.[CH]
or both) to incorporate the new control. This
should take about an hour.
Now move onto something
more interesting, and more challenging.
Define and implement a
new kind of GeomObject. It doesn't have to
be complicated -- for example,
you could make a rectangle that can
have an arbitrary normal.
Or a cylinder or cube or tetrahedron. If
you're feeling adventurous,
you could define a surface z = f(x,y) and
constrain existing or new
objects to it as you drag them around and/or
let them time evolve under
some simulation. This should take about
two hours.
Finally, do something interesting
with the UserEvolve() method.
Perhaps you can define
a potential field and constrain your objects
to orbit under its influence.
Or, you could make the user-selected
object an attractor or
repellor of the other objects. Or you could do
something altogether different.
Be creative. This should take just
another few hours.
For extra credit (and to get your executable
shown off in class), do
something really interesting, or something
useful to the class --
for example, add some useful viewing or
selection capability, or
geometric primitive, to gvis.
The point of this exercise
is not to get a high grade. Again, it's to
introduce you to a new
model of interactive, reactive -- even
proactive -- programming.
Enjoy !
Download instructions for athena:
Last modified: Feb 1998
Seth Teller, MIT Computer Graphics Group, seth@graphics.lcs.mit.edu