Thread: OT: 2D/3D math
View Single Post
  #3  
Old November 26th, 2004, 10:15 PM
Slick's Avatar

Slick Slick is offline
Brigadier General
 
Join Date: Apr 2002
Location: Kailua, Hawaii
Posts: 1,860
Thanks: 0
Thanked 1 Time in 1 Post
Slick is on a distinguished road
Default Re: OT: 2D/3D math

yeah for 2D:

line: Ax + By + C = 0
Point: (x1, y1)

[saving you the gory details]

Code:


|Ax1 + By1 + C|
distance between point and line: D = -----------------
square root (A^2 + B^2)



notation: | | is absoute value, ^2 is raised to power 2


For 3D, it takes a little more...


Slick.
__________________
Slick.
Reply With Quote