Visualizing euclidean distance of high dimension line in 2D

42 Views Asked by At

I have distances $d_1, d_2, d_3 ... d_n$ corresponding to each of the $n$ dimensions. I compute the euclidean distance as $ D = \sqrt{ d_1^2 + d_2^2 + d_3^2 + ... + d_n^2 }$

I want to present this information in a drawing.

If $n=2$, I can simply represent this as a right triangle with the $d_1$ and $d_2$ being the two sides and $D$ being the hypotenuse.

I want to extend this for $n>2$ but still represent this in a $2D$ drawing, with a straight line from $(0,0)$ to $(D,0)$ representing the total distance. I want to place a $2D$ line for each of $d_1, d_2 ...$ of the same length such that they start at $(0,0)$ and end at $(D,0)$ and are all connected.

I am looking for any references that could help in coming up with an algorithm to find the start and end co-ordinates for the n lines corresponding to $d_1, d_2 ... d_n$ .

In other words, it is like we have $n$ sticks of length $d_1, d_2 ... d_n$. We want to arrange them one after another so that the distance between the starting point and end point is $D$.

Another way of stating the problem: Imagine we want to form a closed polygon. One of the segment runs from $(0,0)$ to $(D,0)$. We want to place the $n$ segments of length $d_1, d_2 ... d_n$ such that the polygon gets closed.