POV-Ray : Newsgroups : povray.general : Strange behaviour? : Re: Strange behaviour? Server Time
2 Jul 2024 10:02:03 EDT (-0400)
  Re: Strange behaviour?  
From: Margus Ramst
Date: 7 Oct 1999 06:30:02
Message: <37FC75F4.8F7BB1DD@peak.edu.ee>
So why does manual bounding fix the problem?
What happens to the bounding boxes?

Margus

Ron Parker wrote:
> 
> 
> Ah, now it begins to make sense.  See, when you scale a sphere it
> multiplies the radius and the center by the scale factor unless it
> either already has a nonuniform transform in its list or the scale
> factor itself is nonuniform; in those two cases it uses the usual,
> more sophisticated methods.
> 
> Obviously, making the radius negative is a bad thing.  Here's the
> fix, in the function Scale_Sphere in spheres.c:
> 
>    if (Sphere->Trans == NULL)
>    {
>      VScaleEq(Sphere->Center, Vector[X]);
> 
> -    Sphere->Radius *= Vector[X];
> +    Sphere->Radius *= fabs(Vector[X]);
> 
>      Compute_Sphere_BBox(Sphere);
>    }


Post a reply to this message

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