|
|
"Tek" <tek### [at] evilsuperbraincom> wrote:
> Ok the source for both objects is pretty small, so I'll just drop it in
> here:
That's two interesting isosurfaces Tek. Thank you for sharing the code.
I had a look at the source code for Greebelium to see if I could modify
it a bit so that I could understand it better. Below is the result.
--
Tor Olav
http://subcube.com
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8
======= 9
#include "colors.inc"
// Greebelium by Tek
#declare Pigment_Gr =
pigment { color Gray50 }
#declare Pigment_BlWh =
pigment {
crackle
metric 1
solid
colour_map {
[ 0.5 color Black ]
[ 0.5 color White ]
}
}
#declare Pigment_Funches =
pigment {
crackle
metric 1
pigment_map {
[ 0.0 Pigment_Gr ]
[ 0.1 Pigment_BlWh ]
}
}
#declare FunchesFn =
function {
pigment {
average
pigment_map {
#local I = 0;
#while (I < 3)
#local A = pow(4, -I);
[ A Pigment_Funches scale A ]
#local I = I + 1;
#end // while
}
}
}
#declare IsoFn =
function {
max(
y - FunchesFn(x, y, z).x,
0.5 + min(y, -FunchesFn(x, y, z).x)
)
}
isosurface {
function { IsoFn(x, y, z) }
max_gradient 20
contained_by {
box {
-<5, 1, 5>,
<5, 1, 5>
}
}
pigment { color White }
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 ======= 8
======= 9
Post a reply to this message
|
|