POV-Ray : Newsgroups : povray.general : sphere_sweep Server Time
1 Aug 2024 10:18:41 EDT (-0400)
  sphere_sweep (Message 1 to 5 of 5)  
From: Philippe
Subject: sphere_sweep
Date: 29 Nov 2005 01:45:01
Message: <web.438bf5f286cded55e0f1edf70@news.povray.org>
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

From: Mike Williams
Subject: Re: sphere_sweep
Date: 29 Nov 2005 03:08:06
Message: <pnlZGQAmsAjDFwo0@econym.demon.co.uk>
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

From: Y Tanabe
Subject: Re: sphere_sweep
Date: 29 Nov 2005 03:14:41
Message: <438C8C8B.75F3AFDE@kh.rim.or.jp>
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

From: Burki
Subject: Re: sphere_sweep
Date: 29 Nov 2005 05:00:00
Message: <web.438c2625e57ca3da4f17dd8d0@news.povray.org>
"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

From: Philippe
Subject: Re: sphere_sweep
Date: 29 Nov 2005 14:45:00
Message: <web.438cae95e57ca3dabf30998c0@news.povray.org>
Thanks to everybody. b_spline works fine.

Don't know why MegaPov (I tried with 1.2.1) works differently than PovRay,
but it looks like a bug in PovRay.

Regards

Philippe


Post a reply to this message

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