|
|
Tor Olav Kristensen wrote:
>
> 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.
And here is a rewritten version for POV-Ray v3.5
Tor Olav
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
// Copyright 2002 by Tor Olav Kristensen
// Email: t o r _ o l a v _ k [ a t ] h o t m a i l . c o m
// http://hjem.sol.no/t-o-k/povray
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#version 3.5;
#include "colors.inc"
#include "functions.inc"
global_settings { ambient_light color White }
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
light_source {
<10, 0, -1>*5
color White*3
fade_distance 70
fade_power 3
shadowless
}
camera {
location <23, 8, -49>/2
look_at <0, 1, 0>
// angle 90
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare Fn = function(a) { floor(a) + 0.5 }
#declare CrackleFn =
function {
pattern {
crackle
scale 10
translate 130*x
}
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare SphereThreshold = 0.4; // Use values between 0 and 1
#declare SpheresRadius = 0.4; // Use values between 0 and 1
isosurface {
function {
select(
CrackleFn(Fn(x), Fn(y), Fn(z)) - SphereThreshold,
1,
f_sphere(x - Fn(x), y - Fn(y), z - Fn(z), SpheresRadius)
)
}
max_gradient 6
contained_by { sphere { <0, 0, 0>, 2000 } }
pigment { color (White + Blue)/3 }
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
Post a reply to this message
|
|