Jump to content
  • Advertisement

Archived

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

wazoo69

Dazed and Confused

This topic is 6338 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

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 this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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!

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!