POV-Ray : Newsgroups : povray.general : sphere_sweep : sphere_sweep Server Time
1 Aug 2024 10:19:21 EDT (-0400)
  sphere_sweep  
From: Philippe
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

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