POV-Ray : Newsgroups : povray.binaries.images : Problem with f_rounded_box function : Re: Problem with f_rounded_box function Server Time
17 May 2024 05:31:24 EDT (-0400)
  Re: Problem with f_rounded_box function  
From: Christoph Hormann
Date: 13 Mar 2006 07:15:03
Message: <dv3nib$8ku$1@chho.imagico.de>
Sebastian H. wrote:
> 
> There's a problem with the PARAM_* used in the square roots.
> Actually they are the distance from the "inner box" and must
> be redefined as such before with the code you dropped.
> (Abusing the parameters for this is a bit ugly, but...)
> 
>   PARAM_X = x3 - x2;
>   PARAM_Y = y3 - y2;
>   PARAM_Z = z3 - z2;

As said - i did not yet test it.

> The addition of the square roots with reduced argument number looks good
> though I'm not sure whether by the third one anything is gained.
> It's one additional comparison to maybe save one multiplication and
> one addition.

Well - the most important reason is to maintain the beauty of symmetry 
in the code... ;-)

Christoph

-- 
POV-Ray tutorials, include files, Landscape of the week:
http://www.imagico.de/ (Last updated 31 Oct. 2005)
MegaPOV with mechanics simulation: http://megapov.inetart.net/


Post a reply to this message

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