It should not be too hard if you use pixel perfect collision detection.
After the user has drawn the circle, fill it in* with a mostly transparent color, and use that fill space to pixel perfectly hit detect amongst the balls, all the balls that are hitting the area, are inside the circle.
*easier said than done, since the user draws the circle.
But, I think it should be easy to just make sure that whatever the user draws into has no width or height to begin with, so what they draw determines the width and height, then just fill that area transparently and hit test against it.
Troy Gilbert made a really nice pixel perfect algorithm that's just one function.
Also there is the Collision Detection Kit by Corey Oneal, in fact it has an example where you can draw the terrain that a ball will land/roll on, you may like seeing that, but I think that may be too intense for phones.
__________________
www.actiontad.com - ActionScript and JavaScript sitting in a tree...
|