title: Draw a parallel line
body: <p>I have x1,y1 and x2,y2 which forms a line segment. How can I get another line x3,y3 - x4,y4 which is parallel to the first line as in the picture. I can simply add n to x1 and x2 to get a parallel line but it is not what i wanted. I want the lines to be as parallel in the picture.</p>
  
  <p><a href="https://i.stack.imgur.com/l7Nrq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/l7Nrq.png" alt="enter image description here"></a></p>