Re: Scheme spiral

Hilaire Fernandes <[email protected]> Mon, 3 May 2004 21:13:28 +0200
Newsgroups gmane.comp.graphics.dr-geo
Organization OFSET
Message-ID <[email protected]>
Yep,=20

Simple and beautiful.=20

It is also the beauty of the DrGeo Scheme Figure ;-)

The programming recursivity  really give a taste of the infinity :-)

Any way it is a nice figure

Hilaire

On Mon, 3 May 2004 18:21:59 +0000
Andrea Centomo <[email protected]> wrote:

  > Hello all,
  >                surely you will have fun if you evaluate this=20
  > easy FSD
  >=20
  > -----------------------------------------------------------------------=
-----------------
  >  (new-figure "Spiral")
  >=20
  > (define (square p1 p2 p3 p4 n)
  >=20
  >    (let* ((s1  (Segment "" extremities     p1 p2))
  > 	  (s2  (Segment "" extremities     p2 p3))
  > 	  (s3  (Segment "" extremities     p3 p4))
  >           (s4  (Segment "" extremities     p4 p1))
  > 	  (A   (Point   "" on-curve    s1   1/10))
  > 	  (B   (Point   "" on-curve    s2   1/10))
  > 	  (C   (Point   "" on-curve    s3   1/10))
  > 	  (D   (Point   "" on-curve    s4   1/10)))
  >     =20
  >      (send A masked)
  >      (send B masked)
  >      (send C masked)
  >      (send D masked)
  >=20
  >  (if (> n 0)
  >=20
  >      (square  A B C D (- n 1)))))
  >=20
  >=20
  >  (lets Point "M" free  5  5)
  >  (lets Point "N" free -5  5)
  >  (lets Point "O" free -5 -5)
  >  (lets Point "P" free  5 -5)
  >=20
  >  (square M N O P 30)
  > ----------------------------------------------------------
  >=20
  > Hilaire thanks a lot: I have too much fun with FSD!
  >=20
  > Amiti=E9s=20
  > Andrea
  >=20
  > -----------------------------------------------------------------------
  > Andrea Centomo
  > email: [email protected]
  >=20
  >=20


--=20
Let's support Kids, Education and Free Software
Aidons les Enfants, l'=C9ducation et les Logiciels Libres
http://rate.affero.net/hilaire


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click