POV-Ray : Newsgroups : povray.beta-test : CSG bounding box broken with arbitrary transform : Re: CSG bounding box broken with arbitrary transform Server Time
7 Jul 2024 07:11:33 EDT (-0400)
  Re: CSG bounding box broken with arbitrary transform  
From: clipka
Date: 20 Aug 2009 08:13:32
Message: <4a8d3dec$1@news.povray.org>
Thorsten Froehlich schrieb:
> Without having tested the scene, could it be that the plane has simply 
> been flipped by the macro? Is there a minimal scene showing this problem?

That's the minimal scene already. Well, aside from texturing that is.

I already identified the root cause though: It turns out that when 
POV-Ray checks for planes being perpendicular to an axis in order to 
take them into account for intersection bounding boxes, it attempts to 
test this by checking whether one of the transformed normal's components 
is equal to +/-1, instead of testing the other components for 0. As the 
vector isn't normalized after the transformation, this gives bad readings.

The effect kicks in whenever the transformation leaves any of the normal 
vector components exactly (or sufficiently close to) +/-1; for instance, 
the following will provoke the problem as well:

   plane { -x, 0 transform { scale 2 rotate z*30 } }

(Omitting the "transform" statement will solve the issue in this case, 
probably because a different mechanism is then used to apply the scaling 
and rotation.)


Post a reply to this message

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