Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: how to get the area of circles

  • To: mathgroup at
  • Subject: [mg74803] Re: how to get the area of circles
  • From: "Valeri Astanoff" <astanoff at>
  • Date: Thu, 5 Apr 2007 04:19:00 -0400 (EDT)
  • References: <euvlho$b9n$>

On 4 avr, 09:53, "doufunao" <gaoshan2... at> wrote:
> hi guys,
> I'm working on a project. I need to calculate the area of many circles
> in a 2D space which may overlap each other.
> It's quite complicated. I am not sure whether mathematica can do this.
> Is there any software/lib/package available already?
> thanks.

Good day,

Here is a solution using "Boole" :

ixmin = Ordering[circles,1,#1[[1]] < #2[[1]]&]//First;
xmin = circles[[ixmin,1]]-circles[[ixmin,3]];

ixmax = Ordering[circles,1,#1[[1]] > #2[[1]]&]//First;
xmax = circles[[ixmax,1]]+circles[[ixmax,3]];

iymin = Ordering[circles,1,#1[[2]] < #2[[2]]&]//First;
ymin = circles[[iymin,2]]-circles[[iymin,3]];

iymax = Ordering[circles,1,#1[[2]] > #2[[2]]&]//First;
ymax = circles[[iymax,2]]+circles[[iymax,3]];

insideQ[{x_,y_},{a_,b_,r_}] := (x-a)^2+(y-b)^2 < r^2;
NIntegrate[Boole[Or@@(insideQ[{x,y},#]& /@ circles)],





  • Prev by Date: Re: Expansion symbolic
  • Next by Date: Re: how to get the area of circles
  • Previous by thread: Re: how to get the area of circles
  • Next by thread: Re: Expansion symbolic