Circle-Circle Intersection
✓ Published0🌍 Public
Mmbostock
Last edited Jul 12, 2012
Created on Jul 12, 2012
This example shows the two intersection points where a pair of overlapping circles meet, updating live as the circles move under a force simulation. The circles are positioned by `d3.forceSimulation`, and each frame the code extracts their current centers and radii to compute the chord endpoints via a custom `intersections()` function based on the standard geometric formula. The two crossing points are then drawn as small blue dots, while the circles themselves are rendered as SVG circles. The implementation uses D3’s simulation and selection APIs to bind data and update positions smoothly.
AI-generated description