POV-Ray : Newsgroups : povray.beta-test : sphere sweep bounding boxes calculated incorrectly : Re: sphere sweep bounding boxes calculated incorrectly Server Time
2 Nov 2024 05:22:12 EDT (-0400)
  Re: sphere sweep bounding boxes calculated incorrectly  
From: Mike Williams
Date: 13 Jan 2002 01:15:53
Message: <tZpMZDAtRSQ8EwNE@econym.demon.co.uk>
Wasn't it Slime who wrote:
>but maybe this will convince you: if you translate the shapes, their
>bounding boxes should move with them, right? Try translating them all by
><1000,1000,1000> or something, and the bounding boxes will still include the
>origin, I bet.


Yes, they do still include the origin in the bounding box when
translated. 

        This scene

#declare This=sphere_sweep {
 linear_spline,
 2,
 40, 1
 50, 1
 translate <1000,1000,1000>
}

#debug "Min: <"
#debug str(min_extent(This).x, 3, 1)
#debug ", "
#debug str(min_extent(This).y, 3, 1)
#debug ", "
#debug str(min_extent(This).z, 3, 1)
#debug ">\nMax: <"
#debug str(max_extent(This).x, 3, 1)
#debug ", "
#debug str(max_extent(This).y, 3, 1)
#debug ", "
#debug str(max_extent(This).z, 3, 1)
#debug ">\n"

        Produces the output

Min: <0.0, 0.0, 0.0>
Max: <1051.0, 1051.0, 1051.0>

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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