|
|
I was playing around with the examples on Mike William's Isosurface Tutorial
page (excellent site, I bookmarked it and refer to it constantly). The one
I'm focused on is a parametric lathe that uses a spline to define different
profiles in two axes. I'm wondering if there is a way to produce a similar
object without the point at the top. I tried moving the endpoint of the
spline closer to the second point but the object distorts as if there is an
asymptote there. What I'm looking for is an object bound by splines with
rounded ends. Here is an example rendering and the code used to generate
it:
// Almost a lathe
#version 3.5;
camera { location <3, 3, -5> look_at <0, 0, 0> angle 25}
sky_sphere { pigment {
function{abs(y)}
color_map { [0.0 color blue 0.6] [1.0 color rgb 1] }
}
}
light_source {<100,200,-500> colour rgb 1}
// The open 1D spline (lathe)
#declare S = function {
spline {
natural_spline
-1, < 0.0, 0, 0.0>,
-0.8, < 0.4, 0, 0.5>,
-0.5, < 0.2, 0, 0.2>,
-0.2, < 0.2, 0, 0.2>,
0.3, < 0.8, 0, 0.4>,
0.4, < 0.0, 0, 0.0>
}
}
#declare Fx = function(x,y) {(S(u).x * sin(v)/2)}
#declare Fy = function(x,y) {u}
#declare Fz = function(x,y) {(S(u).z * cos(v)/2)}
#declare Umin = -1;
#declare Umax = 1;
#declare Vmin = -pi;
#declare Vmax = 1.001*pi;
parametric {
function {Fx(u,v)}
function {Fy(u,v)}
function {Fz(u,v)}
<Umin,Vmin>,<Umax,Vmax>
contained_by{box{-1,1}}
precompute 18, x,y,z
pigment {rgb 0.9}
finish {phong 0.5 phong_size 10 ambient 0.2}
}
Post a reply to this message
Attachments:
Download 'param.jpg' (7 KB)
Preview of image 'param.jpg'
|
|