I'm using php and gd library to draw a triangle. I'm able to draw triangle and add text to it(using imagettftext). But now i'm stuck with a problem.
The two sides of the triangle are 'x' and 'x+2'. So hypotenuse will be sqrt(x^2+(x+2)^2). But i dont know how to show this equation using proper mathematical(i mean using square root symbol etc.) in the image using gd functions as a label to the hypotenuse.
Is there a way for doing it?