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)?
You'll want to draw it from (0, 0) to (x_length, tan(angle)*x_length). The gradient will be tan(angle). You can adjust this for a different starting point by subtracting everything from that starting point.
(0, 0)
(x_length, tan(angle)*x_length)
tan(angle)