How can I define a region on the surface of a sphere in terms of the coordinates of the vertices of the boundary of the region?

215 Views Asked by At

This is a computer graphics problem. I can define the boundary of the region in terms of the vertices of a “polygon”on the surface. That is really a collection of intersecting great circles on the surface. What I would like to do is decide if a point on the surface is inside my region or not. I am struggling to come up with a function of the points or great circles that tells me if a set of coordinates is inside or not. Any help gratefully received.

2

There are 2 best solutions below

3
On BEST ANSWER

Thoughts/hints, not an answer, too long for a comment.

First, there's some ambiguity since your polygon has an inside and an outside which are distinguishable for plane polygons but not spherical ones.

The following two thoughts assume you have an order on the vertices and that you know your polygon is convex. If not, you will have to find the convex hull first (there are algorithms for that).

Perhaps you know all your points lie in the same hemisphere. Then you can assume the inside is in that hemisphere. Now stereographic projection to the plane from any point in that hemisphere converts your great circles into straight lines and standard convex polygon arguments can tell you when a point is inside.

Another possibility. For each pair of points determining an edge, find the plane through the sphere containing the great circle that joins them. Then it's easy to see which side of that plane the point you care about is on.

1
On

In the plane, Line integral of radial rays

$\int d\theta = 0 $ for an arbitrary external apoint $O$

and $ 2 \pi $ for an internal point $I$

The rays are smooth geodesic great circle segments if we are going round a spherical surface. If the contour is a spherical polygon we have discontiuous jumps.

LnInteg_IO