Friday, July 28, 2017

Maps Can Have Wind

Everybody at Mapbox is working very hard to ensure that your maps can have wind. No sooner do we discover Lauren Budorick's super fast animated weather map than Vladimir Agafonkin releases his own animated wind map.

The progenitor of Leaflet.js has created an Animated Wind Map which can "render a million particles at 60fps". The map uses WebGL and what looks a little like magic. Although it is magic Vladimir has done a great job at explaining the process in How I built a wind map with WebGL. Those of you have been to Hogwarts will probably be able to understand the spells involved. Here's one of the spells,

"encode particle positions as RGBA colors of an image, load it to the GPU, calculate new positions based on wind velocities in the fragment shader, encode them back into RGBA colors and draw it into a new image".

If you are a simple muggle then you will probably be content with just looking at the pretty colors like me.
Post a Comment