Tetrahedron with vertices A(1,2,3), B(-2, 8, 9) , C(5, 0, 7) and D(3, 4, 2) has centre of sphere is inscribed I(2, 3, 4) and radius is r = 1.
point(P1, 1, 2, 3):
point(P2, -2, 8, 9):
point(P3, 5, 0, 7):
point(P4, 3, 4, 2):
s1 := area(triangle(T1, [P2, P3, P4])):
s2 := area(triangle(T2, [P1, P3, P4])):
s3 := area(triangle(T3, [P1, P2, P4])):
s4 := area(triangle(T4, [P1, P2, P3])):
s := s1+s2+s3+s4:
x_I := simplify((xcoord(P1)*s1+xcoord(P2)*s2+xcoord(P3)*s3+xcoord(P4)*s4)/s):
y_I := simplify((ycoord(P1)*s1+ycoord(P2)*s2+ycoord(P3)*s3+ycoord(P4)*s4)/s):
z_I := simplify((zcoord(P1)*s1+zcoord(P2)*s2+zcoord(P3)*s3+zcoord(P4)*s4)/s):
plane(P, [P2, P3, P4], [x, y, z]):
point(T, x_I, y_I, z_I);
r := distance(T, P)
I am trying to find all tetrahedrons that sphere is inscribed in a tetrahedron satisfy the following conditions:
- Each vertex (x, y, z) is a triples of integers such that -20 <= x, y, z <= 20.
- The coordinates centre of sphere are also triples of integers.
How can I find?