View Single Post
 P: 111 Sorry to butt in here but I'm curious to know whether the following alternative solution derived from vector algebra is the same as the elegant solution proposed by Office_Shredder: Let $$\{x,y,z\}$$ be an orthonormal set of basis vectors spanning 3D space, and let $$a$$ be a unit vector specifying the initial point on the unit sphere: $$a = Xx + Yy +Zz$$, where $$\{X,Y,Z\}$$ are just real numbers. Following the suggestion in the previous posts, $$a$$ can be specified in terms of spherical coordinates: $$X=\sin{\theta}\cos{\phi}; \ Y=\sin{\theta}\sin{\phi}; \ Z=\cos{\theta}$$. The plane tangent to the sphere at the point specified by $$\ a$$ is $$P := xyza = Xyz +Yzx +Zxy$$. Now define two orthonormal reference vectors in this plane: $$e_1 = z \cdot P/ \left |z \cdot P \right | = (Yx - Xy)/t$$, where $$t = \sqrt{X^2 + Y^2}$$ $$e_2 = (z \cdot P)P^{-1} \\ = (Yx - Xy)(Xzy + Yxz + Zyx) \\ = z - Za.$$ The unit vectors $$(a, e_1, e_2)$$ comprise a set of orthonormal vectors. The great circle dividing the sphere in half may now be specified by defining a unit vector $$u$$ in terms of an angle $$\tau, \ (0 \leq \tau \leq 2\pi)$$: $$u = e_1\ \cos{\tau} + e_2\ \sin{\tau}$$. The great circle lies in the plane $$a\wedge u$$. Any point on this great circle can be expressed in terms of an angle $$\beta, \ (0 \leq \beta \leq 2\pi)$$ to define a vector r pointing from the origin to a point on the circle: $$r(\beta) = a\ \cos{\beta} + u\ \sin{\beta}$$. If the radius of the sphere is R, then simply multiply r by R. This formula will fail if the starting point is on the z-axis. In this case, one can develop an alternative formula by defining the reference vectors with x instead of with z. The above procedure should produce the same result as the one by Office_Shredder but it does not require rotation matrices.