// chatGPT
Your intuition is correct! The position of the larger triangle can indeed be calculated as the vector from the incenter of the smaller triangle to the midpoint of its hypotenuse, scaled by the factor X.
To see why this works, consider that the incenter of a triangle is the point where the angle bisectors of the triangle intersect. Since the angle bisectors are equidistant from the sides of the triangle, the incenter is equidistant from all three sides.
Now, since the pivot point is halfway along the hypotenuse, the midpoint of the hypotenuse is equidistant from the other two sides of the smaller triangle. Therefore, if we place the larger triangle so that its sides are equidistant from the sides of the smaller triangle, the larger triangle's hypotenuse will also be equidistant from the sides of the smaller triangle.
So we just need to find the vector from the incenter of the smaller triangle to the midpoint of its hypotenuse, and scale it by X to get the position of the larger triangle. To find