File: terrain.inc

package info (click to toggle)
povray 1%3A3.6.1-12
  • links: PTS
  • area: non-free
  • in suites: lenny, squeeze
  • size: 31,084 kB
  • ctags: 20,310
  • sloc: ansic: 110,032; cpp: 86,573; sh: 13,595; pascal: 5,942; asm: 2,994; makefile: 1,753; ada: 1,637
file content (111 lines) | stat: -rw-r--r-- 1,768 bytes parent folder | download | duplicates (3)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Persistence of Vision Ray Tracer Include File
// File: terrain.inc
// Vers: 3.5
// Desc: terrain for 'balcony.pov' demonstration scene
// Date: July/August 2001
// Auth: Christoph Hormann

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/

#version 3.5;

#declare Tex_Vegetation=
texture {
  pigment {
    bozo
    color_map {
      [0.3 color rgb <0.20,0.35,0.1>*0.9 ]
      [0.8 color rgb <0.12,0.35,0.1>*0.7 ]
    }
    scale 4
  }
  finish {
    ambient 0.0
    diffuse 0.5
    brilliance 0.8
    specular 0.1
  }
  normal {
    granite 0.4
  }
}

#declare Tex_Stone=
texture {
  pigment {
    color rgb <0.6,0.6,0.6>
  }
  finish {
    ambient 0.0//0.1
    diffuse 0.45
    specular 0.15
  }
}

#declare Tex_Terrain=
texture {
  slope -z
  texture_map {
    [0.34 Tex_Vegetation ]
    [0.34 Tex_Stone ]
  }
}

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/



#declare Terrain=
object {
  height_field {

    function 300,300 {
      pigment {
        function { 1-(min(pow(x*x + z*z,1.3), 1) -0.0001) }
        color_map {
          [0.0 color rgb 0.0]
          [1.0 color rgb 1.0]
        }
        scale 0.35
        translate <0.5,0,0.5>

        warp { turbulence 0.3 }

        scale 3
        warp { turbulence 0.4 lambda 2.2 octaves 8 }
        scale 1/3

        rotate -90*x
        translate -0.5*y
        scale <1, -1, 1>
        translate 0.5*y
      }
    }

    water_level 0.02

    rotate 90*x
    rotate -10*z

    scale <4, 4, 1>
    scale 30
  }
}


union {
  object {
    Terrain
    translate <130, 368, -10>
  }

  object {
    Terrain
    rotate -180*z
    scale 0.3
    translate <90, 97, -6>
  }
  texture { Tex_Terrain }
}

/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/