Forums: » Register « |  Free Tools |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support |

New Free Tools on Dev Shed!

#1
October 18th, 2007, 01:33 PM
 Protected
Contributing User

Join Date: Sep 2007
Location: Portugal
Posts: 86
Time spent in forums: 19 h 39 m 8 sec
Reputation Power: 23
Minimum distance in space

Sorry if this is really basic (it certainly does sound really basic to me), but I'm quite bad at maths: Given a plan with equation Ax + By + Cz + D = 0 and a point (x0, y0, z0), how do I find the minimum distance between both?

#2
October 18th, 2007, 05:32 PM
 0CIRCLE0
Contributing User

Join Date: Oct 2007
Posts: 65
Time spent in forums: 20 h 13 m 20 sec
Reputation Power: 90
Quote:
 Sorry if this is really basic (it certainly does sound really basic to me), but I'm quite bad at maths: Given a plan with equation Ax + By + Cz + D = 0 and a point (x0, y0, z0), how do I find the minimum distance between both?

dx = Ax-x0
dy = By-y0
dz = Cz-z0

distance = sqrt(dx*dx+dy*dy+dz*dz)

I think that is what you are saying.

 Viewing: Dev Shed Forums > Programming Languages > Game Development > Minimum distance in space