# ring conforms to the circumference of a sphere

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

## Recommended Posts

Hi, Scenario: 1. a sphere of radius: 100 2. a circle shape of radius: 100 3.I align the circle to the sphere I want the circle to start with radius 100 and when i take it(or animate) down to the bottom of the sphere(pole) it should zero out in radius. Ring conforms to the circumference on each step of it's way down. What would the math be in this situation. i could hack this by: 1.At each step along it's down path(circle Pivot) shoot a ray to the sphere and use the the magnitude to drive the radius. but that wont further my mathematical understanding of the problem. Thanks for any help. b

##### Share on other sites
Hum... does your circle always move over the sphere along one of the axes (in other words, does it always move in only the z-direction, or the x-direction, or the y-direction)?

If so, then I think that I'm correct in suggesting that you look at the equation of your sphere, and take into account the distance of the circle along the relevant axis at that point.

What is this for, if I may ask?

##### Share on other sites

Hey thanks.

r = the radius of the sphere
d = the distance away from the center of the sphere

rearranging the distance formula we get.
x^2 = r^2 - d^2
x = sqrt (r^2 - d^2)

"What is this for, if I may ask?"
not for school assignment i assure you ;)
Thanks.

b

##### Share on other sites
Fair enough - I'm glad that you got a useful answer. ^_^

Quote:
 not for school assignment i assure you ;)

Heh, that was indeed the reason that I gave so vague an answer - I wanted to be confident that it wasn't homework before I gave too much. ^^;

##### Share on other sites

Quote:
 Original post by ThaumaturgeHeh, that was indeed the reason that I gave so vague an answer - I wanted to be confident that it wasn't homework before I gave too much. ^^;

Fair game.I understood that.
I've been around for a while now(under boomji).

b

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 14
• 46
• 22
• 27
• ### Forum Statistics

• Total Topics
634051
• Total Posts
3015253
×