POV-Ray : Newsgroups : povray.binaries.images : Spherical Sweep Bug or Something else? : Re: Spherical Sweep Bug or Something else? Server Time
4 Nov 2024 13:14:58 EST (-0500)
  Re: Spherical Sweep Bug or Something else?  
From: Tim Attwood
Date: 28 Mar 2010 06:00:21
Message: <4baf28b5$1@news.povray.org>
>I need some help figuring out this output I'm getting (Attached). I can't 
>tell
> if its a bug or someting else that I just don't know about like surface
> coincidence. I don't recognize what might be causing the planar like 
> objects.

> Can someone explain this?

Sphere sweep has been buggy since it's introduction in 3.6...

Here's a workaround that uses a macro instead...

// a sphere sweep
#macro Sweep(SPL, from, to, rez)
 #local eval_to = to;
 #local C = from;
 sphere {<SPL(C).x,SPL(C).y,SPL(C).z>,SPL(C).t}
 #while (C<eval_to-rez)
  cone {<SPL(C).x,SPL(C).y,SPL(C).z>,SPL(C).t,
  <SPL(C+rez).x,SPL(C+rez).y,SPL(C+rez).z>,SPL(C+rez).t}
  sphere {<SPL(C+rez).x,SPL(C+rez).y,SPL(C+rez).z>,
    SPL(C+rez).t}
  #local C=C+rez;
 #end
#end

// a spline for the sweep
#declare i_start = 0;
#declare i_stop = 3;
#declare i_step = 0.05;
#declare i_inc = i_start;
#declare wave = spline {
   natural_spline //linear_spline
   #while(i_inc <= i_stop)
      i_inc, <i_inc,0.23*sin(7.1*i_inc),0,0.05>
      #local i_inc = i_inc + i_step;
   #end
};

// the sweep object
union {
   Sweep(wave,0,3,0.005)
   pigment{color Orange}
}


Post a reply to this message

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