#### Archived

This topic is now archived and is closed to further replies.

# Dazed and Confused

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

## Recommended Posts

Okay what I have is a center-point in 3d space, and an accompanying radius value. What I''m trying to do is find the distance between a point somewhere in the sphere to the middle. Can anyone offer any suggestions?? thanks, Wazoo What we do in this life, echoes in eternity!

##### Share on other sites
I''m not sure if you''re asking this but:

sqr((x-x0)^2+(y-y0)^2+(z-z0)^2)

sqr=square root function (sqrt in C)

(x0,y0,z0)=sphere center
(x,y,z)=point somewhere in the sphere (or outsize it if you wish)

##### Share on other sites
Thanks...I think that''s what I was looking for..I''ll try that..

Wazoo

What we do in this life,
echoes in eternity!

1. 1
2. 2
Rutin
18
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633701
• Total Posts
3013443
×

## Important Information

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!