Here’s a fun algorithm: put the biggest possible square into a circle. Then looking at just the right side of the space above that square, add in the biggest possible square, then add in the biggest square into the space that remains, and so on, filling up that octant of the circle. It’s not too hard. My solution’s after the break. Continue reading
Monthly Archives: July 2014
Circle Packing In A Square
Given a circle of radius r, and around it a box of side 2r. We want to put another circle into the gap between the circle and a corner of the box. Find a formula for the center and radius of the largest circle that can be fit into that space. This might be a little trickier than you first think.
The solution’s after the break, but don’t give up too soon! Continue reading
Mathematica Mangles Input Data
Here’s the short version: If you calculate data in almost any programming language, very large and very small numbers will be printed using a near-universal standard called scientific notation. If you read this data into Mathematica, a system designed for scientific and engineering mathematics, it quietly replaces each one of those numbers with a different, essentially random value. Thus everything you do with your data from that point is untrustworthy. This is an inexcusable and potentially dangerous situation. Continue reading