## Basic 3D transforms

### Basic 3D transforms

I am an undergrad, hungry for knowledge, searching for some
algorithms/code/explaination/refs of how to do 3D
transforms/rotations of geometric objects and project them onto a
2D surface (the screen! ;-)). I have written numerous commercial
applications (C/C++/Windows/others...) and am not a novice.
However, this _is_ a new field for me.  I have been very much
interested in Scientific Visualization since I took that killer
tour through SDSC!  Anyway...

I would like to be able to do the following:
1. Accept as input some file with vector data for some object...
2. display the object in the center of the screen...
3. Allow the user to manipulate the object, using the mouse, to
view the object from _any_ angle...
4. Allow a toggle for hidden line removal (on/off)
5. Allow a toggle for painting surfaces (color/solid/transparent)
6. Allow a toggle for ZBuffering (about which I don't know a
thing at this point!)

I am sure this is all recreating the wheel.  However, I'm sure
I'll learn it this way!

Thanks in advance for any help!

_ ____________________________________________________________________ _
| |                                |                                   | |
|O| Charles D. Price               |...( some poetic pontification )...|O|
| | CIS: 72002,1602 or 70541,3651  |                                   | |

| | Digital Systems Research, Inc. |                                   | |
|O| San Diego, CA.                 |                      C. Price     |O|
|_|________________________________|___________________________________|_|

Every example and tutorial on transforms I've seen simply applies
translation, rotation and scaling to the object's coordinate space. But if I
want to move a square rotated 45 degrees 100 pixels to the right, I can't
simply translate it 100 pixels... because the rotation throws the object the
wrong way. And if I scale an object by 2, I can't translate it 100 pixels...
because it moves 200.

How do you draw an object and allow a user to interact with the object
through various actions such as translate, resize, rotate (in screen
coordinates) such that you have a single AffineTransform that will take the
object from "the origin" to the current position in a single step --- with
all the actions applied to the object in "screen coordinates" ?

I'm mathematically brain-dead to figure this out. I'm trying this in java...