0

I have a sphere with center O = (0,0,0) and radius r=1. I want to calculate "true" angles phi(i) between points Pi lying on this sphere.

From cartesian coordinate, I have :

$cos(phi) = x1 x2 + y1 y2 + z1 z2$

The problem is that this angle change according to positions of points on the sphere. For example, if severals points make a loop on the equator, my sum of phi(i) would be 360 degrees. If it's at the top of the sphere, the sum of phi(i) would be <360 degrees.

Does anyone knows how to correct that, a paper explaining this problem ? If points describe a rotation, what about changement of axis of rotation and angle calculation ?

We told me to estimate the plane containing the points and to project them on it. I used :

https://stackoverflow.com/questions/1400213/3d-least-squares-plane

and

https://stackoverflow.com/questions/8942950/how-do-i-find-the-orthogonal-projection-of-a-point-onto-a-plane

What do you thing about this ? I have correct angle for one example but bad results for others data.

usersss
  • 11

1 Answers1

0

I think you really want $\cos \phi = (\mathbf{x}_{n+1} - \mathbf{x}_n) \cdot (\mathbf{x}_{n+2} - \mathbf{x}_{n+1})$, i.e. $\cos \phi = (x_3 - x_2)(x_2 - x_1) + (y_3 - y_2)(y_2 - y_1) + (z_3 - z_2)(z_2 - z_1)$.

Your equation measures the angle formed by 2 consecutive points and the origin, $\angle x_1 O x_2$. My equation measures the supplement of $\angle x_1 x_2 x_3$.

NovaDenizen
  • 4,286
  • Not sûre that it is what I want. For exemple, from these points in spherical coordinates : longitude : P1=pi/4; P2=2(pi/4); P3=3(pi/4); P4=pi; P5=5(pi/4); P6=6(pi/4); P7=7*(pi/4) colatitude : Pi=0.05 radians for each, I would like to find an average angle of 45°/unit of time. With this calculation, I obtained 1.57 ? – usersss Jul 09 '14 at 19:43