Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!uunet!vicorp!ron From: ron@vicorp.com (Ron Peterson) Newsgroups: comp.graphics Subject: Re: How do I draw a perspective view? Message-ID: <1991Jun6.002233.5415@vicorp.com> Date: 6 Jun 91 00:22:33 GMT References: <9106010027.AA01356@bruny.cc.utas.edu.au> <1991Jun3.213012.7393@cs.ubc.ca> Reply-To: ron@vicorp.com (Ron Peterson) Organization: V. I. Corporation, Amherst, Massachusetts Lines: 23 In article <1991Jun3.213012.7393@cs.ubc.ca> mgobbi@cs.ubc.ca (Mike Gobbi) writes: [text on how to do perspective deleted] > >Note that you MUST clip any polygon which has ANY vertex behind the eye >(negative or 0 z-value) or else really wierd stuff will happen. > Is there a simple general method for doing perspective calculations that works for ANY orientation of object, screen, and POV including situations where: * part of the object is behind the POV and part in front or * if the object crosses between octants of the coordinate system or * the object resides at the origin or * the POV is inside the object being rendered or does it have to be broken into cases? I implemented something in my ray tracer that works for most situations but when dealing with very long thin objects that pass close to the POV (like the Star Wars battleship scene where the mile long ship goes past the camera) weird things start to happen at the edges of the picture. Also, I know DBWRender (the version that source code is available for) has trouble with objects or the POV crossing octants (textures change and the scene sometimes flips upside down.) ron@vicorp.com or uunet!vicorp!ron