MathGroup Archive 2005

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

Search the Archive

Re: Circle equation problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg61553] Re: Circle equation problem
  • From: "Valeri Astanoff" <astanoff at yahoo.fr>
  • Date: Sat, 22 Oct 2005 00:35:52 -0400 (EDT)
  • References: <dja2c3$fig$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Daniele,

This is the way I would do it, but I hope
someone will post a simpler way :

In[1]:=eq=Abs[p] == Abs[(G - X + I*Y)/(-1 + G*(X + I*Y))];

In[2]:=e1=List@@eq ;

In[3]:=e2=ComplexExpand[e1,{p,G}]

Out[3]=
{Sqrt[Im[p]^2 + Re[p]^2], Sqrt[(Y + Im[G])^2 + (-X + Re[G])^2]/
   Sqrt[(-1 - Y*Im[G] + X*Re[G])^2 + (X*Im[G] + Y*Re[G])^2]}

In[4]:=e3=e2 ^2;

In[5]:=e4=e3[[1]]-e3[[2]];

In[6]:=e5=Numerator[e4//Together]

Out[6]=
-X^2 - Y^2 - 2*Y*Im[G] - Im[G]^2 + Im[p]^2 + [...]

In[7]:=cir=(X-XCenter)^2+(Y-YCenter)^2-ray^2 ;

In[8]:=ce=CoefficientList[e5,{X,Y}]//Flatten;

In[9]:=cc=CoefficientList[cir,{X,Y}]//Flatten;

In[10]:=Solve[Thread[ce == cc],{XCenter,YCenter,ray}]//FullSimplify

Out[10]=
{{ray -> -Sqrt[-4 + Abs[p]^2 + 2*G*Conjugate[G]],
	XCenter -> (-1 + Abs[p]^2)*Re[G],
   	YCenter -> (-(-1 + Abs[p]^2))*Im[G]},

	{ray -> Sqrt[-4 + Abs[p]^2 + 2*G*Conjugate[G]],
   	XCenter -> (-1 + Abs[p]^2)*Re[G],
	YCenter -> (-(-1 + Abs[p]^2))*Im[G]}}


Of course, only the second solution is to be kept.

hth

v.a.


  • Prev by Date: Save everything
  • Next by Date: Re: Re: (a/b)^2 when a/b is replaced by e won't yield e^2
  • Previous by thread: Circle equation problem
  • Next by thread: Re: Circle equation problem