Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!well!oster From: oster@well.sf.ca.us (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: Graf3D and What I Discovered Therein - part 3 Message-ID: <22038@well.sf.ca.us> Date: 8 Dec 90 02:44:19 GMT References: <27177.2756a557@kuhub.cc.ukans.edu> Organization: Whole Earth 'Lectronic Link, Sausalito, CA Lines: 27 In article <27177.2756a557@kuhub.cc.ukans.edu> mlab2@kuhub.cc.ukans.edu writes: _>I could post more, but mostly program specific stuff. I will say that my _>biggest annoyance with Graf3D was that it is difficult (impossible?) to _>actually rotate both the cube AND the eye at the same time. As I recall, _>rotation calls to Yaw and the like actually rotate space about the point _>(0,0,0). If you have, for example, two cubes located in differnt places in _>space, calls to pitch will rotate BOTH cubes teeter-totter like about the point _>(0,0,0) of space. I could only imagine setting up SEPERATE 3D grafports for _>each cube and copybitting the two (via XOr) to a single 2D grafport on the _>screen. Slow. There is nothing magic about what Graf3D is doing. It is just doing simple matrix multiplication to do the transformation of the coordinates of the 3d wireframe cube to its final position. Any elementary book on computer graphics gfoes into this process in excuricating detail. I like "Interactive Computer Graphics" by Giloi. Just make sure to use the Fract trig routines (inside Mac vol 4) and right your matrix mutiply routine to use Fixed numbers. A cute trick: given a quadrilateral in 3-space, do your Line3To()s inside BeginRegion(), EndRegion()s. Then, uyou can do a PaintRegion to actually draw the face in "three space". Regions work better than Polygons for this, since pin a polygon, the pen hangs down, but in a region, the pen stays within the region. -- -- David Phillip Oster - At least the government doesn't make death worse. -- oster@well.sf.ca.us = {backbone}!well!oster