Jump to content
  • Advertisement
Sign in to follow this  
CGameProgrammer

Circle on a sphere's surface

This topic is 3765 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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 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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!