0.0.5 • Published 5 years ago

twinf v0.0.5

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

The World Is Not Flat

NPM package license

Rendering shapes defined by latitude and longitude with WebGL2.

Only tested on Chrome so far.

Build

npm run test

Demo

click me!

Use arrow keys to pan and +/- to zoom in/out

Concepts

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
0.0.5

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago