Riddler Classic

From Mikael Rittri, a mathematical souvenir problem:

In the Riddler gift shop, we sell interesting geometric shapes of all sizes — Platonic solids, Archimedean solids, Klein bottles, Gabriel’s horns, you name it — at very fair prices. We want to create a new gift for fall, and we have a lot of spheres, of radius 1, left over from last year’s fidget sphere craze, and we’d like to sell them in sets of four. We also have a lot of extra tetrahedral packaging from last month’s Pyramid Fest. What’s the smallest tetrahedron into which we can pack four spheres?


In [1]:
SPHERE_R = 1

In [2]:
from sympy import symbols, cos, sin, tan, rad, deg, sqrt, atan, simplify, acos, asin, pi
from sympy import init_printing
from sympy.physics.vector import vlatex

init_printing(latex_printer=vlatex)

In [3]:
side_length = symbols('a')

In [4]:
center_to_side = tan(pi/6)*(side_length/2)
center_to_side


Out[4]:
$$\frac{\sqrt{3} a}{6}$$

In [5]:
total_tri_height = sin(pi/3)*side_length
total_tri_height


Out[5]:
$$\frac{\sqrt{3} a}{2}$$

In [6]:
center_to_vertex = total_tri_height - center_to_side
center_to_vertex


Out[6]:
$$\frac{\sqrt{3} a}{3}$$

In [7]:
theta = asin(center_to_vertex/side_length)
theta


Out[7]:
$$\operatorname{asin}\left(\frac{\sqrt{3}}{3}\right)$$

In [8]:
tetra_height = side_length*cos(theta)
tetra_height


Out[8]:
$$\frac{\sqrt{6} a}{3}$$

In [9]:
phi = atan(center_to_side/tetra_height)
phi


Out[9]:
$$\operatorname{atan}\left(\frac{\sqrt{2}}{4}\right)$$

In [10]:
sphere_center_to_tetra_point = SPHERE_R / sin(phi)
sphere_center_to_tetra_point


Out[10]:
$$3$$

In [11]:
side_length = 2 * (sphere_center_to_tetra_point * cos(theta)) + 2 * SPHERE_R
side_length.evalf()


Out[11]:
$$6.89897948556636$$