I need to draw a triangle like an arrow in the middle of the line. How can I calculate triangle's coordinates in order to draw it in the middle of the line PLEASE?

** UPDATE **
Here I have found out how to find the middle of the line, so now I have a coordinate for one of three vertices of the triangle. I need to calculate coordinates of other two vertices.
First start with a triangle of the size you want, say directed to the right. The three corners are then $(0,0), (x_0,y_0), (x_0,-y_0)$ where $x_0 \lt 0$. You just multiply these by the rotation matrix $$\left(\begin {array}{c c}\cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \end{array}\right)\left(\begin {array}{c}x_0 \\ y_0 \end{array}\right)$$ to get each point relative to the head of your arrow. To get $\theta$ you need the angle of your line. How is that represented?