|
-
Nov 20th, 2004, 08:00 PM
#1
Thread Starter
Addicted Member
Distance between 2 points in 3D
How do I find the distance between two points in 3D?
[In time of development time stands still]
-
Nov 20th, 2004, 08:07 PM
#2
Frenzied Member
let's say the points are:
(x1,y1,z1) and (x2,y2,z2)
You then basically do pythagoras thingy twice. So:
distance = sqrt(sqrt((x2-x1)2 + (y2-y1)2) + (z2-z1)2)
Edit: edited, forgot the 2's
Have I helped you? Please Rate my posts. 
-
Nov 20th, 2004, 08:12 PM
#3
Thread Starter
Addicted Member
Shouldn't that be:
distance = sqrt(sqrt((x2-x1)2 + (y2-y1)2)2 + (z2-z1)2)
thus would equal:
distance = sqrt((x2-x1)2 + (y2-y1)2 + (z2-z1)2)
Or did I miss something?
[In time of development time stands still]
-
Nov 20th, 2004, 08:17 PM
#4
Frenzied Member
Yes you're right. I'm too tired for any of this right now.
Have I helped you? Please Rate my posts. 
-
Nov 28th, 2004, 05:18 PM
#5
Hyperactive Member
u crazy fools, it is exactly the same as the the distance between two points in 2-dimensions except u add in a bit for the third dimension, u dont need any extra spuare roots or anything.
d = ((x1 - x2) ^ 2 + (y1 - y2) ^ 2 + (z1 - z2) ^ 2) ^ 0.5
Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White
-
Nov 28th, 2004, 05:33 PM
#6
Not NoteMe
Originally posted by Arachnid13
u crazy fools, it is exactly the same as the the distance between two points in 2-dimensions except u add in a bit for the third dimension, u dont need any extra spuare roots or anything.
d = ((x1 - x2) ^ 2 + (y1 - y2) ^ 2 + (z1 - z2) ^ 2) ^ 0.5
errr....
You're formula is identical to eXterminator's (corrected) one.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
-
Nov 29th, 2004, 03:21 PM
#7
Hyperactive Member
woops, so it is. sorry bout that! i didnt notice the corrected one
Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|