|
|
Moin,
my English isn't the best, so I hope you can understand me...
I want to create an animation, where the number of points in sphere_sweep is
the same as the frame_number. For example POV-Ray is rendering frame number
5, the sphere_sweep also have 5 points and when he's rendering frame number
6, the same sphere_sweep as before have also 6 points.
The only idea I had, was to use many if-comments, but that's of course not
very good:
sphere_sweep {
linear_spline
frame_number+1,
first_point,R,
first_point,R
#if (frame_number = 2) ,second_point,R #end
#if (frame_number = 3) ,third_point,R #end
#if (frame_number = 4) ,forth_point,R #end
etc...
}
Is there a easier way, to make that, maybe with an array or something other?
Please help me...
Post a reply to this message
|
|
|
|
> I want to create an animation, where the number of points in sphere_sweep
> is
> the same as the frame_number. For example POV-Ray is rendering frame
> number
> 5, the sphere_sweep also have 5 points and when he's rendering frame
> number
> 6, the same sphere_sweep as before have also 6 points.
sphere_sweep can have bugs in the rendering, places that look wrong.
So I prefer to use a macro, and a spline... the 4th value is the radius.
#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
#declare path = spline {
natural_spline
-0.25, <0,0,0, 0.01>
0.00, <0.2,0,0.2, 0.01>
0.25, <0,0,0.4, 0.05>
0.50, <-0.2,0,0.6, 0.1>
0.75, <0,0,0.8, 0.05>
1.00, <0.2,0,1, 0.05>
1.25, <0,0,1.2, 0.05>
};
union {
Sweep(path, 0, clock, 0.01)
pigment {Red}
}
Post a reply to this message
|
|