POV-Ray : Newsgroups : povray.programming : OT - need help tracking a (few) bug(s) in my little raytracer (C++) : Re: OT - need help tracking a (few) bug(s) in my little raytracer (C++) Server Time
28 Jul 2024 12:37:52 EDT (-0400)
  Re: OT - need help tracking a (few) bug(s) in my little raytracer (C++)  
From: Peter Popov
Date: 8 Aug 2001 17:04:00
Message: <52a3ntc43mlkpp85jvf1g18pmian504003@4ax.com>
>Seems like you use one transformation for points, vectors and normals,

Thanks, point taken. Makes sense :)

>Other problem, which I found, is in transformation code: e.g. in method
>CVector::VInverseTransform you modify first x value of vector, then use
>this modified value to calculate y and then use modified x and y to
>calculate z. This leads to wrong result, of course. Instead you should
>cache current values for x, y and z and then calculate new values by
>using these cached values.

*slaps head*

Of course! OMG this is such a blatantly stupid mistake! Thanks for
pointing it out.

>Correct these errors and I guess that most transformation problems will
>disappear.

Unfortunately, no. Even if I remove any and all transformation code
from CBox::Intersect (or CSphere::Intersect) and only use
untransformed primitives, they render incorrectly.


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.