POV-Ray : Newsgroups : povray.general : Cone bug and the bounding box : Cone bug and the bounding box Server Time
11 Aug 2024 01:25:20 EDT (-0400)
  Cone bug and the bounding box  
From: J  Grimbert
Date: 4 Oct 1999 07:24:02
Message: <37F88E57.ACA66624@atos-group.com>
I had some time this sunday to investigate the problem.
The bounding box in the std distribution include a complete cone
(with the pointy extremity), even if the specified cone is truncated.


The correction is so easy, if you know were to look at
and understand the Cones code...
My guess is that the bounding box for the cone was made
when the cone was always complete, and then never touched again.

In cones.c, just replace the 0.0 by Cone->dist in Compute_Cone_BBox

void Compute_Cone_BBox(CONE *Cone)
{
/*
  Make_BBox(Cone->BBox, -1.0, -1.0, 0.0, 2.0, 2.0, 1.0);
*/
   Make_BBox(Cone->BBox, -1.0, -1.0, Cone->dist, 2.0, 2.0, 1.0);

  Recompute_BBox(&Cone->BBox, Cone->Trans);
}


That's all Folks!
I have put an explanation with a picture on
http://www.altern.org/grimbert/pov/index.html
--
J. Grimbert


Post a reply to this message

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