0

By relative coordinate system I am refering to a specific system where each coordinate is given only as its distance away from other points (if this kind of system has a more accurate name then please let me know as I am struggling to find any information on a system like it), I am fairly certain this would require at least three distances per point as with only two distances there would be two intersection points, with the third you could narrow that down to a single point. However I welcome being corrected on that assumption.

The problem I am specifically asking about is what happens when you need to calculate the distance between two points which do not have a direct link. In this case I would assume every distance other than the distance we are trying to find is already known.

To ask about this in a way that can be explained lets consider a quadralateral network ABCD where the distance between all of the nodes is known. Then a node E is added and AE, BE, and CE are defined.

Can the distance DE be calculated just using the information given?

I thought I had found an answer with this (How can I find the diagonal of a quadrilateral?) question, but the answers assume that the quadralateral is convex and I don't think that assumption can be made.

  • This looks similar to barycentric coordinates in a triangle. – Hosam Hajeer Dec 03 '21 at 01:41
  • @QuarterLemon that is extremely helpful and they do appear to be extremely similar concepts, however in barycentric coordinates it appears that the numbers are only positive if inside the triangle formed by the three points. So this problem is kind of like barycentric coordinates if you only know the absolute values of the coordinates. Though admitedly this is coming from twenty minutes of reading into the subject and a lot of it was written in a way I lack the expertise to decypher. But thanks for the comment its given me a great starting place for more research – Jade Neoma Dec 03 '21 at 02:33

1 Answers1

1

You should establish a coordinate system yourself.

Start with two points $A, B$. Choose $A$ to be the origin. It has coordinates $(0,0)$. $B$ will define the direction of the $x$-axis. So the coordinates of $B$ are $(b,0)$, where $b = d(A, B)$ is the distance between $A$ and $B$. $(1,0)$ is the point at a distance of $1$ away from $A$ in the direction of $B$.

You will need a third point $C$, not in line with $A$ and $B$, to define the positive-$y$ side of the $x$-axis. Suppose $C = (x,y)$ is at a distance $r_a = d(A, C), r_b = d(B, C)$ from $A$ and $B$. This gives a system of two equations $$x^2 + y^2 = r_a^2\\(x - b)^2 + y^2 = r_b^2$$ If you expand the second equation and then subtract it from the first and simplify, you get: $$x = \frac{r_a^2 - r_b^2 + b^2}{2b}$$ Since we've chosen $C$ to be in the positive $y$ side of the plane, we have $y = \sqrt{r_a^2 - x^2}$.

Now for all future points you can calculate their coordinates by similarly solving the equations for their distance from two existing points, and as you've described, using a third point to differentiate between the two solutions. Once you know the coordinates, you can just calculate distance to any other known point.

Paul Sinclair
  • 43,643
  • Doesn't this just take the relative coordinate system and reduce it back to an absolute coordinate system? which, while it may work, seems to be avoiding the situation rather than understanding it? – Jade Neoma Dec 04 '21 at 00:14
  • 1
    This does not "avoid the situation". It confronts the situation and fully handles it. It gives you exactly what you asked for - an efficient way of finding the distances between any two points. I have no idea what great understanding you were expecting. I just deal in solutions, not grandiose schemes. – Paul Sinclair Dec 04 '21 at 00:46