POV-Ray : Newsgroups : povray.programming : cones.cpp: A typo and a question. : Re: cones.cpp: A typo and a question. Server Time
28 Jul 2024 06:16:12 EDT (-0400)
  Re: cones.cpp: A typo and a question.  
From: Le Forgeron
Date: 8 Oct 2002 05:30:40
Message: <3DA2A5CA.50109@free.fr>
Massimo Valentini wrote:

> "Le Forgeron" ha scritto
> :
> : > An other one could be to avoid the normalization of the
> : > direction of the ray, it appears to me useless.
> :
> : It is NOT useless. When CSG operation/object (union & merge, at least)
> : will ask its component, it will orders the intersections by depth order
> : before answering to the upper level. Thus, putting back the depth from
> : object space to global space is mandatory (otherwise, strange things
> : will happens).
> :
> : Same goes when more than a single cone/cylinder get intersected by the
> : ray, the engine need to order them correctly, in the global space!
> :
> 
> I try to show what I mean. You are first scaling the direction
> 


Ok... I understand better what you wanted.
I first thought that you wanted only to remove the division of the depth.

So, far, your suggestion looks ok, and it might deserves a study of the 
code, as well as experiments (just to check there is no adverse effect 
due to a precision problem...probably not, but I'm afraid of sturm 
solver effects). The study should also find out if there is any speed-up 
(or slow down) with the new code. (and by how much).


Post a reply to this message

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