Line Equation with angle

前端 未结 5 1728
逝去的感伤
逝去的感伤 2020-12-13 06:36

How can I find equation of a line or draw a line, given a starting point, length of line and angle of line (relative to x-axis)?

5条回答
  •  独厮守ぢ
    2020-12-13 07:14

    Starting point you know (x1, x2), end point is (x1 + l * cos(ang), y1 + l * sin(ang)) where l is the length and ang is the angle.

提交回复
热议问题