0
$\begingroup$

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.

$\endgroup$
7
  • $\begingroup$ Is there any restriction on the angles between $d_k$ and $d_{k+1}$? $\endgroup$ Apr 17 '20 at 14:15
  • $\begingroup$ @Aretino No restriction. I was thinking there will be only one unique solution. But any solution is fine. $\endgroup$
    – Suresh
    Apr 17 '20 at 14:17
  • $\begingroup$ Hence the resulting polygon needn't be convex, right? $\endgroup$ Apr 17 '20 at 14:20
  • $\begingroup$ Yes. But it will have to be a simple polygon i.e. without segments crossing. I think the solution will be a convex polygon. I will add a drawing so that there is no confusion. $\endgroup$
    – Suresh
    Apr 17 '20 at 14:28
  • 1
    $\begingroup$ Probably this paper could be of help: researchgate.net/publication/… $\endgroup$ Apr 17 '20 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.