I got such a wonderful answer regarding The Diagonals of a Regular Octagon, so I thought I'd try asking another question we had on our Pizza and Problem quiz activity at College of the Redwoods. The question was:
A 4 × 4 × h rectangular box contains a sphere of radius 2 and eight smaller spheres of radius 1. The smaller spheres are each tangent to three sides of the box, and the larger sphere is tangent to each of the smaller spheres. What is h?
I'd like to learn how to construct such a model using Mathematica and determine the height h of the box.
Thanks for any help.
Answer
Your question is like a sangaku problem. What is the distance between the centre of the large sphere and one of the smaller spheres? The large sphere centre is $\{2,2,h/2\}$, one of the small spheres is at $\{1,1,1\}$. Their separation equals the sum of their radii. That is,
Norm[{2, 2, h/2} - {1, 1, 1}] == 1 + 2
Solve the expression for $h$, and choose the positive root, $h=2(1+\sqrt{7})$.
With[{h = 2 (1 + Sqrt[7])},
Graphics3D[{Orange,
Sphere[{1, 1, 1}, 1], Sphere[{3, 1, 1}, 1], Sphere[{1, 3, 1}, 1],
Sphere[{3, 3, 1}, 1], Sphere[{1, 1, h - 1}, 1],
Sphere[{3, 1, h - 1}, 1],
Sphere[{1, 3, h - 1}, 1], Sphere[{3, 3, h - 1}, 1],
Red, Sphere[{2, 2, h/2}, 2]
}, Lighting -> "Neutral",Axes->True]]
Comments
Post a Comment