Looking for a way to draw a line between two points on a sphere in Three.js

Posted by speedwell on Stack Overflow See other posts from Stack Overflow or by speedwell
Published on 2012-06-09T04:36:28Z Indexed on 2012/06/09 4:40 UTC
Read the original article Hit count: 218

Filed under:
|

My app (a flight tracker) needs to draw a line between two points (cities say) on a sphere (earth) along the surface (i.e. the great circle route) using Three.js.

I can think of 2 ways - (a) creating Three.js 'Line' with a set of (enough) points that I calculate manually and (b) writing the lines into the texture I use for the sphere after it's loaded but before I apply it as a texture.

I can see problems with both (not even sure if (b) is possible in Three.js yet) - anyone think of a better way or have an opinion?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about three.js