Introduction: The "Brute Force" Trap

I’ll be honest: I thought this would be easy. My goal was simple: fit as many non-overlapping circles as possible into a 100x100 pixel grid.

My first instinct was to use a standard Brute Force approach. I wrote a script to randomly guess x, y coordinates and radii. I let it run for hours. The result? A mess. The circles either overlapped constantly or left huge, inefficient gaps. The problem wasn’t the geometry; it was the grid.

Unlike pure math, where a circle can be at position 10.5553, my system was constrained to an Integer Grid (pixels). This seemingly small constraint broke standard geometric formulas. The "perfect" mathematical position was often "illegal" in my pixel grid.

I realized I didn’t need a calculator; I need…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help