|
|
camera {
orthographic
location <(4/3)/2, 0.5, -1>
look_at <(4/3)/2, 0.5, 0>
}
light_source {<1, 5, -5> color rgb 1}
#include "functions.inc"
#macro Monet (pigm, strokesX, strokesY)
#local widthX = 4/3;
#local heightY = 1;
#local cntX = 0;
#local cntY = 0;
#local lseed = seed(1000);
#local incrX = widthX/strokesX;
#local incrY = heightY/strokesY;
blob {
threshold 0.65
#while(cntX < strokesX)
#local cntY = 0;
#while(cntY < strokesY)
#declare currentPoint = <incrX*cntX, incrY*cntY, 0>;
#declare P = eval_pigment(pigm, <currentPoint.x, currentPoint.y,
0>);
#local T = texture{pigment{P} finish{ambient 0.4 phong 0.5}};
sphere {<0, 0, 0>, 1, 2
texture{T}
scale<1.6, 1, 1>
scale <1.6 * incrX, 1.25 * incrX, (1.25 * incrX) + (1.2 * incrX *
rand(lseed))>
scale 1 + (0.2 * rand(lseed))
rotate z*(-20 + (20 * rand(lseed)))
translate<currentPoint.x + (incrX*rand(lseed)), currentPoint.y +
(incrY*rand(lseed)), 0>
}
#local cntY = cntY + 1;
#end
#local cntX = cntX + 1;
#end
scale z*0.14
}
#end
#macro VanGogh (pigm, strokesX, strokesY)
#local widthX = 4/3;
#local heightY = 1;
#local cntX = 0;
#local cntY = 0;
#local lseed = seed(1000);
#local incrX = widthX/strokesX;
#local incrY = heightY/strokesY;
#while(cntX < strokesX)
#local cntY = 0;
#while(cntY < strokesY)
#declare currentPoint = <incrX*cntX, incrY*cntY, 0>;
#if(cntY >= (strokesY - 5))
#declare P1 = eval_pigment(pigm, <currentPoint.x, currentPoint.y,
0>);
#declare P2 = eval_pigment(pigm, <currentPoint.x, currentPoint.y -
incrY*1, 0>);
#declare P3 = eval_pigment(pigm, <currentPoint.x, currentPoint.y -
incrY*2, 0>);
#declare P4 = eval_pigment(pigm, <currentPoint.x, currentPoint.y -
incrY*3, 0>);
#declare P5 = eval_pigment(pigm, <currentPoint.x, currentPoint.y -
incrY*4, 0>);
#else
#declare P1 = eval_pigment(pigm, <currentPoint.x, currentPoint.y,
0>);
#declare P2 = eval_pigment(pigm, <currentPoint.x, currentPoint.y +
incrY*1, 0>);
#declare P3 = eval_pigment(pigm, <currentPoint.x, currentPoint.y +
incrY*2, 0>);
#declare P4 = eval_pigment(pigm, <currentPoint.x, currentPoint.y +
incrY*3, 0>);
#declare P5 = eval_pigment(pigm, <currentPoint.x, currentPoint.y +
incrY*4, 0>);
#end
#local T1 = texture{pigment{P1} finish{ambient 0.4 phong 0.5}};
#local T2 = texture{pigment{P2} finish{ambient 0.4 phong 0.5}};
#local T3 = texture{pigment{P3} finish{ambient 0.4 phong 0.5}};
#local T4 = texture{pigment{P4} finish{ambient 0.4 phong 0.5}};
#local T5 = texture{pigment{P5} finish{ambient 0.4 phong 0.5}};
blob {
threshold 0.65
sphere { <0, 0, 0>, 1, 2 scale<5, 1, 1> texture{T5} translate<1, 0,
1.4>}
sphere { <0, 0, 0>, 1, 2 scale<5, 1, 1> texture{T4} translate<2, 0,
0.7>}
sphere { <0, 0, 0>, 1, 2 scale<5, 1, 1> texture{T3}}
sphere { <0, 0, 0>, 1, 2 scale<5, 1, 1> texture{T2} translate<3, 0,
-0.6>}
sphere { <0, 0, 0>, 1, 2 scale<4, 1, 1> texture{T1} translate<0.8,
0, -1.2>}
rotate -x*90
scale<0.4 * incrX, 0.4 * incrX, 0.001 + (0.001 * rand(lseed))>
rotate z*(-5 + (30 * rand(lseed)))
translate<currentPoint.x + (incrX*rand(lseed)), currentPoint.y +
(incrY*rand(lseed)), 0>
}
#local cntY = cntY + 1;
#end
#local cntX = cntX + 1;
#end
#end
#macro Signac (pigm, strokesX, strokesY)
#local widthX = 4/3;
#local heightY = 1;
#local cntX = 0;
#local cntY = 0;
#local lseed = seed(1000);
#local incrX = widthX/strokesX;
#local incrY = heightY/strokesY;
#while(cntX < strokesX)
#local cntY = 0;
#while(cntY < strokesY)
#declare currentPoint = <incrX*cntX, incrY*cntY, 0>;
#declare P = eval_pigment(pigm, <currentPoint.x, currentPoint.y, 0>);
#local T = texture{pigment{P} finish{ambient 0.4 phong 0.5}};
sphere{0, 2
texture{T}
scale<0.45 * incrX, 0.45 * incrX, 0.0002 + (0.0002 * rand(lseed))>
translate<currentPoint.x + (incrX*rand(lseed)), currentPoint.y +
(incrY*rand(lseed)), 0>
}
#local cntY = cntY + 1;
#end
#local cntX = cntX + 1;
#end
#end
#macro Picasso (pigm, strokesX, strokesY)
#local widthX = 4/3;
#local heightY = 1;
#local cntX = 0;
#local cntY = 0;
#local lseed = seed(1000);
#local incrX = widthX/strokesX;
#local incrY = heightY/strokesY;
#while(cntX < strokesX)
#local cntY = 0;
#while(cntY < strokesY)
#declare currentPoint = <incrX*cntX, incrY*cntY, 0>;
#declare P = eval_pigment(pigm, <currentPoint.x, currentPoint.y, 0>);
#local T = texture{pigment{P} finish{ambient 0.4 phong 0.5}};
box{-1, 1
texture{T}
scale<0.9 * incrX, 0.9 * incrX, 0.002 + (0.002 * rand(lseed))>
translate<currentPoint.x, currentPoint.y, 0>
}
#local cntY = cntY + 1;
#end
#local cntX = cntX + 1;
#end
#end
#macro Mondrian (pigm, strokesX, strokesY)
#local widthX = 4/3;
#local heightY = 1;
#local cntX = 0;
#local cntY = 0;
#local lseed = seed(1000);
#local incrX = widthX/strokesX;
#local incrY = heightY/strokesY;
#while(cntX < strokesX)
#local cntY = 0;
#while(cntY < strokesY)
#declare currentPoint = <incrX*cntX, incrY*cntY, 0>;
#declare P = eval_pigment(pigm, <currentPoint.x, currentPoint.y, 0>);
#local T = texture{pigment{P} finish{ambient 0.4 phong 0.5}};
union {
difference{
box{-1.1, 1.1}
box{<-1, -1, -2>, <1, 1, 2>}
pigment{color rgb 0}
finish{ambient 0.4 phong 0.5}
}
box{-1, 1
texture{T}
}
scale<1.2 * incrX, 1.2 * incrX, 0.01 * rand(lseed)>
translate<currentPoint.x, currentPoint.y, 0>
}
#local cntY = cntY + 1;
#end
#local cntX = cntX + 1;
#end
#end
#macro Pollock (pigm, strokesX, strokesY)
#local widthX = 4/3;
#local heightY = 1;
#local cntX = 0;
#local cntY = 0;
#local lseed = seed(1000);
#local incrX = widthX/strokesX;
#local incrY = heightY/strokesY;
blob {
threshold 0.65
#while(cntX < strokesX)
#local cntY = 0;
#while(cntY < strokesY)
#declare currentPoint = <incrX*cntX, incrY*cntY, 0>;
#declare P = eval_pigment(pigm, <currentPoint.x, currentPoint.y,
0>);
#local T = texture{pigment{P} finish{ambient 0.4 phong 0.5}};
cylinder {<-1, 0, 0>, <1, 0, 0>, 1, 2
texture{T}
scale <2.5 * incrX, 0.6 * incrX, (0.6 * incrX) + (0.04 *
rand(lseed))>
rotate z*360*rand(lseed)
translate<currentPoint.x + (incrX*rand(lseed)), currentPoint.y +
(incrY*rand(lseed)), 0>
}
#local cntY = cntY + 1;
#end
#local cntX = cntX + 1;
#end
scale z*0.2
}
#end
#declare tahoe = pigment {
image_map{
jpeg "tahoe.jpg"
map_type 0
interpolate 0
once
}
scale <4/3, 1, 1>
}
union {
plane{-z, 0 pigment{tahoe} finish{ambient 0.4}}
//Monet(tahoe, 120, 90)
//VanGogh(tahoe, 120, 90)
//Signac(tahoe, 120, 90)
//Picasso(tahoe, 80, 60)
//Mondrian(tahoe, 40, 30)
Pollock(tahoe, 120, 90)
}
Post a reply to this message
|
|