Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!news.cs.indiana.edu!purdue!avr From: avr@cs.purdue.EDU (Andrew V. Royappa) Newsgroups: comp.sys.sgi Subject: Re: question on gl Message-ID: <14168@medusa.cs.purdue.edu> Date: 3 Apr 91 03:26:58 GMT References: <1991Apr2.150125.22972@odin.corp.sgi.com> <94881@sgi.sgi.com> <14154@medusa.cs.purdue.edu> <1991Apr2.224901.8498@odin.corp.sgi.com> Reply-To: avr@cs.purdue.edu (Andrew V. Royappa) Distribution: usa Organization: Department of Computer Science, Purdue University Lines: 29 OK, I've read the articles by Bruce Holloway & Gary Tolling. The articles were somewhat dense; unfortunately, so am I. I'm still not sure what I'm doing wrong. Here's what I`m doing, for *perspective* projection: (1) extend from 3D to 4D coordinates; multiply by MVP matrices given at back of gl user's guide. (2) divide 4D result by w to return to 3D (3) clip resulting geometry against -1.0<=x,y,z<=1.0 Now, I'm interested in correctness more than speed (as I'm doing this in software, over X, I'm obviously not interested in speed). Since bruceh says that the gl matrices guarantee w > 0, I don't see any problem regarding correctness with the division in step (2). The only modelling matrices (the "M" of the "MVP" above) that I use are translate, scale and rotate. What could I still be doing wrong ? Well, this discussion is helping me understand this stuff a lot better. Thanks again, Andrew