POV-Ray : Newsgroups : povray.advanced-users : Animating spline vertices in a sphere sweep? : Re: Animating spline vertices in a sphere sweep? Server Time
28 Jul 2024 10:28:04 EDT (-0400)
  Re: Animating spline vertices in a sphere sweep?  
From: Mike Williams
Date: 21 Mar 2006 22:01:26
Message: <4M3tsEAA4LIEFwcf@econym.demon.co.uk>
Wasn't it Mike who wrote:
>Has anyone ever tried to do the following?
>
>sphere_sweep {
>        cubic_spline
>             4 , // Num_of_spheres
>             #if (clock > 0.25) < 50 , 50 , 50 >, 8 #end
>             #if (clock > 0.5) < 50 , 60 , 50 >, 8 #end
>             #if (clock > 0.75) < 50 , 50 , 90 >, 8 #end
>             #if (clock > 0.9) < 50 , 40 , 50 >, 8 #end
>             texture {
>               pigment { color Red }
>               }
>        }
>
>I keep getting an error where povray expects a number expression and finds
>the texture { instead. I think its related to the number of spheres
>changing dynamically with the clock? Any suggestions? I would really prefer
>to use a sphere sweep.

The Num_of_spheres has to agree with the number of spheres.

When the clock has value 0.0, then your code evaluates to

sphere_sweep {
        cubic_spline
             4 , // Num_of_spheres
             texture {
               pigment { color Red }
               }
        } 

Num_of_spheres is still set to 4, but there are 0 spheres.

A cubic_spline with zero spheres isn't going to parse anyway. The
minimum is 4.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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