|
|
Hi everyone,
I'm trying to use functions as a pattern for isosurface functions in the
same way as we use pattern functions (like bozo) in color maps to pick up a
color.
I'm going to use them in landscapes so the functions are in form
y = f(x, z) or in other words y - f(x, 0, z) = 0
My problem is how to use spline as a function to blend the pattern. I think
there is some syntax error in my code.
This code should place stone fields on a terrain to the places where the
pattern function get greater values than 0.6. However it dosen't work and I
don't know why... Any ideas?
-Kalle
#declare fn_Blending = function {
spline {
linear_spline
0.0, <0, 0>
0.4, <0, 0>
0.6, <1, 0>
1.0, <1, 0>
}
}
#declare fn_BlendedPattern = function(x, y, z) {
fn_Blending(fn_PlacementPattern(x, y, z)).x }
isosurface {
function {
y - fn_BasicTerrain(x, y, z) - fn_BlendedPattern(x, y, z) *
fn_StoneField(x, y, z)
}
...
}
Post a reply to this message
|
|