|
|
I have been asked for the source code for the "Iso-Cubism" image
that I posted 26. November 2000 to povray.binaries.images.
news://news.povray.org/3A21093C.4D45881A%40online.no
So here it is. (Requires MegaPOV)
--
Best regards,
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.5;
#include "colors.inc"
global_settings { ambient_light color White }
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
$ Xspacing = 4;
$ Yspacing = 4;
$ Zspacing = 4;
$ Xnr = 40;
$ Ynr = 40;
$ Znr = 40;
$ XmodFunction = function { x % Xspacing - if(x, 1, -1)*Xspacing/2 }
$ YmodFunction = function { y % Yspacing - if(y, 1, -1)*Yspacing/2 }
$ ZmodFunction = function { z % Zspacing - if(z, 1, -1)*Zspacing/2 }
//$ XdivFunction = function { x - XmodFunction(x, y, z) }
//$ YdivFunction = function { y - YmodFunction(x, y, z) }
//$ ZdivFunction = function { z - ZmodFunction(x, y, z) }
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
$ E = 6;
$ AA = 0.2;
$ F = 10;
$ BB = 0.6;
$ Thr = 1/10^5;
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
$ Xbars =
function {
(YmodFunction(x, y, z)^E + ZmodFunction(x, y, z)^E)^(1/E) - AA
}
$ Ybars =
function {
(XmodFunction(x, y, z)^E + ZmodFunction(x, y, z)^E)^(1/E) - AA
}
$ Zbars =
function {
(XmodFunction(x, y, z)^E + YmodFunction(x, y, z)^E)^(1/E) - AA
}
$ Cubes =
function {
(
XmodFunction(x, y, z)^F
+YmodFunction(x, y, z)^F
+ZmodFunction(x, y, z)^F
)^(1/F) - BB
}
$ Grid =
isosurface {
function {
1
+Thr
-Thr^Xbars(x ,y ,z)
-Thr^Ybars(x ,y ,z)
-Thr^Zbars(x ,y ,z)
-Thr^Cubes(x ,y ,z)
-(0.5 - noise3d(10*x, 10*y, 10*z))/4
}
max_gradient 15
method 2
contained_by {
box {
-<Xnr, Ynr, Znr>*<Xspacing, Yspacing, Zspacing>,
<Xnr, Ynr, Znr>*<Xspacing, Yspacing, Zspacing>
}
}
}
object {
Grid
pigment { color White }
no_shadow
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
light_source {
10*<-3, 2, 2>
color White + Blue
fade_distance 40
fade_power 10
}
$ RR = seed(314);
$ Cnt = 0;
#while (Cnt < 20)
light_source {
25*(<1, 1, 1>/2 - <rand(RR), rand(RR), rand(RR)>) + 12*<1, 0, 1>
color Red
fade_distance 3
fade_power 5
}
$ Cnt = Cnt + 1;
#end // while
camera {
location <Xspacing, Yspacing, Zspacing>*<-1.0, 0.9, -1.3>
look_at <Xspacing, Yspacing, Zspacing>*<-0.2, 0.5, -0.5>
angle 80
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
Post a reply to this message
|
|