Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!uunet!mcsun!news.funet.fi!cc.tut.fi!jk87377 From: jk87377@cc.tut.fi (Juhana Kouhia) Newsgroups: comp.graphics Subject: Re: Ray tracing Message-ID: <1991Jun26.173327.28965@cc.tut.fi> Date: 26 Jun 91 17:33:27 GMT References: <383@bibsyst.UUCP> Organization: Tampere University of Technology Lines: 19 In article <383@bibsyst.UUCP> ingar@bibsyst.UUCP (ingar) writes: > >In my ray tracing program I am not able to ray trace cubes, or anything >that contains a strait line. They always end up looking like deformed >spheres, a sphere with angels as a matter of fact. If i ray trace an >object in a room the walls alway ends up in looking like "bowls". >I have checked my types and they are all correct, and I have checked >that all my vector lengths are correct. If your sphere (or any other object) looks right then your ray/cube intersection algorithm is wrong. Do you use transformation systems? Have you a cube in local coordinate system when you actually make ray/cube intersection? Maybe the error is when you try transform the intersection point back from local to world. Do you normalize your ray when you define it from the pixel coordinates and eye point? Juhana Kouhia