CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2008
    Posts
    15

    given N circles,how many pairs intersect

    Hi all,

    So on plane, given N circles, with radius and coordinates of centers known, is there any good way to figure out how many pairs of circles intersect? I mean an algorithm with <n^2 complexity.

    a pair of circles intersect when the distance between their centers is smaller than the sum of their radii.

    Thanks!!

  2. #2

    Re: given N circles,how many pairs intersect

    R-tree or other efficient rectangular spatial index using the bounding box of the circle, followed by a test whether the circles really do intersect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured