-
Notifications
You must be signed in to change notification settings - Fork 3
/
treepov.inc
executable file
·56 lines (43 loc) · 1.26 KB
/
treepov.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Pov Includes
#include "colors.inc"
#include "transforms.inc"
// Custom Include
#include "tree.inc" //3D tree
background {color <0, 0, 0>}
#declare Camera_Location = <scene_center_x,175,scene_center_y> ;
#declare Camera_Lookat = <scene_center_x,0,scene_center_y> ;
// Use orthographic camera for true plan view
camera {
orthographic
location Camera_Location
look_at Camera_Lookat
right Camera_Size*x
up Camera_Size*y
}
// Union all the trees together into one object
union {
#declare Rnd_1 = seed (1153);
#declare LastIndex = dimension_size(tree_coords, 1)-2;
#declare Index = 0;
#while(Index <= LastIndex)
object {
TREE
# scale 2.0
scale tree_height[Index]
rotate <0,rand(Rnd_1)*360,0>
translate tree_coords[Index]
}
#declare Index = Index + 1;
#end
// Pigment trees according to distance from camera
pigment {
gradient x color_map {
[0 color rgb 1 * rand(Rnd_1)]
[1 color rgb 0]
}
scale <vlength(Camera_Location-Camera_Lookat),1,1>
Reorient_Trans(x, Camera_Lookat-Camera_Location)
translate Camera_Location
}
finish {ambient 1}
}