Applied some very old changes found on teal
This commit is contained in:
parent
1e320c2683
commit
eddbcf6f65
|
@ -2,62 +2,58 @@
|
||||||
#local R1 = 1000;
|
#local R1 = 1000;
|
||||||
#local R2 = 0;
|
#local R2 = 0;
|
||||||
|
|
||||||
#local C = array[2][2][2] {
|
|
||||||
{
|
|
||||||
{
|
|
||||||
<-R1 + R2 * (rand(RND1)*2-1), -R1 + R2 * (rand(RND1)*2-1), -R1 + R2 * (rand(RND1)*2-1)>,
|
|
||||||
<-R1 + R2 * (rand(RND1)*2-1), -R1 + R2 * (rand(RND1)*2-1), +R1 + R2 * (rand(RND1)*2-1)>,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<-R1 + R2 * (rand(RND1)*2-1), +R1 + R2 * (rand(RND1)*2-1), -R1 + R2 * (rand(RND1)*2-1)>,
|
|
||||||
<-R1 + R2 * (rand(RND1)*2-1), +R1 + R2 * (rand(RND1)*2-1), +R1 + R2 * (rand(RND1)*2-1)>,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
{
|
|
||||||
{
|
|
||||||
<+R1 + R2 * (rand(RND1)*2-1), -R1 + R2 * (rand(RND1)*2-1), -R1 + R2 * (rand(RND1)*2-1)>,
|
|
||||||
<+R1 + R2 * (rand(RND1)*2-1), -R1 + R2 * (rand(RND1)*2-1), +R1 + R2 * (rand(RND1)*2-1)>,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
<+R1 + R2 * (rand(RND1)*2-1), +R1 + R2 * (rand(RND1)*2-1), -R1 + R2 * (rand(RND1)*2-1)>,
|
|
||||||
<+R1 + R2 * (rand(RND1)*2-1), +R1 + R2 * (rand(RND1)*2-1), +R1 + R2 * (rand(RND1)*2-1)>,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#declare posbi = mesh2 {
|
#declare posbi0 =
|
||||||
vertex_vectors {
|
box {
|
||||||
14,
|
<-R1, -R1, -R1>, <R1, R1, R1>
|
||||||
C[0][0][0],
|
texture { pigment { color rgb <1, 1, 1> } }
|
||||||
C[0][0][1],
|
|
||||||
C[0][1][0],
|
|
||||||
C[0][1][1],
|
|
||||||
C[1][0][0],
|
|
||||||
C[1][0][1],
|
|
||||||
C[1][1][0],
|
|
||||||
C[1][1][1],
|
|
||||||
(C[0][0][0] + C[0][0][1] + C[0][1][0] + C[0][1][1])/4,
|
|
||||||
(C[1][0][0] + C[1][0][1] + C[1][1][0] + C[1][1][1])/4,
|
|
||||||
(C[0][0][0] + C[0][0][1] + C[1][0][0] + C[1][0][1])/4,
|
|
||||||
(C[0][1][0] + C[0][1][1] + C[1][1][0] + C[1][1][1])/4,
|
|
||||||
(C[0][0][0] + C[0][1][0] + C[1][0][0] + C[1][1][0])/4,
|
|
||||||
(C[0][0][1] + C[0][1][1] + C[1][0][1] + C[1][1][1])/4,
|
|
||||||
}
|
}
|
||||||
texture_list {
|
|
||||||
4
|
#declare Foo = function(r, lo, hi) { r + lo + hi }
|
||||||
texture { pigment { color rgb <0.5, 0.5, 0.5> } }
|
|
||||||
texture { pigment { color rgb <0.9, 0.5, 0.5> } }
|
#declare rand2 = function(R, Lo, Hi) { R * (Hi - Lo) - Lo }
|
||||||
texture { pigment { color rgb <0.5, 0.9, 0.5> } }
|
|
||||||
texture { pigment { color rgb <0.5, 0.5, 0.9> } }
|
#declare posbi1 = union {
|
||||||
}
|
object { posbi0 }
|
||||||
face_indices {
|
|
||||||
24
|
#local S = 200;
|
||||||
<0, 1, 8>, 0, <1, 2, 8>, 1, <2, 3, 8>, 2, <3, 0, 8>, 3,
|
#local X = -2*R1;
|
||||||
<4, 5, 9>, 0, <5, 6, 9>, 1, <6, 7, 9>, 2, <7, 4, 9>, 3,
|
#while (X <= 2*R1)
|
||||||
<0, 1, 10>, 0 <1, 4, 10>, 1, <4, 5, 10>, 2, <5, 0, 10>, 3,
|
#local Y = -2*R1;
|
||||||
<2, 3, 11>, 0 <3, 6, 11>, 1, <6, 7, 11>, 2, <7, 2, 11>, 3,
|
#while (Y <= 2*R1)
|
||||||
<0, 2, 12>, 0 <2, 4, 12>, 1, <4, 6, 12>, 2, <6, 0, 12>, 3,
|
#local P = trace(posbi0, <X, Y, 2*R1>, -<X, Y, 2*R1>);
|
||||||
<1, 3, 13>, 0 <3, 5, 13>, 1, <5, 7, 13>, 2, <7, 1, 13>, 3,
|
|
||||||
|
#switch (rand(RND1) * 3)
|
||||||
|
#range(0, 1)
|
||||||
|
box {
|
||||||
|
<-1, -1, -1>
|
||||||
|
<+1, +1, +1>
|
||||||
|
scale S/2
|
||||||
|
#if (1)
|
||||||
|
matrix <
|
||||||
|
rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5),
|
||||||
|
rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5),
|
||||||
|
rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5), rand2(rand(RND1), -0.5, 0.5),
|
||||||
|
0, 0, 0
|
||||||
|
>
|
||||||
|
#end
|
||||||
|
translate P
|
||||||
|
texture { pigment { color rgb <1, 0, 0> } }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#break
|
||||||
|
#end
|
||||||
|
|
||||||
|
#local Y = Y + 2*S; // YYY
|
||||||
|
#end
|
||||||
|
|
||||||
|
#local X = X + 2*S; // XXX
|
||||||
|
#end
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#declare posbi =
|
||||||
|
object {
|
||||||
|
posbi1
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,8 @@ mesh2 {
|
||||||
5,
|
5,
|
||||||
<-1, -1, 0>,
|
<-1, -1, 0>,
|
||||||
<-1, +1, 0>,
|
<-1, +1, 0>,
|
||||||
<+1, -1, 0>,
|
|
||||||
<+1, +1, 0>,
|
<+1, +1, 0>,
|
||||||
|
<+1, -1, 0>,
|
||||||
< 0, 0, 0>,
|
< 0, 0, 0>,
|
||||||
}
|
}
|
||||||
texture_list {
|
texture_list {
|
||||||
|
|
|
@ -16,7 +16,7 @@ light_source {
|
||||||
color White
|
color White
|
||||||
}
|
}
|
||||||
|
|
||||||
#local CP = <+5000, +2500, -1000>;
|
#local CP = <+5000, +2500, 10000>;
|
||||||
light_source {
|
light_source {
|
||||||
CP
|
CP
|
||||||
color White*0.5
|
color White*0.5
|
||||||
|
@ -30,6 +30,7 @@ light_source {
|
||||||
//}
|
//}
|
||||||
camera {
|
camera {
|
||||||
location CP
|
location CP
|
||||||
|
angle 40
|
||||||
look_at <-0, 900, -0>
|
look_at <-0, 900, -0>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ camera {
|
||||||
|
|
||||||
object {
|
object {
|
||||||
posbi
|
posbi
|
||||||
|
translate <0, 1000, 0>
|
||||||
}
|
}
|
||||||
|
|
||||||
#declare gatter =
|
#declare gatter =
|
||||||
|
@ -71,10 +73,11 @@ camera {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (0)
|
||||||
object {
|
object {
|
||||||
gatter
|
gatter
|
||||||
rotate <90, 0, 0>
|
rotate <90, 0, 0>
|
||||||
scale 100
|
scale 100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#end
|
||||||
|
|
Loading…
Reference in New Issue