0
$\begingroup$

I have a line segment and I want to find the arc that it projects to on a sphere. I know there are two arcs; I'm interested in the one that's closest to the line (or intersects it).

The easy way to do it is to pick individual points along the segment and project them to the sphere. The problem with this is that it generates inefficient code.

If I know the projections on the sphere for the endpoints of the line, can I express the arc as parameterized spherical coordinates?

For example, for now I'm using the following approximation (approximations would be ok too if they're generally accurate):

$C, r$ : sphere center and radius
$P_0P_1$ : line segment
$Q_0,Q_1$ : spherical coordinates of projections of $P_0$ and $P_1$ on sphere
$X$ : point along $P_0P_1$ : $X = P_0 + t(P_1-P_0)$
$Y$ : spherical coordinates of point along arc, calculated as follows:
$s = \frac{||\hat{CX} - \hat{CP_0}||}{||\hat{CP_1} - \hat{CP_0}||}$
Y = (1-s)Q_0 + sQ_1

... but this generates a just-ok approximation, where I want to do something better.

I tried interpolating via angle:

$s = \frac{\measuredangle(CX,CP_0)}{\measuredangle(CP_1,CP_0)}$

... but for some reason, it produces worse results.

$\endgroup$
  • $\begingroup$ You need to define how a (cutting) plane containing the given line is oriented. $\endgroup$ – Narasimham Dec 18 '15 at 14:36
0
$\begingroup$

If the projection is not parallel to the line segment then the two together define an equivalence class of parallel planes. The projection of the segment is most naturally expressed in spherical coordinates where the equator is parallel to that orientation (segment of constant latitude).

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.