How to compute point from {length and angle}

93 Views Asked by At

How to compute point from {length and angle}? enter image description here

2

There are 2 best solutions below

0
On

radian2degree(a) = a * 57.295779513082

degree2radian(a) = a * 0.017453292519

x = start_x + length * cos(angle);
y = start_y + length * sin(angle);

That should get you started.

0
On

I'll assume you meant to write $\alpha_1$, $\alpha_2$,$\alpha_3$, $\alpha_4$:

  1. Points on the end of line A are (length of A is $l_A$): $x_A=l_Acos(\alpha_1)$ and $y_A=l_A sin(\alpha_1)$,

  2. Point on the end of B line are (I assume this is just a constant): $x_B=x_A+l_B$ and $y_B=y_A$,

  3. Point on the beginning of C segment: $x_C=x_B+l_{BC}cos(\alpha_2)$ and $y_C=y_B+l_{BC}sin(\alpha_2)$

and so on...