The World Is Not Flat
Rendering shapes defined by latitude and longitude with WebGL2.
Only tested on Chrome so far.
npm run test
Use arrow keys to pan and +/- to zoom in/out
TWINF allows to draw shapes defined by latitude and longitude on a canvas using the WebGL2 context.
The following transformations are applied to shapes:
- In the CPU: conversion from latitude/longitude coordinate system to geocentric coordinate system assuming a spherical earth model
- In the CPU: triangulation of spherical and planar polygons
- In the GPU: conversion from geocentric coordinate system to stereographic coordinate system
- In the GPU: conversion from stereographic coordinate system to canvas coordinate system
- In the GPU: conversion from canvas to WebGL clipspace