Drexel dragonThe Math ForumDonate to the Math Forum

Ask Dr. Math - Questions and Answers from our Archives
_____________________________________________
Associated Topics || Dr. Math Home || Search Dr. Math
_____________________________________________

Testing a Point on a Sphere


Date: 01/14/97 at 11:52:14
From: Kevin Isbister
Subject: Testing a point on a sphere

Dr. Math,

The problem is this:  How do you define a curved line segment on the
surface of a sphere in a mathematical equation?

I know that a sphere is defined as x^2 + y^2 + z^2 = r^2, but how do 
you describe a segment of the surface of that sphere that runs, say, 
from A = (3,4,5) to B = (-4,5,3)?  ANY point on the surface of the 
sphere will make the above equation work, but I can't seem to find 
anything in my calculus textbooks defining what such a segment looks 
like.

More to the point, how does one "test" a point mathematically to see 
if it falls on this curved line?  Obviously, the sample point would 
have to have the following things true:

     * must still make x^2 + y^2 + z^2 = r^2 true   
     * -4<= x <= 3
     *  4<= y <= 5
     *  3<= z <= 5

But even that still describes an area on the surface that has as one 
of its diagonals the curved segment I'm looking for.  How is this 
limited down?

The same process, I assume could be expanded out in some way to test a
point to see if it rests in an area on the surface, right?

Help!

Kevin Isbister


Date: 01/14/97 at 12:54:26
From: Doctor Tom
Subject: Re: Testing a point on a sphere

Hi Kevin,

There are a bunch of ways to do this, and I'll give you enough info
to get you started.

Assuming that you mean the great circle connecting the pair of points,
the great circle is the intersection of the sphere with the plane
passing through the two points and the center of the sphere.

For your particular example, that would be the plane passing through
(0,0,0), (3,4,5), and (-4,5,3), or -13x -29y + 31z = 0.

You can substitute this into the sphere's equation to get an equation
in two variables (any two you choose) that will be on the great 
circle.  Unfortunately, this isn't exactly what you want, since the 
combination of equations will be satisfied by any point on the great 
circle.

Since you are only interested in the arc on the sphere, there will
be inequalities involving x, y, and z to restrict the equation to 
the arc.

Another way is a parametric approach. Your numbers are ugly, so let
me illustrate with something simple. Suppose your arc is on the unit 
sphere (radius 1), and the arc makes up a quarter circle.

In the plane, we can write such an arc as follows:

A(t) = (cos(t), sin(t), 0), where 0 <= t <= pi/2.

I've included the third coordinate since we'll want to move this 
planar arc into three dimensions. But simple rotations about the 
origin can put the arc anywhere you want it, and then varying t will 
give all the points on that arc.

See any book on 3D computer graphics to learn how to do rotations
like this.

-Doctor Tom,  The Math Forum
 Check out our web site!  http://mathforum.org/dr.math/   
    
Associated Topics:
College Calculus

Search the Dr. Math Library:


Find items containing (put spaces between keywords):
 
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

_____________________________________
Math Forum Home || Math Library || Quick Reference || Math Forum Search
_____________________________________

Ask Dr. MathTM
© 1994-2013 The Math Forum
http://mathforum.org/dr.math/