Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!lll-winken!sun-barr!cronkite!newstop!exodus!fourdee.Eng.Sun.COM!kyriazis From: kyriazis@fourdee.Eng.Sun.COM (George Kyriazis) Newsgroups: comp.graphics Subject: Re: Ray tracing Message-ID: <15985@exodus.Eng.Sun.COM> Date: 28 Jun 91 17:16:06 GMT References: <383@bibsyst.UUCP> <1991Jun27.184538.6963@ux1.cso.uiuc.edu> <1991Jun28.095138.3617@cc.tut.fi> Sender: news@exodus.Eng.Sun.COM Organization: Sun Microsystems - Graphics Technology Group - Mountain View, CA Lines: 43 In article <1991Jun28.095138.3617@cc.tut.fi> jk87377@cc.tut.fi (Juhana Kouhia) writes: > >Focal lenght (or distance of the image plane) doesn't distort >straight lines; I did verify this mathematically. > I would agree.. We are talking basically of a perspective transform, and perspective transforms are known to preserve staight lines. If that was not true, all interactive 3-D systems as well as architects that try to display perspective would've been severely wrong.. Now, the question is why does it give a fish-eye look. Say you are looking at a cube which is dead smack in the middle of the screen. I got the impression that this cube will have rounded concave edges and look slightly like a sphere, right? I will assume that the intersection routine is ok (it's pretty difficult to mess up a plane intersection routine so it gives you curves), so the problem is related to viewing. That effect will mean that the scanlines are not strait but bend towards the center of the image. That will apply for the vertical lines too, I guess. Ok. Take a scanline. Y is fixed on the scanline, and what varies is X. If the scanline bends towards the middle (or towards the edges if you like), that will mean that the X coordinate affects the Y offset in some way. Two guesses on what is wrong: 1. Something is messed up when building the ray vector from the view plane normal and the x and y offsets, and then normalizing; altough errors in the length of the ray vector should not matter. 2. Maybe the error is caused by using angles instead of offsets? Just my humble opinion.... -- ---------------------------------------------------------------------------- George Kyriazis (please include a generic disclaimer) kyriazis@eng.sun.com kyriazis@rdrc.rpi.edu kyriazis@iear.arts.rpi.edu ----------------------------------------------------------------------------