POV-Ray : Newsgroups : povray.windows : Object changes when translated, rotated, or camera position changes : Re: Object changes when translated, rotated, or camera position changes Server Time
23 Jan 2022 20:02:21 EST (-0500)
  Re: Object changes when translated, rotated, or camera position changes  
From: Le Forgeron
Date: 1 Nov 2013 15:28:41
Message: <527400e9@news.povray.org>
Le 01/11/2013 17:38, Charles nous fit lire :
> I have an object bounded by a box. it works fine except when I try and move it
> or change the camera angle and the bounding box looses it's affect.
> Is this a bug?
>  Code:
> 
> #declare Lowermouth = union{
> torus{ 0.6, 0.2 texture{Bodytex} rotate<90,0,0>translate <0,-0.2,0>}
> torus{ 0.55, 0.19 texture{Bodytex} rotate<90,0,0>translate <0,-0.2,-0.25>}
> torus{ 0.5, 0.18 texture{Bodytex} rotate<90,0,0>translate <0,-0.2,-0.5>}
> torus{ 0.45, 0.165 texture{Bodytex} rotate<90,0,0>translate <0,-0.2,-0.75>}
> torus{ 0.4, 0.15 texture{Bodytex} rotate<90,0,0>translate <0,-0.2,-1>}
> torus{ 0.35, 0.15 texture{Bodytex} rotate<90,0,0>translate <0,-0.2,-1.25>scale
> <1,0.99,1>}
> torus{ 0.29, 0.15 texture{Bodytex} rotate<90,0,0>translate <0,-0.2,-1.5>scale
> <1,0.98,1>}
> torus{ 0.22, 0.15 texture{Bodytex} rotate<90,0,0>translate <0,-0.2,-1.75>scale
> <1,0.96,1>}
> torus{ 0.15, 0.15 texture{Bodytex} rotate<90,0,0>translate <0,-0.2,-2>scale
> <1,0.94,1>}
>                           }
> #declare Lowermouth1 = object { Lowermouth
>    bounded_by {
>       box {
>          <-3, -0.3, -3>, <3, -3, 3>
>           }
>               }
>                               }
> 
> 

Bounded_by is no shortcut for proper intersection.

The Lowermouth is so far inside a box of <-0.800,-1.000,-2.150 >,
<0.800,0.600,0.200>

So your bounded_by box <-3,-0.3, -3>,<3,-3,3> is overlapping (hence
bogus). Garbage in... garbage out.

#declare fom=min_extent(Lowermouth1);
#declare fom2=max_extent(Lowermouth1);
#debug "Hello\n"
#debug concat(vstr(3,fom,",",0,3),"\n")
#debug concat(vstr(3,fom2,",",0,3),"\n")
#debug "World\n"


Post a reply to this message

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