12. $P$ is a point inside or on the surface of a unit cube, satisfying the conditions:
(1) The distances from $P$ to the two endpoints of one edge of the cube are $\frac{8}{15}$ and $\frac{17}{15}$, respectively;
(2) At least two vertices of the cube are equidistant from $P$.
Find the number of points $P$ that satisfy both conditions.
Answer
As shown in the figure, when the distance from $P$ to $A_{1}$ is $\frac{17}{15}$, and the distance from $P$ to $A$ is $\frac{8}{15}$, the trajectory of $P$ is an arc $\overparen{L K}$ on the plane $A B C D$. Now consider the intersection lines of the perpendicular bisectors of two vertices of the cube on the plane $A B C D$.
(1) There are 3 perpendicular bisectors of the 12 edges, and their intersection lines on the plane $A B C D$ are $E G, H F$;
(2) There are 6 perpendicular bisectors of the 12 face diagonals, and their intersection lines on the plane $A B C D$ are $A B, B C, C D, D A, A C, B D$;
(3) There are 4 perpendicular bisectors of the 4 body diagonals, and their intersection lines on the plane $A B C D$ are $E F, F G, G H, H E$.
For example, the perpendicular bisector of $B_{1} D$ is the regular hexagon in the figure, and its intersection line on the plane $A B C D$ is $E F$.

The arc $\overparen{L K}$ intersects these lines at 7 points. Similarly, the arcs centered at $B, C, D$ with a radius of $\frac{8}{15}$ each intersect these lines at 7 points. By symmetry, there are 24 points of intersection on each face of the cube that satisfy the conditions.
Each edge of the cube has 2 points of intersection, each counted twice, so the number of points $P$ that satisfy the above conditions is $24 \times 6-24=120$.