// Planet Test - Placement of objects on a sphere // and corresponding camera orientation // Textures #declare Star_A= texture { pigment { color rgb 1 } finish { ambient 1 } } #declare Brown_Dwarf= texture { pigment { color rgb <0.6, 0.2, 0> } finish { ambient 1 } } #declare Star_M= texture { pigment { color rgb <1, 0, 0> } finish { ambient 1 } } #declare Planet_White= texture { pigment { color rgb 1 } finish { ambient 0.01 diffuse 1 brilliance 0.4 } } #declare Physical= texture { pigment { granite color_map { [0 rgb <0, 0, 0.3>] [0.5 rgb <0, 0.2, 1>] [0.65 rgb <0.5, 1, 1>] [0.68 rgb <0.5, 1, 1>] [0.68 rgb <0, 0.7, 0>] [0.75 rgb <0, 1, 0>] [0.805 rgb <0.2, 1, 0.5>] [0.84 rgb <1, 1, 0.5>] [0.87 rgb <1, 1, 0>] [0.95 rgb <1, 0, 0>] [0.98 rgb <0.5, 0.2, 0>] [0.99 rgb 0.5] [1 rgb 1] } turbulence 2 octaves 6 omega 0.1 } finish { ambient 0.05 diffuse 1 brilliance 0.3 } } light_source // The central star { <0, 0, 0> color rgb 1 looks_like { sphere { 0, 8000 texture { Star_A } pigment { color rgb 1 } finish { ambient 1 diffuse 1 } } } } #declare Planet_Center=<0, 0, 1000000>; #declare Planet_Radius=632.25; #declare Orbit_Height=pow(10, (5-(clock/150))); #declare Display_Normal=0.1; sphere // The planet { 0, 1 texture // replace this by texture { Physical } { pigment { image_map { tga "e:\povdaten\imagemaps\texturen\ev11612_land_ocean_ice_8192.tga" map_type 1 once interpolate 4 } } finish { ambient 0.05 diffuse 1 brilliance 0.3 } } scale Planet_Radius translate Planet_Center } #declare CamLat=0; #declare CamLong=90; #declare CamPos=Planet_Center+ <(Planet_Radius+Orbit_Height)*sin((-CamLong-90)*(pi/180))*cos(CamLat*(pi/180)), (Planet_Radius+Orbit_Height)*sin(CamLat*(pi/180)), (Planet_Radius+Orbit_Height)*cos((-CamLong-90)*(pi/180))*cos(CamLat*(pi/180))>; /*#switch (clock) #case (0) */ camera // Orbital camera { location CamPos look_at Planet_Center angle 40 } /* #break #end */ text { ttf "c:\windows\fonts\ARIAL.TTF" /* concat(str(Orbit_Height, -7, 3), */ "Test" , 0.0001, 0 texture { pigment { color rgb <0, 0.5, 1> } finish { ambient 1 } } no_shadow scale 0.002 rotate <0, 0, 0> translate CamPos+<0, 0, Display_Normal> // <0, -Display_Normal*sin(CamLat*(pi/180)), Display_Normal*cos(CamLat*(pi/180))> }