Tower Defense Geometry
Place towers on a path and see the geometry — damage is just path length in range, a straight caps at 2r, and building on the corner is a mistake.
Click to place a tower. The number on it is how much path its circle covers — which is exactly what its damage is proportional to. Move around a corner and watch it change. Everything runs in your browser; nothing is uploaded.
Damage is a length
A tower shoots whatever is inside its radius, so the damage it deals to one passing enemy is its fire rate times the time that enemy spends in range. At a constant speed that time is the length of path inside the circle, divided by the speed. Everything else cancels — where along the path the coverage sits, which direction the enemy came from, none of it matters.
So "where should I build?" is really "which circle covers the most path?", and that has an exact answer.
A straight caps at two radii; a corner reaches four
On a straight path the best any circle can do is sit on the line and cover a diameter — 2.00r, searched over the whole plane, with no placement doing better. A corner lets one circle cover both arms at once, and the sharper the turn the more it gets:
| Turn | Best coverage | Times a straight | Best spot, back from the vertex | Building on the vertex gets |
|---|---|---|---|---|
| 180° | 2.00r | 1.00× | 0.00r | 100% |
| 150° | 2.07r | 1.04× | 0.27r | 97% |
| 120° | 2.31r | 1.15× | 0.58r | 87% |
| 100° | 2.61r | 1.31× | 0.84r | 77% |
| 90° | 2.83r | 1.41× | 1.00r | 71% |
| 75° | 3.17r | 1.59× | 1.00r | 63% |
| 60° | 3.46r | 1.73× | 1.00r | 58% |
| 45° | 3.70r | 1.85× | 1.00r | 54% |
| 30° | 3.86r | 1.93× | 1.00r | 52% |
| 15° | 3.97r | 1.98× | 1.00r | 50% |
A hairpin corner is worth just under twice a straight stretch. For a single corner 4r is the ceiling, because two arms is all a corner has — though a whole path can do better than that, which is the next section.
The last column is the part worth taking away. Building on the corner itself is a mistake. Sitting exactly on the vertex covers a radius along each arm — 2r, which is precisely what a straight stretch gives, so the corner has bought you nothing. The gain comes from standing back from it, where the circle cuts a chord out of each arm instead of a radius. At a 45° turn the vertex gets you 54% of what is available; at the sharpest turns it falls to 50%.
The formula, and the edge it has
For a turn of a right angle or sharper there is a closed form, and it is exact rather than
close. Stand one radius back along the bisector and the circle cuts a chord of
2r·cos(θ/2) from each arm, so the coverage is
4r · cos(θ / 2)
That is 2.83r at a right angle, 3.70r at 45°, and it climbs towards 4r as the turn tightens. Every row at 90° or below in the table above matches it to under half a per cent, with the best placement sitting at exactly one radius.
Above a right angle it stops being true, and not gently. The arms are far enough apart that the vertex cuts the chords short before they finish, so the formula runs low: 1.5% at 100°, 13% at 120°, 50% at 150°. At a straight 180° it predicts zero coverage when the honest answer is 2r. It is a genuine result on one side of a right angle and nonsense on the other, which is why the code returns it with a flag rather than as a general rule.
The "best spot" column shows why. Below a right angle it sits at exactly one radius, every time. Above it, the optimum creeps in towards the vertex — 0.84r at 100°, 0.58r at 120°, 0.27r at 150° — until at a straight join the best place is on the line itself and the corner has stopped being a corner.
A whole path can beat four radii, because a corner is not the only thing in range
Four radii really is the most a single corner can give — two arms is all it has. But that is a fact about corners, not about paths. Where a route doubles back on itself, a third stretch of it comes inside the same circle:
| Path | Corners | Best placement | Stretches in range |
|---|---|---|---|
| Zig-zag — four sharp turns | 90°, 90°, 90°, 90°, 90°, 90° | 2.83r | 2 |
| Hairpin — arms that double back | 7°, 15°, 15° | 4.55r | 3 |
| Long straight — nowhere good to build | none | 2.00r | 1 |
The last column is the whole explanation. The hairpin path reaches 4.55r — past the four-radius corner ceiling — because the best spot catches three separate stretches of the route at once, not two arms of one corner. The straight path catches one, which is exactly why it caps at two radii.
The straight path is the weakest to defend and it is not close — there is simply nowhere on it that a tower can do more than cover its own diameter. That is the whole reason tower defense maps are drawn with switchbacks.
How to use
- Pick a path and click to place towers.
- Each tower shows how much path its circle covers, in radii.
- Move one around a corner to watch the number change.
- Send a wave to see the coverage turn into stopped enemies.
- Try the long straight path to see why maps are drawn with switchbacks.
Frequently asked questions
Where should you place a tower?
Wherever its circle covers the most path. A tower shoots whatever is in range, so the damage it deals to one enemy is its fire rate times the time that enemy spends inside the circle — and at a constant speed that time is just the length of path inside the circle. Everything else cancels.
How much is a corner actually worth?
On a straight path the best any circle can do is cover a diameter, 2r. At a corner it can cover both arms, and the sharper the turn the more it gets: 2.83r at a right angle, 3.70r at 45 degrees, approaching 4r at a hairpin. So a sharp corner is worth just under twice a straight stretch.
Should I build right on the corner?
No, and this is the common mistake. Sitting exactly on the vertex covers one radius along each arm, which totals 2r — precisely what a straight stretch gives, so the corner has bought you nothing. Stand back from it instead: at a right angle or sharper, exactly one radius back along the bisector is optimal.
Is there a formula?
For a turn of a right angle or sharper, the best coverage is exactly 4r times the cosine of half the turn angle, achieved one radius back along the bisector. Above a right angle it stops being true — the vertex cuts the chords short, so the formula runs 13% low at 120 degrees and predicts zero at a straight join, where the real answer is 2r.
Can a placement ever beat four radii?
Yes, though a single corner cannot. Four radii is the ceiling for one corner because a corner has only two arms. A path that doubles back on itself puts a third stretch inside the same circle, and the hairpin path here reaches 4.55r that way.
Why are tower defense maps full of switchbacks?
Because a straight run is the weakest thing to defend — there is nowhere on it where a tower can do more than cover its own diameter. Every turn a designer adds creates a spot where one tower covers two stretches of path at once, and a doubling-back section creates spots covering three.
Does the enemy speed matter?
It scales all the damage equally, so it changes how hard the wave is but not where you should build. The best placement depends only on the geometry — which circle catches the most path — and that is the same whatever speed the enemies walk at.
Does this send anything anywhere?
No. Everything is computed in your browser and nothing is uploaded.
🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.