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)?
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)?
To compute the line equation from a point (x1, y1), and an arbitrary angle α we need to distinguish two cases:
x = my + b
with
m = cot(α)
b = x1 - m * y1;
y = mx + b
with
m = tan(α)
b = y1 - m * x1