Question: Pappus Chain (indexing question)

Am trying to teach myself "circle inversion" to solve circle geometry problems.  Towards this end I wrote a Maple 7 program to draw a Pappus chain of circles.  Pappus lived around 200AD, and I read that he considered this problem ancient!  

   The output diagram may not come out on this forum, but it comes out as a collection of tangential circles, and I have no problems with that.  In drawing the circles I was thinking of using the infinity symbol.  The following line uses the infinity, but with a minus sign.  Maple is "happy" with this and outputs square braces, suggesting an empty list?  I changed the program by omitting the -ve sign - and Maple came up with an error message.  I would have expected the output to include the value zero  ie [0]  I think it is just that the infinity symbol is not allowed in the seq command. 

[seq( i, i=0..-infinity )];  #???  why the -?,

 

In the next part I define X, Y and rad as the coordinates and radii of a sequence of circles: subscript i, ranging from start to nterm, (for the number of terms).  These are set at 1 and 286.   The program works OK with these values, but if the variable start is changed to zero, 0, it doesn't work.  I thought I might have a division by zero, but can't find one.  I also drew a circle with a radius of zero - no problem!  (...except it's difficult to see:-))   

   My main puzzle is why does it come up with the error message "invalid subscript selector" when the variable start is set to 0?

With i=start=0 I am asking it to draw a circle of radius zero at some specified coords - but it doesn't like it!  

  Any comments would be appreciated.  Merry Christmas.

David

 

 

restart:

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

# Pappus Chain of circles

# # # # # # # # # # # # # # # # # # # # # # # # # # # #

with(plots):

with(plottools):

#Maple 7

#r is ratio of AC/AB = diam of large circle, to a smaller internally tangential one

r:=1.35:

#Why will start=0 not work?

start:=1:

#nterm=286 is smallest value where axes have "true" origin of (0.0)

#nterm<= 285 puts "x-axis" below y=-0.6

nterm:=286:

X := [seq( 0.5*r*(1+r)/(((i*(1-r))^2)+r), i=start..nterm )]:

 

Y := [seq( i*r*(1-r)/(((i*(1-r))^2)+r), i=start..nterm )]:

rad:=[seq(0.5*r*(1-r)/((i*(1-r))^2+r), i=start..nterm)]:

[seq( i, i=0..-infinity )];  #???  why the -?

#Gives [] output with -ve sign:  empty list?  Why is 0 not included?

# Not allowed to use with seq

#ccc:=[seq(circle([X[i],Y[i]],rad[i]), i=1..5)]:  #nops(X))]:

ccc:=[seq(circle([X[i],Y[i]],rad[i]), i=start..nterm)]:

#c := circle([1,1], 0, color=red):

#plots[display](c, scaling=constrained);

plots[display](ccc, scaling=constrained);

 

OUTPUT

 

Please Wait...