|
![](/i/fill.gif) |
camera {
location <(4/3)/2, 1, 0.5>
look_at <(4/3)/2, 0, 0.5>
}
light_source {<1, 5, 5> color rgb 1}
#include "functions.inc"
#macro Painter(pig, painterType, widthX, depthZ, strokesX, strokesZ)
// painterType = 0 - Van Gogh
// painterType = 1 - pointilism (Seurat, Signac, Cross...)
#local cntX = 0;
#local cntZ = 0;
#local lseed = seed(1000);
#local incrX = widthX/strokesX;
#local incrZ = depthZ/strokesZ;
#while(cntX < strokesX)
#local cntZ = 0;
#while(cntZ < strokesZ)
#declare currentPoint = <incrX*cntX, 0, incrZ*cntZ>;
#if(cntZ >= (strokesZ - 5))
#declare P1 = eval_pigment(pig, <currentPoint.x, 0,
currentPoint.z>);
#declare P2 = eval_pigment(pig, <currentPoint.x, 0, currentPoint.z -
incrZ*1>);
#declare P3 = eval_pigment(pig, <currentPoint.x, 0, currentPoint.z -
incrZ*2>);
#declare P4 = eval_pigment(pig, <currentPoint.x, 0, currentPoint.z -
incrZ*3>);
#declare P5 = eval_pigment(pig, <currentPoint.x, 0, currentPoint.z -
incrZ*4>);
#else
#declare P1 = eval_pigment(pig, <currentPoint.x, 0,
currentPoint.z>);
#declare P2 = eval_pigment(pig, <currentPoint.x, 0, currentPoint.z +
incrZ*1>);
#declare P3 = eval_pigment(pig, <currentPoint.x, 0, currentPoint.z +
incrZ*2>);
#declare P4 = eval_pigment(pig, <currentPoint.x, 0, currentPoint.z +
incrZ*3>);
#declare P5 = eval_pigment(pig, <currentPoint.x, 0, currentPoint.z +
incrZ*4>);
#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}};
#if(painterType = 0)
#declare Stroke = 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>}
};
#else
#declare Stroke = sphere{0, 2 texture{T1}};
#end
object{
Stroke
scale<0.02 + (0.01 * rand(lseed)), 0.004, 0.02>
scale 0.25 + (0.15 * rand(lseed))
scale 0.55
rotate -y*(10 + (10 * rand(lseed)))
translate<currentPoint.x + (incrX*rand(lseed)), 0, currentPoint.z +
(incrZ*rand(lseed))>
}
#local cntZ = cntZ + 1;
#end
#local cntX = cntX + 1;
#end
#end
#declare tahoe = pigment {
image_map{
jpeg "tahoe.jpg"
map_type 0
interpolate 0
once
}
scale <4/3, 1, 1>
rotate x*90
}
union {
//Painter(tahoe, 0, 4/3, 1, 120, 90) // Van Gogh
Painter(tahoe, 1, 4/3, 1, 160, 120) // pointilism
}
Post a reply to this message
|
![](/i/fill.gif) |