// Converting ASTER ASCII terrain matrices into PNG graphic files // (C) 2010/13 Jörg 'Yadgar' Bleimann // Non-commercial use is free; any commercial usage needs written authorization by the copyright owner #declare xdim=3601; #declare ydim=3601; #declare i=0; #declare h=0; #declare deadsea=422; #declare everest=8848; #declare rng=everest+deadsea; #fopen aster "Rohdaten/n80e080.txt" read #while (defined(aster)) #read (aster, h) box { 0, <1, 1, 0.001> translate texture { #if (h=-9999) pigment { color rgb <0, 0, 1> } #else #declare r_raw=(h+deadsea)/rng*255; #declare r=int(r_raw); #declare g_raw=(r_raw-r)*255; #declare g=int(g_raw); pigment { color rgb /255 } #end finish { ambient 1 } } } #declare i=i+1; #end #fclose aster camera { orthographic up <0, ydim, 0> right location look_at }