Skip to content

entropicparticles/leaflet-erosion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leaflet-erosion

Generating erosioned-perlin-based procedural worlds with leaflet and web workers

I woked with leaflet-perlin () to include erosion and rivers. This is what I got, I hope you like it.

It is inspired by leaflet-fractal (github.com/aparshin/leaflet-fractal), uses code from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html for identifying points inside a simple polygon, and perlin noise is taken from Stefan Gustavson.

The grid is based in random quadrilaterals for future convenience. For the interpolation, I map the quadrilateral to a unit square and use a bilinear interpolation. (I also coded a weighted interpolation for the first tries, I kept the lines there in case.)

Do whatever you want with it, enjoy!

EntropicParticles

Blog: http://www.entropicparticles.com/6-procedural-maps-with-leaflet-ii/

DEMO: https://entropicparticles.github.io/leaflet-erosion/