Home > Blockchain >  how to draw a line knowing the starting coordinate, line length x angle and y, angle
how to draw a line knowing the starting coordinate, line length x angle and y, angle

Time:08-03

I am trying to draw a line knowing the starting coordinate, line length x angle and y, angle. I am trying to visualize the eye gaze direction of a human in a video.

For an example, I want to draw the blue lines here:

enter image description here

I already have the center point of the eye (start of the blue line), and I already have the x and y angle of the eye. How do I draw this line?

I've found a lot of tutorials on how to draw such lines (no that not drawn with paint

Its basicly just math:

As far as I know the height of the triangel is height = math.sinus(h) * l and its width is width = math.cos(h) * l. I hope this help.

  • Related