Demo of simple shaded relief with javascript and canvas.
HTML
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
index.html
molokai-relief.png
molokai.png
tints.js

README.md

canvas-shaded-relief

Demo of simple shaded relief in the browser with javascript and canvas, more or less copied from experiments I did in Flash some years back. (The math is explained in that post.) It takes a grayscale DEM image, calculates luminance pixel-by-pixel, and draws the resultant shaded relief along with some hypsometric tints to new canvas element. Code is all in index.html.

Here, look, it totally works.

It's not really useful (slow for images much larger than this), but it's kind of fun!

Input:

Output: