POV-Ray : Newsgroups : povray.newusers : A simple Sphere_Sweep question : Re: A simple Sphere_Sweep question Server Time
5 Jul 2024 04:50:21 EDT (-0400)
  Re: A simple Sphere_Sweep question  
From: Jim Charter
Date: 31 Jul 2010 14:43:11
Message: <4c546ebf@news.povray.org>
tgl wrote:
> Hello group
> Could some understanding person out there please show
> how they would code a sphere_sweep b_spline of a 180
> degree circular arc into POV.
> And...How would the above arc be coded as a sphere_
> sweep natural_spline?
> Thank you.
> 
> 
camera {
   location  <0,0,-50>
   look_at   <0.0, 0.0,  0.0>
   right     x*image_width/image_height
}

// create a regular point light source
light_source {
   0*x                  // light's position (translated below)
   color rgb <1,1,1>    // light's color
   translate vrotate(<0,0,-100>,<60,60,0>)
}
sphere { 0, .5 pigment {rgb y}}
cylinder { <-30,0,0>,<30,0,0>,.25 pigment{rgb y}}

// create a curved tube object translating a sphere along a certain path
//object {
sphere_sweep {

   cubic_spline

   21,
   #local I=-1;#while(I<20)
     vrotate (<20,0,0>,<0,0,I*10>), .5
   #local I=I+1;#end

   pigment{rgb x}

}


Post a reply to this message

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