system of equations / apollonian gasket



Hi,



I have 3 mutually tangent circles with equal radii ( r1:50 ):

 center radius 
(x1,y1) r1
(x2,y2) r1
(x3,y3) r1

see : 
http://langexplr.blogspot.com/2007/10/drawing-apollonian-gasket-with-common.html

I place 2 circles in upper row ( the same imagpart of centers) 
and one circle in lowe row. \
So :


x1:-r1;
y1:r1;
x2:-x1;
y2:y1;
r2:r1;
r3:r1;


I want to compute x3 and y3. 
So I make system of equations and try to find x3 and y3
using 2 equations and solve it with algsys and solve :


============== maxima code ============

eq12: (x1-x2)^2 + (y1 -y2)^2 - (r1-r2)^2;
eq13: (x1-x3)^2 + (y1 -y3)^2 - (r1-r3)^2;
eq23: (x2-x3)^2 + (y2 -y3)^2 - (r2-r3)^2;

eq12: expand(eq12);
eq23: expand(eq23);
eq13: expand(eq13);


r1:50;
x1:-r1;
y1:r1;
x2:-x1;
y2:y1;
r2:r1;
r3:r1;

a:algsys([eq23,eq13],[x3,y3]);
b:solve([eq23,eq13],[x3,y3]);

============== end ====================

Result is :

(%o16) [[x3=0,y3=50-50*%i],[x3=0,y3=50*%i+50]]

 I know that it should be  
x3 = 0 
y3= -36.60254037844386

What I do wrong ?

Adam



(%i91) build_info()$
Maxima version: 5.20.1
Maxima build date: 8:52 2/16/2010
Host type: x86_64-unknown-linux-gnu
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.7