Sign in to follow this  
CGameProgrammer

Circle on a sphere's surface

Recommended Posts

Given a point on a sphere's surface, I'm trying to find the circle of a given radius around that point, which lies on the sphere's surface. The sphere is centered around the origin. So given: R = sphere radius r = circle radius c = center of circle For each angle a [0, 2*pi), what is the point p? The circle's radius ideally would represent the distance along the sphere's surface as opposed to the direct straight-line distance. But this can be computed first to get the adjusted (smaller) distance. So what's the equation to get the adjusted direct-line radius given the sphere's radius and the circle's radius? Those would be the only inputs needed for that. The application is I'm drawing circles on a globe. Circles are drawn as 64-sided polygons and I just loop from 0..63 to generate those points. When someone wants to highlight the area 200 miles around a point, the distance is expected to be measured along the surface, naturally. (I'm ignoring elevation though, so the Earth is treated as an actual sphere in this case.)

Share this post


Link to post
Share on other sites
First, use radians for your calculations instead of degrees. Because of how radians are defined, and angle times a radius is the arclength of that section of a circle. So if you want your circle to have radius r on a sphere of radius R, the angle theta is r/R. With the angle you can then calculate the side of the triangle that you are interested in with basic trig.

Share this post


Link to post
Share on other sites
intrest86: I am using radians. But you're right -- treating this as a cone/sphere intersection, the angle of the cone's point (which is the center of the sphere) in radians is 2*r/R (or r/R around the normal). So I can use that to get points along the circle's edges. Thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by taby
This might be a good starting point:

http://mathworld.wolfram.com/GreatCircle.html

Another area of interest might be:

http://en.wikipedia.org/wiki/Poincaré_conjecture


THE POINCARE CONJECTURE??
It is very interesting but has to do with Topology, and is not relevent to the question.

I do not mean that in as insult or offense in any way.

Share this post


Link to post
Share on other sites
Quote:
Original post by ibebrett
Quote:
Original post by taby
This might be a good starting point:

http://mathworld.wolfram.com/GreatCircle.html

Another area of interest might be:

http://en.wikipedia.org/wiki/Poincaré_conjecture


THE POINCARE CONJECTURE??
It is very interesting but has to do with Topology, and is not relevent to the question.

I do not mean that in as insult or offense in any way.


The Poincare conjecture is very much related to taking a great circle and shrinking it to a point while keeping the resulting circle on the surface of the sphere. That's what this person was asking for -- the set of all circles on a sphere related by a single point (hence the varying radius part).

The word "might" generally means "maybe, maybe not". It all depends on how in-depth this person wishes to understand the reason why others have asked this very same question before. The conjecture, after all, does point out that this is a "trivial" problem on the 2-sphere, which is exactly what this person was asking about.

To say that this has nothing to do with the Poincare conjecture is like saying that the Pythagorean theorem has nothing to do with General Relativity. Without drawing such relationships between logic problems and reality, math becomes useless. This is exactly why I thought math was pointless in school... my teachers had absolutely no imagination whatsoever.

[Edited by - taby on March 25, 2008 11:26:54 AM]

Share this post


Link to post
Share on other sites
Actually that is not so.

The Poincare conjecture talks about what spaces are topologically equivalent to a 3 sphere. A 3 sphere is the surface of a 4 dimensional sphere. It asks whether or not being able to shrink any PATH (not a great circle) through the 3 sphere to a point (meaning does it have a genus of 0?) is enough to gaurentee that the topology in question topologically equivalent to a 3 sphere.

Also, topological equivalence has no bearing on the spaces imbedding in a higher dimensional space, so even if we were talking about 2 spheres (what the original poster is kind of talking about), it still has no relevance. For instance an oval is equivalent to a sphere in the topological sense, and so is i dunno, a pumpkin or any other shape without holes (Assuming i guess the pumpkin isn't a jack o' lantern.

I always feel like I am coming off as a jerk, and I'm really sorry if I do.

Share this post


Link to post
Share on other sites
I also find it kind of funny that you mention the pythatgorean theorem and General Relativity, becuase in general relativity the pythagorean theorem is replaced with a metric based on the curvature of space. I.E. measurn distance and the dot product between vectors is based on Reimmans work in manifolds.

So in general relativity the pythagorean thoerem is changed :)

Share this post


Link to post
Share on other sites
Quote:
Original post by ibebrett
Actually that is not so.

The Poincare conjecture talks about what spaces are topologically equivalent to a 3 sphere. A 3 sphere is the surface of a 4 dimensional sphere. It asks whether or not being able to shrink any PATH (not a great circle) through the 3 sphere to a point (meaning does it have a genus of 0?) is enough to gaurentee that the topology in question topologically equivalent to a 3 sphere.

Also, topological equivalence has no bearing on the spaces imbedding in a higher dimensional space, so even if we were talking about 2 spheres (what the original poster is kind of talking about), it still has no relevance. For instance an oval is equivalent to a sphere in the topological sense, and so is i dunno, a pumpkin or any other shape without holes (Assuming i guess the pumpkin isn't a jack o' lantern.

I always feel like I am coming off as a jerk, and I'm really sorry if I do.


How does one begin to ponder the Poincare conjecture when they do not know how to shrink the path along the trivial 2-sphere?

All I was pointing out was that the operations behind shrinking the path is exactly what the OP is attempting to do.

Share this post


Link to post
Share on other sites
No it isn't. I'm not trying to find all paths that pass through a point; I was trying to find the intersection of two spheres, wherein one sphere's center is on the surface of the other. There is only one circle; only one correct answer.

Share this post


Link to post
Share on other sites
No worries. Don't want to hijack the guys thread though. Sorry if i come off as confrontational. and by the way i love math and am a math major and can relate to how you felt in high school.

Share this post


Link to post
Share on other sites
Quote:
Original post by ibebrett
I also find it kind of funny that you mention the pythatgorean theorem and General Relativity, becuase in general relativity the pythagorean theorem is replaced with a metric based on the curvature of space. I.E. measurn distance and the dot product between vectors is based on Reimmans work in manifolds.

So in general relativity the pythagorean thoerem is changed :)


The Pythagorean theorem is the very basic definition of a metric. They are not mutually exclusive.

Wouldn't you agree that before someone starts playing around with invariant spacetime intervals they should probably know what an interval is in the first place? How does one go about learning about intervals without first mastering the concept behind the Pythagorean theorem?

Share this post


Link to post
Share on other sites
Quote:
Original post by CGameProgrammer
No it isn't. I'm not trying to find all paths that pass through a point; I was trying to find the intersection of two spheres, wherein one sphere's center is on the surface of the other. There is only one circle; only one correct answer.


I stand corrected. However, since you were setting the radius to a constant value, it was initially obvious that only one circle exists as a solution. I was not trying to contradict that, but only trying to shed some light on work related to constructing (n-1)-spheres on the surface of n-spheres. My bad.

Share this post


Link to post
Share on other sites
Quote:
Original post by ibebrett
No worries. Don't want to hijack the guys thread though. Sorry if i come off as confrontational. and by the way i love math and am a math major and can relate to how you felt in high school.


Don't worry about coming off as a jerk. I could tell right away that you obviously care about the subject, otherwise you wouldn't have said anything at all.

Share this post


Link to post
Share on other sites
You got a good point actually. I'm not even sure I understand the pythagorean theorem anyway, besides it being the definition of flat space. I still don't think that his problem is really related to the poincare conjecture anyway, but thats not the point anyhow.

Share this post


Link to post
Share on other sites
Quote:
Original post by ibebrett
You got a good point actually. I'm not even sure I understand the pythagorean theorem anyway, besides it being the definition of flat space. I still don't think that his problem is really related to the poincare conjecture anyway, but thats not the point anyhow.


No, I agree with you now. I was mistaken on how much they were related.

Share this post


Link to post
Share on other sites
I now have another issue which I'm just going to piggyback onto this thread. I have it working for circles but I also need to support ellipses. That means I need to define an ellipse as a radius given an input angle.

If rh is the radius when the angle is 0 or pi, and rv is the radius when the angle is pi/2 or pi*3/2, then what is the radius at a given angle?

EDIT: Nevermind, I found the answer. It's ridiculously complicated. Where a is the angle, rh is the horizontal radius, and rv is the vertical radius:

r(a) = sqrt( (rh2 * rv2) / ((rh * sin(a))2 + (rv * cos(a))2) );

[Edited by - CGameProgrammer on March 26, 2008 12:22:08 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this