Scheme Figure

Andrea Centomo <[email protected]> 08 Feb 2004 10:08:58 +0100
Newsgroups gmane.comp.graphics.dr-geo
Organization Organization for Free Software in Education and Teaching
Message-ID <[email protected]>
--=-z7oqMpAye8MP+ans7ydV
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Dear Hilaire,
              in attachment a Scheme Figure of a very famous 
construction on irrational numbers. Each triangle in the construction 
is rectangle and its hypotenuse has increasing length
sqrt(2), sqrt(3), ... sqrt(17).

In a Plato Dialogue (Teethetus) Teetethus says that Theodoro (an
ancient mathematicians) was drawing on the sand a contruction 
which gave all the irrational numbers but misteriously he stopped 
at sqrt(17). 

If you try with Dr. Geo you can see that the trinagle
with hypotenuse sqrt(18) overlap with the
starting triangle and so the construction stops exactly at
sqrt(17) like Theodoro's one.

Amicizia
Andrea



 

--=-z7oqMpAye8MP+ans7ydV
Content-Disposition: attachment; filename=irraz.scm
Content-Type: text/x-scheme; name=irraz.scm; charset=UTF-8
Content-Transfer-Encoding: 7bit

(new-figure "Triangoli")

(define (triangle p1 p2 p3 n)
  
  (let* ((s1 (Segment "" extremities    p1 p2))
	 (s2 (Segment "" extremities    p2 p3))
	 (s3 (Segment "" extremities    p3 p1))
	 (pe (Line    "" orthogonal     p3 s3))
	 (ci (Circle  "" center-segment p3 s2))
	 (p4 (Point   "" intersection2  pe ci)))

    (send pe masked)
    (send ci masked)
    (send p4 masked)

(if (> n 0)

    (triangle p1 p3 p4 (- n 1)))))


(lets Point "O" free  0  0)
(lets Point "A" free -1  0)
(lets Point "B" free -1  1)

(triangle O A B 15)

--=-z7oqMpAye8MP+ans7ydV--



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn