Skip to content

Instantly share code, notes, and snippets.

@ericrius1
Created June 9, 2015 15:36
Show Gist options
  • Save ericrius1/50eeb2098ee9fe898406 to your computer and use it in GitHub Desktop.
Save ericrius1/50eeb2098ee9fe898406 to your computer and use it in GitHub Desktop.
var phi = (90 - latitude) * Math.PI / 180;
var theta = (180 - longitude) * Math.PI / 180;
var point = new THREE.Vector3(
EARTH_RADIUS * Math.sin(phi) * Math.cos(theta),
EARTH_RADIUS * Math.cos(phi),
EARTH_RADIUS * Math.sin(phi) * Math.sin(theta)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment