Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock a3bb93a749 Fix vows clobbering our custom asserts. 2013-03-05 09:01:18 -08:00
Jason Davies f6891ef901 Fix d3.geo.circle.origin.
3D rotations are not commutative, so we must perform an inverse rotation
to move something from origin [0, 0] to [λ, φ].  Normally we are moving
origin [λ, φ] to [0, 0].
2012-12-29 13:09:12 +00:00
Jason Davies 31d59cfc93 Fix d3.geo.circle.origin. 2012-12-12 08:51:31 +00:00
Jason Davies e6ab7219b8 Detect polygon direction using area calculation.
This fixes various problems that were occurring due to winding numbers
being tricky on a finite sphere.

This also includes some cleanup and fixes for degenerate points.
2012-12-05 09:14:07 -08:00
Jason Davies cba8a77bad Improve Polygon clipping.
1. We no longer perform an equality check on GeoJSON polygon endpoints,
since we know that the first and last points should be equal.
2. However, there are special cases where a polygon just touches the
clip edge, generating two coincident intersection points.  Here we avoid
generating a coincident point, and continue as normal.
3. Another special case is where we have coincident intersection points
e.g. due to a self-intersecting polygon.  Here we continue calculating
the winding number as if this is a closed polygon (so we know whether to
insert a polygon around the whole clip edge).
2012-11-20 22:20:54 +00:00
Mike Bostock 2fc940787f Delete d3.geo.circle clip test. 2012-11-18 10:16:01 -08:00
Jason Davies 18de5cd5c1 Fix d3.geo.circle clipping of [Multi]Point. 2012-11-14 12:44:29 +00:00
Jason Davies 38c304b68d Add test for d3.geo.circle.
Fixes an error when no angle is explicitly set.
2012-11-10 21:57:56 +00:00
Jason Davies 13c91c2e01 Fix a few bugs.
Hurrah for tests!
2012-10-02 11:25:35 +01:00
Mike Bostock d0b0af50b6 Fix more bugs in circle clipping.
It was returning 0 rather than null when a feature was completely clipped, and
it was crashing when a closed polygon was completely clipped.
2012-07-02 17:42:23 -07:00
Mike Bostock 54b0dcba00 Optimize greatArc and circle.
When clipping, the origin of the great arc doesn’t change, so we can cache a
number of intermediate values and accelerate the clipping computation.
2012-07-02 16:58:54 -07:00
Jason Davies 8710e5bbd1 Add some unit tests for d3.geo.circle. 2012-07-02 17:02:52 +01:00