The essence of anticipation (2016)

2019/11/02

In the animation above, the red square travels for 191 frames (on a 60 Hz display) between bounces off the left and right walls of the inner box, and it travels for 111 frames between bounces off the top and bottom walls. So it should hit a corner every 21,201 frames.

The inner box travels for 622 frames between bounces off the left and right walls of the outer box, and it travels for 362 frames between bounces off the top and bottom walls. So it should hit a corner every 112,582 frames.

Both should hit the corner simultaneously every 2,386,850,982 frames, which according to a unit conversion tool is about 0.67 times the orbital period of Mars.

I made this back in 2016, so it would have happened already if one left it open all this time.

Update:

In 2,386,850,982 frames, the red square travels travels across horizontally 12,496,602 times, returning to the left edge, and across vertically 21,503,162 times, returning to the top edge.

The inner box travels across horizontally 3,837,381 times, reaching the right edge, and across vertically 6,593,511 times, reaching the bottom edge.

Thus at the first simultaneous corner hit, the red square hits the top left while the inner box hits the bottom right, which wouldn’t be satisfying at all. They should both hit in the same corner simultaneously every 4,773,701,964 frames, which the unit conversion tool informs me is about 0.97 times the half-life of sodium-22.

My last post was about either A machine for collecting all yellow Starbursts and launching them into the sun or How IntelliJ determines if it can create a desktop entry. Find out which.