Alex Reynolds
Alex Reynolds

Reputation: 96976

Convert three.js scene rotation to polar coordinates?

Given a three.js scene, how does one calculate the theta and phi polar coordinates from the x, y and z position and rotation property values of a THREE.PerspectiveCamera?

Upvotes: 1

Views: 1487

Answers (1)

evan.oman
evan.oman

Reputation: 5572

You just need to take your x, y, and z coordinates and plug them into the following equations:

enter image description here

enter image description here

enter image description here

Source: https://en.wikipedia.org/wiki/Spherical_coordinate_system

Upvotes: 4

Related Questions