mbostock/d3 — pull request #1193 by jasondavies (2013-04-11 17:30:48+00:00)
Title: Enforce minimum sample interval for resampling.

The minimum sample interval is somewhat arbitrarily set to 16 × δ, where
δ is the Douglas–Peucker threshold. This fixes cases where resampling
stops too early due to the perpendicular distance being below the
threshold; particularly for points that are far apart and whose
great-circle arc is projected to an S-shape. The midpoint lies along a
straight line, failing the Douglas–Peucker check, but further resampling
produces an S-shape.

Ideally, resampling should also detect cases where an intermediate point
does not need to be drawn, i.e. where there truly is a straight line.
This fix causes points to be drawn at the minimum sample interval, and
thus may degrade performance slightly due to drawing redundant points.

Fixes #1162.