Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Distance of 2 objects?

Author
Message
retardnewb17
13
Years of Service
User Offline
Joined: 6th Oct 2011
Location:
Posted: 22nd Oct 2011 11:33
How would it be possible to get accurate number of two 3d object's distance?
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 22nd Oct 2011 12:12
I believe the formula is sqrt((x1 - x2)^2 + (y1 - y2)^2 + (z1 - z2)^2) but I'm not 100% sure.

Darkzombies
13
Years of Service
User Offline
Joined: 25th Dec 2010
Location: In multiple tabs, most likely youtube.
Posted: 22nd Oct 2011 18:53
What about in 2d?

t is s gnat re h as ben destro ed by A m d
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Oct 2011 20:14
In 1D: sqrt((x1 - x2)^2)
In 2D: sqrt((x1 - x2)^2 + (y1 - y2)^2)
In 3D: sqrt((x1 - x2)^2 + (y1 - y2)^2 + (z1 - z2)^2)
In 4D: sqrt((x1 - x2)^2 + (y1 - y2)^2 + (z1 - z2)^2 + (w1 - w2)^2)

Ok, the 4D was kind of a joke as far as DBPro is concerned, but it's actually correct mathematically - I just wanted to make the progression obvious.

The 1D can be rewritten a little more efficiently: abs(x1 - x2)

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 23rd Oct 2011 04:05 Edited at: 23rd Oct 2011 04:05
It looks like it keeps going as you add more dimensions. [href=en.wikipedia.org/wiki/Euclidean_distance]Here's[/href] what I mean.

How would you prove that though for 4+ dimensions? Mathematical induction?

Login to post a reply

Server time is: 2024-11-24 00:45:56
Your offset time is: 2024-11-24 00:45:56