POV-Ray : Newsgroups : povray.newusers : Why didn't this work? : Re: Why didn't this work? Server Time
5 Sep 2024 20:21:10 EDT (-0400)
  Re: Why didn't this work?  
From: Ron Parker
Date: 6 Jul 2000 16:46:51
Message: <slrn8m9sq1.o08.ron.parker@linux.parkerr.fwi.com>
On Thu, 6 Jul 2000 22:24:08 +0200, Marc-Hendrik Bremer wrote:
>You could achieve this with the megapov-keywords min_extend and max_extend,
>if I get this right. How accurate are the bounding boxes of the 'primitive'
>pov-primitives like spheres, boxes, cones, cylinders? Is the object
>'centered' in there. I know this is not a accurate term, 'course where is
>the center? What I mean is: would min_extend.x and max_extend.x return -1
>and 1 for a sphere{0,1}, a box{-1,1}, a cone {<-1,0,0>,1,<1,0,0>,2}?

The keywords are min_extent and max_extent (t, not d.)  I wrote the
implementation, so I should know. 

They're generally pretty accurate for simple primitives, and in the four
cases you mentioned the object is centered in there.  If you have rotated
the objects, the bounding box gets larger rather than rotating, so there's
likely to be some space for them to rattle around in the box. 

CSG objects are likely to overbound, and some objects are just plain 
unbounded (poly springs to mind.)  I think it's probably better to just 
know what you want the center of the object to be and keep it in mind while 
you're designing it, then do any scales or rotations before translating 
it to the final location.  If you find it easier to work in terms of 
local or global transforms, (e.g. you want to rotate the table after you
translate it where you need it) then use the macros I posted in that other 
thread. (Remember to read the followup; it fixes an error.)
  
-- 
Ron Parker   http://www2.fwi.com/~parkerr/traces.html
My opinions.  Mine.  Not anyone else's.


Post a reply to this message

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