Jump to content

Metric question


Macha

Recommended Posts

I'm clearly out of my depth here, but if there does or does not exist a solution for this I'd be glad to know.

I wonder if there is a metric for something like in the picture below. I am interested in the distance from one point to another (by travelling along the lines). If it is a simple grid then the answer is easy: |x2-x1| + |y2-y1| + |z2-z1|

But what if there is a more messy topology?

Is there a solution for this?

post-4013-126327276218_thumb.jpg

Edited by Macha
Link to comment
Share on other sites

I am not a genius and maybe I misunderstood your question. But you could just calulate a Vector from one point to another from p1 to p2 that would be d=p2-p1 and then just calucalte the vectors length. If you want to go from p1 to p3 over p2 then just add the vectors lenght len(p2-p1) + len(p3-p2).

I just noticed you were talking about Metrics ... so forget about what I have just written ;D

Edited by 0rr
Link to comment
Share on other sites

Hm... It's a bit like this:

Say you are in a city and want to know the distance from your home to some shop. The tedious way would be to count every step and multiply it by the step length. But then you have to walk the way before you find out the distance! A pigeon might just take the xy coordinates of both places and calculate the distance, without every having to fly there in the first place. But that doesn't work for a human walking a grid-like street. But as I said before there is actually an easy way to calculate this for a grid.

If it isn't a simple grid... well I don't know... something to do with topology and metric spaces...

In my wild imagination I was hoping there would be an algorithm that can estimate a metric from the underlying distribution of random points (hahaha) but that may in the end not even be better than just an euclidian distance.

Anyway...I think I can get away with an equispaced grid. Just curious.

Edited by Macha
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...