|
|
A hand rail that will end in the background of a scene with stone work and the
front of a building.
The isosurface gives a smooth transistion from straight/twist/straight.
Also includes some CSG and a surface normal.
#local fn_A=function(x){abs(x)-1};
#local fn_B=function{abs(z)-.25};
#local fn_C=function{abs(y)-.25};
#local N=1;
#local fn_Smooth=function(x){x*x*x*(10+x*(6*x-15))};
#local fn_twistY=function{z*sin(fn_Smooth(x)*2*pi*N) +
y*cos(fn_Smooth(x)*2*pi*N)};
#local fn_twistZ=function{z*cos(fn_Smooth(x)*2*pi*N) -
y*sin(fn_Smooth(x)*2*pi*N)};
#local
fn_twist_Box=function{max(fn_A(x-1),fn_B(x,fn_twistY(x,y,z),fn_twistZ(x,y,z)),fn_C(x,fn_twistY(x,y,z),fn_twistZ(x,y,z))
)};
isosurface {
function {
fn_twist_Box(x-.5,y,z)
}
contained_by {box{<.5,-.5,-.5>,<1.5,.5,.5>}}
threshold 0
accuracy 0.001
max_gradient 10.58
max_trace 9
translate <-.5,0,0>
scale <10,1,1>
rotate <0,0,0>
}
Comments welcome:
Stephen S
Post a reply to this message
Attachments:
Download 'iso_smooth_twist_big.png' (232 KB)
Preview of image 'iso_smooth_twist_big.png'
|
|
|
|
"StephenS" <nomail@nomail> wrote:
> A hand rail that will end in the background of a scene with stone work and the
> front of a building.
>
> The isosurface gives a smooth transistion from straight/twist/straight.
> Also includes some CSG and a surface normal.
>
Good work, glad you figured it out.
I think the surface normals should probably be scaled down for the kind of
finish I would expect for this object. (probably ~2-4X)
How is the render time for the isosurface? For this kind of object, a
procedural mesh may be ideal, but requires a headache's worth of math and logic
coding :)
tgq
Post a reply to this message
|
|