1// Povray scene provided with the Geomorph package
2// (c) Patrice St-Gelais, 2001-2007
3// To use this scene, you have to define a crater map first
4// in craters.png, in your working directory
5
6// ==== Standard POV-Ray Includes ====
7#include "colors.inc"	// Standard Color definitions
8#include "textures.inc"	// Standard Texture definitions
9
10#include "stars.inc"
11
12#declare rock_color = <0.72,0.56,0.3> ;
13
14#include "geomorph.inc"
15
16#declare maincamera =
17camera
18{
19   location <0,  0, -0.1>
20   up y
21   right aspect_ratio*x
22   angle gl_angle
23   look_at <0,0,0 >
24}
25
26// The Sky
27#declare Sky =
28sphere { <0,0,0> 9900000
29// milky_way is a gradient on y axis
30
31       texture {pigment {milky_way
32		translate <0,0.75,0>
33                        scale 0.45*9900000}
34               }
35
36       hollow
37       finish {ambient 0.4 diffuse 0}
38}
39
40#declare water = plane {y, 0
41    texture {
42 //       pigment {color rgbf<0.0,0.2,0.5,0.6>} // with filtering transparency
43 	pigment {color rgb 1.5*<0.0,0.2,0.5>} // Opaque
44
45       normal {bumps 0.1 scale <2.5,0.2,1> rotate <0,0,0>}
46       finish {specular 0.9 roughness 0.05
47             reflection .9 ambient 0.05 diffuse 0.2 }
48    }
49}
50
51#declare Sun = light_source { 0 color 0.7*White shadowless}
52
53#declare moon =
54sphere {  <0, 0, 0>, 1
55	texture {
56		pigment {color <1.0,0.9,0.8>}
57		normal {
58			bump_map {
59				png crater_map
60				map_type 0 // 0=planar, 1=spherical, 2=cylindrical, 5=torus
61				interpolate 2 // 0=none, 1=linear, 2=bilinear, 4=normalized distance
62				bump_size 90
63			} // bump_map
64			scale <1,1,1>
65		} // normal
66		finish {ambient <0.1,0.1,0.2>}
67		scale 1.5
68	} // texture
69}
70
71#declare hf =
72height_field
73{
74	png main_terrain
75   	smooth
76	scale <1.0,0.3,1.0>
77	translate <-0.5,0.0,-0.5>
78   	texture  {pigment {color rock_color}}
79}
80
81/***************************************************************************************************/
82
83object {hf rotate <0,0,0> translate <0.0,-0.01, 0.0> scale <1.0,1.0,1.0> }
84
85object {moon scale 160 rotate <0,0,0> translate <-125,270,2000>  rotate <0,rot_y,0>}
86
87// Try this for a "moonset", with the moon centered:
88// object {moon scale 300 rotate <0,0,0> translate <0,0,2000>  rotate <0,rot_y,0>}
89
90object {water scale 0.02 translate <0.0,0.015,0.0>}
91
92object {Sky rotate <0,rot_y,0>}
93
94light_source {Sun  translate <-3500, 2500,0> rotate <0,rot_y,0>}
95
96camera {maincamera
97		translate <0+tr_x,0.05+tr_y,tr_z>
98		rotate <rot_x,0+rot_y,0+rot_z> }
99