I have to draw a visual representation of Pythagorean theorem. I had the initial approach of drawing the triangle in the middle and then work my way up by handling the squares. But it seems to much brute-force work. So is there any easy way to do this which could mean avoiding the brute-force approach ? (maybe with some library). Some sort of explanation or useful hint would suffice.