I use php and gd library to draw a triangle. I can draw a triangle and add text to it (using imagettftext). But now I am facing a problem.
The two sides of the triangle are "x" and "x + 2". Thus, the hypotenuse will be equal to sqrt (x ^ 2 + (x + 2) ^ 2). But I don’t know how to show this equation using the correct mathematical (I mean using the square root symbol, etc.) in the image, using the gd functions as a hypotenuse label.
Is there any way to do this?
source
share