|
|
Below is the source code for an image I posted 18. Oct. to the
povray.binaries.images news group; "Inside the Crackle pattern"
news://news.povray.org/39ED7446.9FDB0DAA%40hotmail.com
Note that MegaPOV is needed for rendering of this iso-surface.
Tor Olav
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
// Copyright 2000 by Tor Olav Kristensen
// mailto:tor### [at] hotmailcom
// http://www.crosswinds.net/~tok/tokrays.html
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#version unofficial MegaPov 0.6;
#include "colors.inc"
global_settings { ambient_light color White }
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare CrackleFunction =
function {
pigment {
crackle
color_map {
[ 0 rgb 0 ]
[ 1 rgb 1 ]
}
scale 10
translate 130*x
}
}
#declare MidOfCrackleSquare =
function {
CrackleFunction(
floor(x) + 0.5,
floor(y) + 0.5,
floor(z) + 0.5
)
}
#declare SphereFunction =
function {
"sphere" <0.2>
}
#declare ManySpheres =
function {
SphereFunction(
x - floor(x) - 0.5,
y - floor(y) - 0.5,
z - floor(z) - 0.5
)
}
#declare Threshold = 1 - 0.6;
#declare CrackleSpheres =
isosurface {
function {
if(
MidOfCrackleSquare(x, y, z) - Threshold,
ManySpheres(x, y, z),
1
)
}
threshold 0.2
contained_by { sphere { <0, 0, 0>, 2000 } }
method 2
}
object {
CrackleSpheres
pigment { color White + Blue }
/*
pigment {
bozo
turbulence 0.7
color_map {
[ 0.0 color Blue ]
[ 1.0 color White ]
}
scale 4
}
*/
no_shadow
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
light_source {
5*<10, 0, -1>
// 4*<-5, 0, 2>
color White
fade_distance 70
fade_power 3
}
camera {
location <23, 8, -49>/2
look_at <0, 1, 0>
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
Post a reply to this message
|
|