Circle-bound nodes in d3.layout.force(), using a variation of Mike Bostock’s rectangular Bounded Force Layout. Here we calculate the maximum and minimum x for a given y in the circle, and vice versa.
x
y