|
![](/i/fill.gif) |
// Persistence of Vision Ray Tracer Scene Description File
// File: fleacity.pov
// Vers: 3.6
// Desc: Hairs with windows
// Date: 3/2/2005
// Auth: Tim Attwood
//
#version 3.5;
#include "colors.inc"
#include "functions.inc"
#include "finish.inc"
global_settings {
assumed_gamma 1.0
}
// ----------------------------------------
camera {
location <0.0, 1, -2.0>
direction 1.5*z
right x*image_width/image_height
look_at <0.0, 0.0, 0.0>
}
sky_sphere {
pigment {
gradient y
color_map {
[0.0 rgb <0.6,0.7,1.0>]
[0.7 rgb <0.0,0.1,0.8>]
}
}
}
light_source {
<0, 0, 0> // light's position (translated below)
color rgb <1, 1, 1> // light's color
translate <-30, 30, -30>
}
// ----------------------------------------
#declare grass = function { (y+1) - f_noise3d(x * 4, y * 4, z * 4) *1 };
#declare g1 = isosurface { // a noisy plane
function { grass(x,y,z)}
contained_by { box { <-10,-1,-10>,<10,2,10> } }
evaluate 200,2,1
pigment {checker Red White}
};
#declare R1 = seed(0);
#declare fur = function { // for picking random hair color
pigment {
gradient x
color_map {
[0 Gray90]
[0.1 Yellow]
[0.2 Tan]
[0.5 Brown]
[0.9 Black]
[1 Black]
}
}
};
#declare grid = 0.04;
#declare base = 0.02;
#declare tip = 0.01;
union {
#declare Col = -3;
#while (Col < 10)
#declare Row = -6.5;
#while (Row < 6.5)
#declare Spot = trace(g1,<Row,3,Col>,<0,-1,0>);
//#declare adj = Spot.y+1;
//#declare opp = grid/2;
#declare ang = atan2(grid/2,Spot.y+1)*180/3.1416; // maximum random
angle
#declare RX = rand(R1)*ang*2-ang; // random rotate
#declare RZ = rand(R1)*ang*2-ang;
union {
sphere {<0,Spot.y+1,0>,tip}
#switch (Col) //reduce number of windows in areas they aren't
seen
#range (-2.2,2.2)
difference {
cone{<0,0,0>,base,<0,Spot.y+1,0>,tip}
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-2*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-5*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-8*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-11*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-14*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-17*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-20*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-23*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-26*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-29*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-32*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-35*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-38*tip,0> }
}
cone{<0,0,0>,base-tip/2,<0,Spot.y+1,0>,tip-tip/2
texture {
pigment {Blue}
finish {
reflection { 0.03, 1 }
}
}
}
#break
#range (2.2000001,7)
difference {
cone{<0,0,0>,base,<0,Spot.y+1,0>,tip}
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-2*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-5*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-8*tip,0> }
box{<-0.375*tip,0,-1>,<0.375*tip,tip*2,0> translate
<0,Spot.y+1-11*tip,0> }
}
cone{<0,0,0>,base-tip/2,<0,Spot.y+1,0>,tip-tip/2
texture {
pigment {Blue}
finish {
reflection { 0.03, 1 }
}
}
}
#break
#else
cone{<0,0,0>,base,<0,Spot.y+1,0>,tip}
#end
#declare rpig = fur(rand(R1),0,0);
texture {
pigment {color rpig }
finish {Dull}
}
rotate <RX,0,RZ>
translate <Spot.x,-1,Spot.z>
}
#declare Row = Row + grid;
#end
#declare Col = Col + grid;
#end
/* // the isosurface
object {
g1
} */
plane {
y,
-1.0
texture {
pigment {
cells
color_map {
[0 Pink ]
[0.8 Pink ]
[0.81 White ]
[1 White]
}
}
finish {Dull}
}
}
Post a reply to this message
|
![](/i/fill.gif) |