What is the general algorithm for solving the problem of determining
coordinates of vertices of an arbitrary polygon by lengths of sides and angles between them.
For example, we have an array of lengths of sides [10 10 10 10] and an array of angles [90 90 90 90],
we need to get an array of vertex coordinates [[0 0] [10 0] [10 10] [0 10]].
Check data:
l=[10 10 10] a=[60 60 60] => [[0 0] [10 0] [5 8.66]]l=[20 14.14 10 10] a=[45 135 90 90] => [[0 0] [10 0] [20 10] [0 10]
It does not matter where on the coordinate grid the solution will be located. It also doesn't matter the direction of rotation (clockwise or counterclockwise). The main thing is that the resulting set of coordinates corresponds to the original conditions. Any of the solutions from the possible set is of interest.
Clarification. Consider that the first edge of the polygon lies on the X-axis and the vertices have coordinates [0 0] [L 0], where L is the length of the edge. Clockwise bypass.