#include "functions.inc" // 1 POV unit = 1 metre #declare path="./"; #declare path_textures="./"; global_settings { assumed_gamma 2 max_trace_level 5 } #declare deadsea=422; #declare everest=8848; #declare rng=deadsea+everest; #declare rd=6378140-deadsea; #declare latstart=80; // meshes are calculated from #declare longstart=14; // the northwestern to southeastern corner of the original DEM tile #declare month=7; #if (latstart-1 < 0) #declare lat="s"; #else #declare lat="n"; #end #if (longstart < 0) #declare long="w"; #else #declare long="e"; #end #declare tilename=concat(lat, str(latstart, -2, 0), long, str(longstart, -3, 0)); #declare view = 0.03; #switch(view) #case (0) // Moffen Island, Svalbard, as seen from south #declare Cam_Azi=0; #declare Cam_Dir=180; #declare Cam_Lat=80.00001; #declare Cam_Long=14.5; #declare Cam_Height=5; #break #case (0.01) // Moffen Island, Svalbard, westward view from eastern lagoon rim #declare Cam_Azi=0; #declare Cam_Dir=90; #declare Cam_Lat=80.029991; #declare Cam_Long=14.568176; #declare Cam_Height=1.7; // camera height above ground, not above sea level! #break #case (0.02) // Moffen Island, Svalbard, as seen from south, steeper angle #declare Cam_Azi=-89.9999999; #declare Cam_Dir=180; #declare Cam_Lat=80.026936; #declare Cam_Long=14.489863; #declare Cam_Height=17000; #break #case (0.03) // Moffen Island, Svalbard, view from northern to southern hill #declare Cam_Azi=0; #declare Cam_Dir=240; #declare Cam_Lat=80.026944; #declare Cam_Long=14.4575; #declare Cam_Height=1.7; // camera height above ground, not above sea level! #break #end #declare Earth_Pos=<0, 0, 0>; #declare Earth_Tilt=23.439281; #declare Earth_Rot=0; #declare M_Water= material { texture { pigment { color rgbt <1, 1, 1, 0.5> } finish { diffuse 0 reflection { <0.03, 0.03, 0.04>, <0.75, 0.75, 1> exponent 1.2 falloff 5 fresnel on } specular 0.8 roughness 0.003 } normal { bozo 1.5 scale 0.0001/0.001 } } interior { ior 1.34 } } #declare Ocean= sphere { Earth_Pos, 6378140+295 material { M_Water } } #include "n80e014.inc" #declare GeoLoc=; #declare Cam_surfpos=trace(Earth_Slice, Earth_Pos, GeoLoc); #warning vstr(3, Cam_surfpos, ",", 1, 3) #declare Cam_oceanfloorpos=trace(Ocean, Earth_Pos, GeoLoc); #if (Cam_surfpos.x=0 & Cam_surfpos.y=0 & Cam_surfpos.z=0) // camera location outside an ASTER DEM tile #warning "Outside Tile!" #declare Cam_Pos=Cam_oceanfloorpos+vnormalize(Cam_oceanfloorpos)*Cam_Height; #else #declare Cam_Pos=Cam_surfpos+vnormalize(Cam_surfpos)*Cam_Height; #if (vlength(Cam_surfpos) < vlength(Cam_oceanfloorpos)) // camera location on an ASTER DEM tile, but not on land #declare Cam_Pos=Cam_oceanfloorpos+vnormalize(Cam_surfpos)*Cam_Height; #end #end #declare Cam_Pos=vrotate(Cam_Pos, <0, Earth_Rot, 0>); #declare Cam_Pos=vrotate(Cam_Pos, ); #declare Cam_Look=; #declare Cam_Look=vrotate(Cam_Look, <90-Cam_Lat, -Cam_Long, 0>); #declare Cam_Look=vrotate(Cam_Look, <0, Earth_Rot, 0>); #declare Cam_Look=vrotate(Cam_Look, ); #declare Cam_Look=Cam_Pos+Cam_Look; #declare Cam_Sky=<0, 1, 0>; #declare Cam_Sky=vrotate(Cam_Sky, <90-Cam_Lat, -Cam_Long, 0>); #declare Cam_Sky=vrotate(Cam_Sky, <0, Earth_Rot, 0>); #declare Cam_Sky=vrotate(Cam_Sky, ); sky_sphere { pigment { gradient Cam_Sky color_map { [0 rgb <0.5, 1, 1>] [0.25 rgb <0, 0.5, 1>] [1 rgb <0, 0.5, 1>] } } } union { object { Earth_Slice rotate rotate <0, Earth_Rot, 0> } object { Ocean } sphere { Earth_Pos, 6377500 texture { pigment { color rgb <0, 0, 0.3> } finish { ambient 0.01 diffuse 1 brilliance 0.1 } } } } camera { location Cam_Pos look_at Cam_Look sky Cam_Sky angle 65 } light_source { <0, 0, 149600000000> color rgb 1 }