I have a line drawn in red color(basically, i have co-ordinates (x1,y1) and (x2,y2)). Now I'm supposed to draw two line which are in green color intersecting at the beginning point of line(x1, y1)
The red line can be in any angle, so i need some help here. How do i mathematically get the co-ordinates for two green lines. i.e. I already have (x1, y1), so i need (x3, y3) and (x4, y4)
Angle between green lines should be between 85 to 90 degrees, and length of each green line should not exceed 10pixels(Fixed size)
I have an API to draw a line which expects the co-ordinates, so I need code to calculate co-ordinates for green line in C++/C++11.