POV-Ray : Newsgroups : povray.documentation.inbuilt : P2 f_spiral parameter appears to specify the radius, not the diameter. Server Time: 18 Jun 2019 16:39:45 GMT
  P2 f_spiral parameter appears to specify the radius, not the diameter. (Message 1 to 2 of 2)  
From: William F Pokorny
Subject: P2 f_spiral parameter appears to specify the radius, not the diameter.
Date: 5 Jun 2013 01:17:42
Message: <51ae91b6@news.povray.org>
Hi,
I believe the P2 f_spiral parameter specifies the radius and not the 
diameter as documented. Demonstration scene below.

Thanks.
Bill P.

//---------------------------------------------------------------------
//------------------------- f_spiralP2isR.pov -------------------------
//---------------------------------------------------------------------
// This scene using orthographic camera and a sphere of radius 1.0
// translated below a spiral function with P2 set to 1.0, shows the P2
// parameter for the function f_spiral in section "3.4.9.1.7.9 Internal
// Functions" is really the radius not the diameter. Documentation
// today reads:
//
// f_spiral(x,y,z, P0, P1, P2, P3, P4, P5):
//
//     P0 : Distance between windings
//     P1 : Thickness
//     P2 : Outer diameter of the spiral. The surface behaves
//          as if it is contained_by a sphere of this diameter
//     P3 : Not used
//     P4 : Not used
//     P5 : Cross section type
//
//----------------------------------------------------------------------
global_settings {
     assumed_gamma 1.0
     ambient_light srgb <1.0,1.0,1.0>
}
#declare Grey15 = rgb <0.15,0.15,0.15>;
background { color Grey15 }
#declare Picton_Blue = srgb <0.2706,0.6941,0.9098>;
#declare Camera00 = camera {
     orthographic
     location <0.0,7.0,-0.001>
     sky <0.0,1.0,0.0>
     angle 30.0
     right x*(image_width/image_height)
     look_at <0.0,0.05,0.0>
}
#declare White = srgb <1.0,1.0,1.0>;
#declare Light00 = light_source { <0.0,50.0,-0.0001>, White }
#declare SphereRadiusOne = sphere { <0.0,0.0,0.0>, 1.0
     pigment { color White }
     translate <0.0,-1.1,0.0>
}
#include "functions.inc"
#declare F_Spiral_00 = function {
     f_spiral(x,y,z,0.3,0.1,1.0,-99,-99,1.0)
}
#declare IsoThing = isosurface {
     function { F_Spiral_00(x,y,z) }
     contained_by { box { <-3.0,-3.0,-3.0>,<3.0,3.0,3.0> } }
     threshold 0.0
     accuracy 0.0001
     max_gradient 4.0
     max_trace 2
     pigment { color Picton_Blue }
}
#declare Thing = object {
     object { IsoThing }
     translate <0.0,0.0,0.0>
}
//--------------------------
light_source { Light00 }
camera { Camera00 }
object { Thing }
object { SphereRadiusOne }
//----------------------------------------------------------------------


Post a reply to this message

From: James Holsenback
Subject: Re: P2 f_spiral parameter appears to specify the radius, not the diameter.
Date: 5 Jun 2013 11:14:33
Message: <51af1d99@news.povray.org>
On 06/04/2013 09:17 PM, William F Pokorny wrote:
> Hi,
> I believe the P2 f_spiral parameter specifies the radius and not the
> diameter as documented.

thanks! indeed it does ... fixed
http://wiki.povray.org/content/Reference:Functions.inc#Internal_Functions


Post a reply to this message

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