Isosceles right triangle sides

223 Views Asked by At

I need to find a reasonable length sides for 3D printing an isosceles right triangle. So basically if the formula goes something like this:

Right triangle Pythagorus theorem gives us:

x^2 + y^2 = z^2 (z being the hypotenuse)

Since this is an isosceles triangle:

2 * x^2 = z^2

and z = x * sqrt(2)

My question is how do I find z and x for my needs? And by reasonable I mean:

  1. Not very large (in the order of 10s or 100s and maybe even 1000s)
  2. Whole numbers or two decimal point precision)

Or is that not a thing? Thanks in advance!

1

There are 1 best solutions below

2
On BEST ANSWER

Nice approximations come from solutions to Pell's equation $x^2-2y^2=1$ and the closely related $x^2-2y^2=-1$. We can note that $x=1, y=1$ is a solution to the second. Because of this solution and Brahmagupta's identity if you have a solution $(a,b)$ to one of them, $(a+2b,a+b)$ will be a solution to the other. Each successive solution will have the ratio of the two numbers a closer approximation to $\sqrt 2$ because the $1$ in the equation is smaller and smaller compared to $x^2,y^2$. The solutions will also alternate between being above $\sqrt 2$ (when the left side is $1$) and below $\sqrt 2$. The approximations are $\frac 11=1, \frac 32=1.5, \frac 75=1.4, \frac {17}{12}\approx 1.4167, \frac {41}{29} \approx 1.4138$ and so on. The last is rather close.