File:population-earth2.png: Difference between revisions

no edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 11: Line 11:
* [[:File:borders-black-on-white.png]]
* [[:File:borders-black-on-white.png]]


[[Image generator]] code:
[[Code:isochromic.c|Image generator]] code:
<syntaxhighlight>
<syntaxhighlight>
## All input files are 8640x4320, which will be scaled down to 2160x1080
## All input files are 8640x4320, which will be scaled down to 2160x1080
Line 33: Line 33:
borders << data/borders-black-on-white.png
borders << data/borders-black-on-white.png
borders @@ negative
borders @@ negative
borders @@ _width/4
borders @@ $width/4
borders @@ _height/4
borders @@ $height/4
main.r >= borders
main.r >= borders
main.g >= borders
main.g >= borders
Line 42: Line 42:
# add the population
# add the population
pop << data/population.data-float64-8640x4320
pop << data/population.data-float64-8640x4320
pop @@ _width/4  # the '_' preserves the total population
pop @@ $width/4  # the '$' preserves the total population
pop @@ _height/4 # same
pop @@ $height/4 # same
pop /= 440000 # max people per pixel
pop /= 440000 # max people per pixel
pop @@ spread
pop @@ spread