#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=41; // meshes are calculated from #declare longstart=44; // 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 = 10.0002; #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 #case (1) // Verlegenhuken, Svalbard, overhead view from 15 kms #declare Cam_Azi=-89.999999; #declare Cam_Dir=180; #declare Cam_Lat=80.033333; #declare Cam_Long=16.300556; #declare Cam_Height=15000; #break #case (1.01) // Verlegenhuken, Svalbard, oblique view from north, 2 kms #declare Cam_Azi=-10; #declare Cam_Dir=0; #declare Cam_Lat=80.2575; #declare Cam_Long=16.275; #declare Cam_Height=2000; #break #case (1.02) // Verlegenhuken, Svalbard, "sailor's view' from north, 5 metres above sea level #declare Cam_Azi=-10; #declare Cam_Dir=0; #declare Cam_Lat=80.085; #declare Cam_Long=16.270278; #declare Cam_Height=5; #break #case (1.03) // Verlegenhuken, Svalbard, pedestrian view across Verlegenhukflya coastal plain eastward, 1.7 metres above ground #declare Cam_Azi=0; #declare Cam_Dir=270; #declare Cam_Lat=80.023056; #declare Cam_Long=16.212778; #declare Cam_Height=1.7; #break #case (2) // Westernmost part of Storsteinhalvøya, Nordaustlandet, Svalbard, overhead view from 18 kms #declare Cam_Azi=-89.999999; #declare Cam_Dir=180; #declare Cam_Lat=80.156667; #declare Cam_Long=17.918056; #declare Cam_Height=18000; #break #case (3) // Verlegenhuken and westernmost part of Storsteinhalvøya, Nordaustlandet, Svalbard, overhead view from 100 kms #declare Cam_Azi=-89.999999; #declare Cam_Dir=180; #declare Cam_Lat=80.25; #declare Cam_Long=17; #declare Cam_Height=100000; #break #case (3.01) // Verlegenhuken and westernmost part of Storsteinhalvøya, Nordaustlandet, Svalbard, view from Verlegenhukflya to Storsteinhalvøya, 400 metres above ground #declare Cam_Azi=-20; #declare Cam_Dir=242; #declare Cam_Lat=80.020833; #declare Cam_Long=16.501111; #declare Cam_Height=400; #break #case (3.02) // Verlegenhuken and westernmost part of Storsteinhalvøya, Nordaustlandet, Svalbard, view from Storsteinhalvøya to Verlegenhuken, 100 metres above ground #declare Cam_Azi=0; #declare Cam_Dir=65; #declare Cam_Lat=80.139167; #declare Cam_Long=17.851944; #declare Cam_Height=100; #break #case (10.0002) // Georgia: View across Tbilisi northeastward #declare Cam_Azi=-10; #declare Cam_Dir=57; #declare Cam_Lat=41.692863; #declare Cam_Long=44.766454; #declare Cam_Height=1.7; #break #end #declare Earth_Pos=<0, 0, 0>; #declare Earth_Tilt=23.439281; #declare Earth_Rot=0; #declare M_Water= // code by Christoph Hormann, slightly modified material { texture { pigment { color rgbt <1, 1, 1, 0.5> // originally: color rgbt <1, 1, 1, 1> } 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 T_Water_Lohmueller01 = // code by Friedrich Lohmüller texture { pigment { color rgb <.2,.2,.2> } finish { ambient 0.15 diffuse 0.55 brilliance 6.0 phong 0.8 phong_size 120 reflection 0.6 } } #declare Ocean= sphere { Earth_Pos, 6378140+295 texture { T_Water_Lohmueller01 } } #include "n41e044.inc" #declare Earth_Slice= object { Earth_Slice_n41e044 } #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 } object { Ocean } sphere { Earth_Pos, 6377500 texture { pigment { color rgb <0, 0, 0.3> } finish { ambient 0.01 diffuse 1 brilliance 0.1 } } } rotate rotate <0, Earth_Rot, 0> } camera { up <0, 3, 0> right <4, 0, 0> location Cam_Pos look_at Cam_Look sky Cam_Sky angle 55 } light_source { <0, 0, 149600000000> color rgb 1 }