Through coordinates section in chapter 1

This commit is contained in:
Grant Sanderson
2016-07-15 18:16:06 -07:00
parent ba73032c90
commit 4e3f7292af
9 changed files with 742 additions and 77 deletions

View File

@ -431,7 +431,7 @@ def z_to_vector(vector):
v = np.array(vector) / norm
phi = np.arccos(v[2])
if any(v[:2]):
#projection of vector to {x^2 + y^2 = 1}
#projection of vector to unit circle
axis_proj = v[:2] / np.linalg.norm(v[:2])
theta = np.arccos(axis_proj[0])
if axis_proj[1] < 0: