|
|
I am pulling what is left of my hair out trying to get this to work.
Hopefully an eagle eye in here will spot my error.
I am trying to create a sweep of spheres using a spline. The sweep
should follow along the surface of a bezier_spline lathe object.
However, none of the spline types (linear, quadratic, cubic, natural)
seem to correspond to the bezier_spline lathe. Am I just doing something
wrong, or are bezier splines an ommission in the spline object? And if
they're an ommission, any suggestions for how to sweep spheres along a
bezier spline?
Thanks!
Scott Gammans
Washington, DC
===============
//Test scene follows:
#global_settings {
assumed_gamma 1
max_trace_level 5
}
#declare testTexture = texture {
pigment {color rgb 1}
}
// Here's the bezier_spline lathe along which
// I want to sweep some spheres:
lathe {
bezier_spline
8
<0.0,10.0>
<0.0,7.5>
<1.5,7.5>
<1.5,5.0>
<1.5,5.0>
<1.5,2.5>
<0.0,2.5>
<0.0,0.0>
sturm
texture {testTexture}
translate <0,-5,-5.5>
}
// Here's the spline, which has the same u,v points:
#local sphereSpline = spline {
0,<0.0,10.0>
1,<0.0,7.5>
2,<1.5,7.5>
3,<1.5,5.0>
4,<1.5,5.0>
5,<1.5,2.5>
6,<0.0,2.5>
7,<0.0,0.0>
}
// Linear spline definitely doesn't match:
union {
#local ctr=0;
#while (ctr<=7)
sphere {sphereSpline(ctr,linear_spline),0.25}
#declare ctr=ctr+0.01;
#end
texture {testTexture}
rotate y*90
translate <0,-5,-1.5>
}
// Neither does quadratic_spline:
union {
#local ctr=0;
#while (ctr<=7)
sphere {sphereSpline(ctr,quadratic_spline),0.25}
#declare ctr=ctr+0.01;
#end
texture {testTexture}
rotate y*90
translate <0,-5,1>
}
// Nor does cubic_spline:
union {
#local ctr=0;
#while (ctr<=7)
sphere {sphereSpline(ctr,cubic_spline),0.25}
#declare ctr=ctr+0.01;
#end
texture {testTexture}
rotate y*90
translate <0,-5,3.5>
}
// Nor does natural_spline:
union {
#local ctr=0;
#while (ctr<=7)
sphere {sphereSpline(ctr,natural_spline),0.25}
#declare ctr=ctr+0.01;
#end
texture {testTexture}
rotate y*90
translate <0,-5,6>
}
light_source {
x*1000
color rgb 0.25
}
camera {
orthographic
location x*7
look_at 0
angle 90
right image_width/image_height*x
up y
}
Post a reply to this message
|
|