|
|
This is the source code for the "Spherical Splash" image that
I posted 6. March to the povray.binaries.images news group:
news://news.povray.org/3AA41C10.55F23524%40hotmail.com
MegaPOV is needed for this.
Have fun !
Tor Olav
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
// Copyright 2001 by Tor Olav Kristensen
// mailto:tor### [at] hotmailcom
// http://www.crosswinds.net/~tok
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
#version unofficial MegaPov 0.6;
#include "colors.inc"
// I "borrowed" radiosity settings, colors and texture from Gilles Tran
// and then I modified them a bit.
global_settings {
ini_option "+QR"
radiosity {
recursion_limit 4
brightness 1.4
normal on
error_bound 0.2
pretrace_start 0.08
pretrace_end 0.002
}
}
$ Blaa = color <0.22, 0.41, 0.79>;
$ Gul = color <0.95, 0.78, 0.42>;
$ OtherTexture =
texture {
pigment {
bozo
color_map {
[ 0 color White*0.7 ]
[ 1 color White*1.3 ]
}
}
normal {
agate 0.8
scale 3
}
finish {
ambient -0.3
diffuse 0.8
specular 0.1
roughness 0.1
metallic
brilliance 1
}
scale 0.5
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
// My iso functions
$ A = 4.0; // Frequency of noise
$ B = 0.5; // Amount of noise
$ C = 2.0; // Frequency of rotation
$ D = pi/12; // Amount of rotation
$ R = 2.1; // Sphere "radius"
$ Noise = function { 1 - 2*noise3d(x, y, z) }
$ Sphere = function { sqrt(x^2 + y^2 + z^2) }
$ NoisySphere = function { Sphere(x, y, z) - B*Noise(A*x, A*y, A*z) }
$ XAngle = function { D*Noise(C*(x + 50), C*y, C*z) }
$ YAngle = function { D*Noise(C*x, C*(y + 50), C*z) }
$ ZAngle = function { D*Noise(C*x, C*y, C*(z + 50)) }
$ RotSphere =
function {
NoisySphere(
( x*cos(YAngle) + ( y*sin(XAngle) + z*cos(XAngle))*sin(YAngle))*
cos(ZAngle) - ( y*cos(XAngle) - z*sin(XAngle))*sin(ZAngle),
( x*cos(YAngle) + ( y*sin(XAngle) + z*cos(XAngle))*sin(YAngle))*
sin(ZAngle) + ( y*cos(XAngle) - z*sin(XAngle))*cos(ZAngle),
(-x*sin(YAngle) + ( y*sin(XAngle) + z*cos(XAngle))*cos(YAngle))
)
}
$ IsoBall =
isosurface {
function { RotSphere(x, y, z) - R }
max_gradient 10
method 2
contained_by { sphere { <0, 0, 0>, R + B } }
}
object {
IsoBall
texture { OtherTexture }
rotate 20*y
no_shadow
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
// And then the environment
sky_sphere {
pigment {
gradient y
color_map {
[ 0 color White ]
[ 1 color Blaa ]
}
}
}
light_source {
1220*vnormalize(< -1, 6, 1>), color Gul
area_light 100*x, 100*z, 5, 5 jitter orient
}
camera {
location 10*vnormalize(< 1, 0.63, -1>)
look_at <0, 0, 0>
angle 45
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
Post a reply to this message
|
|