MathGroup Archive 2009

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

Search the Archive

Re: intersection of two circles

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105872] Re: intersection of two circles
  • From: Simon <simonjtyler at gmail.com>
  • Date: Tue, 22 Dec 2009 04:07:03 -0500 (EST)
  • References: <hgno39$55l$1@smc.vnet.net>

Hi Felix,

It doesn't have a specific function, but if say your radii and origins
are (r1, (x1,y1)) and (r2, (x2,y2)) then you can use, say

Solve[(x - x1)^2 + (y - y1)^2 == r1^2 && (x - x2)^2 + (y - y2)^2 ==
r2^2 ,{x,y}]

this will spit out two (complicated) solutions, which is the maximum
number of intersections.  If the circles don't intersect, then the
solutions will be complex.
The command Reduce can give you more control over the domains of the
variables.  Also, the above could be turned into a function, eg

intersect[r1_, {x1_, y1_}, r2_, {x2_, y2_}, {x_Symbol, y_Symbol}] :=
Solve[(x - x1)^2 + (y - y1)^2 == r1^2 && (x - x2)^2 + (y - y2)^2 ==
r2^2, {x, y}]

a simple example is r1=r2=1, (x1,y1)=0, (x2,y2)=(1,1), yielding

In[1] := intersect[1, {0, 0}, 1, {1, 1}, {x, y}]

Out[2] = {{x -> 0, y -> 1}, {x -> 1, y -> 0}}

Simon

On Dec 21, 8:01 pm, Felix <f.be... at gmx.de> wrote:
> Hey,
> I m already hours busy with trying to find a way to indicate the coordinates of the point(s) where two circles intersect.
> Does Mathematica have a function that gives me the points of intersection :if my input are the coordinates (in 2D) and the radii.
> Thanks,
>
> Felix



  • Prev by Date: Re: Marbles.nb [was Re: CellChangeTimes?]
  • Next by Date: Export[..., ImageResolution, ... ImageSize]
  • Previous by thread: Re: intersection of two circles
  • Next by thread: Re: intersection of two circles