POV-Ray : Newsgroups : povray.newusers : Finding extents of an object : Re: Finding extents of an object Server Time
18 Apr 2024 22:02:22 EDT (-0400)
  Re: Finding extents of an object  
From: Alain Martel
Date: 16 Jun 2021 09:51:26
Message: <60ca01de$1@news.povray.org>
Le 2021-06-16 à 05:16, clipka a écrit :
> Am 15.06.2021 um 22:27 schrieb Alain Martel:
> 
>> You can use max_extent(Object) and min_extent(Object) to relocate and 
>> scale your objects correctly.
>> Those return the far, top right and close bottom left of the bounding 
>> box of Object.
> 
> Just for the records: It is worthy to note that the bounding box of an 
> object is not necessarily a perfect fit; depending on the type of object 
> and how it has been rotated, it might be noticeably larger.
> 
> The reason is that the bounding boxes' primary purpose is to be used 
> internally during render to speed up calculations, but for that purpose 
> they don't need to be perfect, as long as they contian the entire object.

I know that, but, in many cases, it's good enough.
In the present case, it may be just what is needed. It will always 
ensure that the whole object is visible, even if the use of the image's 
real estate may not be optimal.

Also, the solution proposed ensure that the object do not extend beyond 
the camera.


Post a reply to this message

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