|
|
Hi,
I'm trying to make a kind of helix around a sphere, using sphere_sweep.
The result is ok, except some strange effects.
Here is the code :
//--------------------------------------------------------------------------
// perspective (default) camera
camera {
location <0.0, 0.0, -10.0>
look_at <0.0, 0.0, 0.0>
right x*image_width/image_height
}
// sun ---------------------------------------------------------------------
light_source{<1500,2500,-2500> color rgb <1, 1, 1>}
// Create an infinite sphere around scene and allow any pigment on it
sky_sphere { pigment { gradient <0,1,0>
color_map { [0.00 rgb <0.6,0.7,1.0>]
[0.35 rgb <0.0,0.1,0.8>]
[0.65 rgb <0.0,0.1,0.8>]
[1.00 rgb <0.6,0.7,1.0>]
}
scale 2
} // end of pigment
} //end of skysphere -------------------------------------
//--------------------------------------------------------------------------
//---------------------------- objects in scene ----------------------------
//--------------------------------------------------------------------------
#declare R = 2;
#declare r = 0.1;
#declare n = 500;
#declare s = 8;
sphere_sweep
{
linear_spline
n,
#declare Ind = 0;
#while (Ind < n)
<R*sin(Ind*pi/n)*cos(Ind*2*s*pi/n), R*cos(Ind*pi/n),
R*sin(Ind*pi/n)*sin(Ind*2*s*pi/n)>, r
#declare Ind = Ind + 1;
#end
texture
{
pigment
{
color rgb < 1.0, 0.65, 0.0>
}
finish
{
diffuse 0.9 phong 1 reflection 0.00
}
}
}
Run it, and you'll see some extra "filaments" that I can't explain.
Any idea ?
I'm using PovRay 3.6 on Windows XP.
Regards
Philippe
Post a reply to this message
|
|
|
|
Wasn't it Philippe who wrote:
>Hi,
>
>I'm trying to make a kind of helix around a sphere, using sphere_sweep.
>The result is ok, except some strange effects.
I don't know what causes those artefacts when n is large, but you might
consider making n smaller and using b_spline or cubic_spline
interpolation instead of linear_spline. Don't make n too small or the
path starts to take a short cut and produces a thinner spiral. For
b_spline, n=100 produces reasonable results with smoother results and
four times faster than linear_spline with n=500.
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|
|
|
Dear Philippe San
I am using Mega POV-Ray 0.7 on PowerMac with OS 8.1J.
But I can not see any extra "filaments" .
Y.Tanabe
Kobe,Japan
Philippe wrote:
> Hi,
>
> I'm trying to make a kind of helix around a sphere, using sphere_sweep.
> The result is ok, except some strange effects.
> Here is the code :
> Run it, and you'll see some extra "filaments" that I can't explain.
>
> Any idea ?
>
> I'm using PovRay 3.6 on Windows XP.
>
> Regards
>
> Philippe
Post a reply to this message
|
|
|
|
"Philippe" <phs### [at] club-internetfr> wrote:
> Hi,
>
> I'm trying to make a kind of helix around a sphere, using sphere_sweep.
> Run it, and you'll see some extra "filaments" that I can't explain.
>
> Any idea ?
Hi!
Can be self shading. In the making of the sweep the individual spheres cast
shadows on each other. That's at least what I understood.
Adjusting the tolerance value in the sweep does not help here.
Just as Mike said:
b_spline instead of linear_spline.
That's everything to change.
At least in povray3.6 on winXP.
Funny, that Y.Tanabe doesn't have these artefacts with MegaPov.
Yours,
Bu.
Post a reply to this message
|
|