POV-Ray : Newsgroups : povray.programming : bounding boxes problem and solution : Re: bounding boxes problem and solution Server Time
3 Jul 2024 05:59:52 EDT (-0400)
  Re: bounding boxes problem and solution  
From: Andrew Clinton
Date: 1 Dec 2003 21:40:02
Message: <web.3fcbfb50a497fd62611ee4e60@news.povray.org>
ABX wrote:
>
>I would suggest to change Parse_Object_Mods in parse.cpp to cause above lines
>to be executed as in
>
>transform{
>  rotate z*45
>  rotate z*-45
>}
>
>(Storing transformations in Local_Matrix and applying then on exit from
>Parse_Object_Mods or if some object modifier needs bounding box to be
>specified)
>
>ABX
>

That's not the worst of the problem...  Even if there were only one
transformation eg.

intersection { sphere{...} sphere{...} rotate z*45 }

the final bounding box might not be the tightest, because it assumes that
the rotated spheres are bounded like rotated boxes.  Of course the rotated
sphere is bounded tighter than a rotated box.

The only way to fix this is to compute all the bounding boxes from the
bottom up after all the transformations have been parsed and applied.

Andrew


Post a reply to this message

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