Skip to content

awoodruff/canvas-shaded-relief

gh-pages
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

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:

About

Demo of simple shaded relief with javascript and canvas.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages