|
![](/i/fill.gif) |
ingo wrote:
>
> If, in the scene below, I change the y-axis rotation from 90 to 91 deg.
> POV-Ray mentions "creating bounding slabs" and goes on with that forever. At
> 90 deg it traces in a few seconds.
>
> What is it that happens here?
>
> ingo
>
> ----
> #version 3.1;
> #include "colors.inc"
> global_settings {
> assumed_gamma 1.0
> }
>
> light_source {<500,200,-500> rgb 1}
> camera {
> location <0.0, 3.0,-20.0>
> look_at <0.0, 3.0, 0.0>
> angle 35
> }
>
> #macro Spits(n,r)
> #local l=r*2;
> #local Tz=0;
> #while (n >=0)
> #local ru= (0.5*l)/sin(radians(180/n));
> #local Count=0;
> #local Rot=0;
> #while (Count<=n+1)
> sphere{
> <0,0,0>,r
> translate <(cos(radians(Rot)))*ru,(sin(radians(Rot))*ru),Tz>
> }
> #local Rot=Rot+(360/n);
> #local Count=Count+1;
> #end
> #local n=n-3;
> #local Tz=Tz-0.25;
> #end
> #end
>
> object{
> union{Spits(33,0.2)}
> rotate<90,90,0> // Change to rotate<90,91,0>
> pigment{White}
> }
The only problem I could discover was your line "#while (n >=0)"
followed by "#local ru= (0.5*l)/sin(radians(180/n));". If n starts as a
multiple of 3, and hence reaches 0, POV-Ray will crash while parsing
when it encounters the attempt to divide 180 by zero. Changing the
n >=0 to n >0 fixed that problem, after which I had no trouble rendering
with rotate <90, 91, 0> applied to the finished object (on POV-Ray 3.1
and 3.1a for DOS, nor 3.1a for Windows).
Post a reply to this message
|
![](/i/fill.gif) |