I never really understood how to use higher order functions as combinators,
until I read the article from Peter Henderson about Functional Geometry.
Now it is easy for me to use it in Lisp:
http://www.frank-buss.de/lisp/functional.html
http://www.frank-buss.de/lisp/fishes.pdf
--
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
In article <············@newsreader2.netcologne.de>,
Frank Buss <··@frank-buss.de> wrote:
> I never really understood how to use higher order functions as combinators,
> until I read the article from Peter Henderson about Functional Geometry.
> Now it is easy for me to use it in Lisp:
>
> http://www.frank-buss.de/lisp/functional.html
> http://www.frank-buss.de/lisp/fishes.pdf
Nice.
See also AIM-986.pdf or the corresponding article of Byte 1988, February.
ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-986.pdf
and
Hal Abelson and Gerald Jay Sussman. "Lisp: A Language for Stratified Design". BYTE. February 1988.
Frank Buss <··@frank-buss.de> writes:
> I never really understood how to use higher order functions as combinators,
> until I read the article from Peter Henderson about Functional Geometry.
> Now it is easy for me to use it in Lisp:
>
> http://www.frank-buss.de/lisp/functional.html
> http://www.frank-buss.de/lisp/fishes.pdf
>
As Rainer Joswig pointed out, Scheme designers were interested
with Henderson's examples, too.
For people who want to see Henderson's ideas in action
this video set is a good choice. I guess it is the 4th or 5th
.avi file that includes a lecture about how to produce
Escher style pictures using a functional programming
language and Henderson's ideas:
http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/
Now that we have Common Lisp version which produces
Postscript output, we're one step closer to total world
domination! ;-)
--
Emre Sevinc
eMBA Software Developer Actively engaged in:
http:www.bilgi.edu.tr http://ileriseviye.org
http://www.bilgi.edu.tr http://fazlamesai.net
Cognitive Science Student http://cazci.com
http://www.cogsci.boun.edu.tr
"Emre Sevinc" <·····@bilgi.edu.tr> wrote
> For people who want to see Henderson's ideas in action
> this video set is a good choice. I guess it is the 4th or 5th
> .avi file that includes a lecture about how to produce
> Escher style pictures using a functional programming
> language and Henderson's ideas:
>
> http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/
>
> Now that we have Common Lisp version which produces
> Postscript output, we're one step closer to total world
> domination! ;-)
Postscript is deprecated. Today, world domination requires that you produce
PDF output with cl-pdf ;-)
Marc
In article <··········@library2.airnews.net>,
"Marc Battyani" <·············@fractalconcept.com> wrote:
> "Emre Sevinc" <·····@bilgi.edu.tr> wrote
>
> > For people who want to see Henderson's ideas in action
> > this video set is a good choice. I guess it is the 4th or 5th
> > .avi file that includes a lecture about how to produce
> > Escher style pictures using a functional programming
> > language and Henderson's ideas:
> >
> > http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/
> >
> > Now that we have Common Lisp version which produces
> > Postscript output, we're one step closer to total world
> > domination! ;-)
>
> Postscript is deprecated. Today, world domination requires that you produce
> PDF output with cl-pdf ;-)
>
> Marc
Actually if you use CLIM, you can directly generate
Postscript from its graphics routines.
See:
http://www.lispworks.com/documentation/lw44/CLIM/html/climguide-341.htm#pgfId-44383
What would be neat is to generate PDF like that (perhaps with cl-pdf)
from McCLIM (http://common-lisp.net/project/mcclim/).
"Rainer Joswig" <······@lisp.de> wrote
> "Marc Battyani" <·············@fractalconcept.com> wrote:
> > Postscript is deprecated. Today, world domination requires that you
produce
> > PDF output with cl-pdf ;-)
>
> Actually if you use CLIM, you can directly generate
> Postscript from its graphics routines.
>
> See:
>
>
http://www.lispworks.com/documentation/lw44/CLIM/html/climguide-341.htm#pgfI
d-44383
>
> What would be neat is to generate PDF like that (perhaps with cl-pdf)
> from McCLIM (http://common-lisp.net/project/mcclim/).
Well it should be easy, Postscript and PDF share the same graphic model.
Marc
Up spake Emre Sevinc:
> For people who want to see Henderson's ideas in action
> this video set is a good choice.
http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/Lecture-3a.avi
...about halfway through that video.
--
-trent
I'm not sure if this is a good or a bad thing. Probably a bad thing;
most things are bad things. -- Nile Evil Bastard
Trent Buck <·········@tznvy.pbz> wrote:
> Up spake Emre Sevinc:
>> For people who want to see Henderson's ideas in action
>> this video set is a good choice.
>
> http://swiss.csail.mit.edu/classes/6.001/abelson-sussman-lectures/Lectu
> re-3a.avi
>
> ...about halfway through that video.
Interesting lecture. The base concept is slightly different: My
"picture" returns a list of lines when called, while his picture draws
itself when called, but the rest is the same. But I don't like the Scheme
notation, because for me it is more clear to see a "funcall" when a
function is being called.
Another good part: at the end of the lecture he compares the top-down
methodology with the "levels of languages" methodology and explains why
it is more robust to use embedded languages in Lisp.
Regarding the picture: Would be nice to enhance the program to produce a
more exact reproduction of the original picture, filled with color, with
curved lines and recursive to level n (see "Square Limit"):
http://www.dartmouth.edu/~matc/math5.pattern/lesson7math.html
--
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
On Mon, 24 Jan 2005 04:28:53 +0000 (UTC), <··@frank-buss.de> wrote:
>
> Regarding the picture: Would be nice to enhance the program to produce a
> more exact reproduction of the original picture, filled with color, with
> curved lines and recursive to level n (see "Square Limit"):
Well, if you examine the Escher picture, you can see at least 2
different 'fish'. Henderson claimed that there are 4, but I couldn't
find 2 more. In the second paper, Henderson describes a 'triangle
effect' (the second fish is the first fish with this triangle merged
into one wing), which alas, is also visible in your graphics (p,q,r,s
are incomplete apparently). Adding color will only enhance the
triangles. Escher covered them up rather well by two-tone shading and
partial line segments to trick your eye.
The second papers discussion of there actually being a single curved
line segment that generates the outline of the fish is the more
interesting piece (IMO). That curve is drawn about a right triangle,
with some simple operations occurring, but the key rot45 appears on
the hypotenuse. Following up this concept with a line generator which
is then mapped onto the right triangle for the tessellations, in
common lisp with .ps (or .pdf) output would be neat.
Thanks for providing some interesting reading and thinking Frank!
--
Everyman has three hearts;
one to show the world, one to show friends, and one only he knows.
"GP lisper" <········@CloudDancer.com> wrote in message ················································@teranews...
> On Mon, 24 Jan 2005 04:28:53 +0000 (UTC), <··@frank-buss.de> wrote:
>>
>> Regarding the picture: Would be nice to enhance the program to produce a
>> more exact reproduction of the original picture, filled with color, with
>> curved lines and recursive to level n (see "Square Limit"):
>
> Well, if you examine the Escher picture, you can see at least 2
> different 'fish'. Henderson claimed that there are 4, but I couldn't
> find 2 more. In the second paper, Henderson describes a 'triangle
> effect' (the second fish is the first fish with this triangle merged
> into one wing), which alas, is also visible in your graphics (p,q,r,s
> are incomplete apparently). Adding color will only enhance the
> triangles. Escher covered them up rather well by two-tone shading and
> partial line segments to trick your eye.
Well, curve support looks easy to add, just use
((x1 y1)(x2 y2)(x3 y3)(x4 y4))
to define a bezier curve, change the loop in GRID to:
(loop for line in s collect
(mapcar (lambda (point)
(p+ (p/ (p* b (first point)) m) a (p/ (p* c (second point)) n)))
line))
and alter PLOT:
(ecase (length line)
(2 (... "~D ~D moveto ~D ~D lineto~%" ...))
(4 (... "~D ~D moveto ~D ~D ~D ~D ~D ~D curveto~%" ...)))
That should do it. (untested)
--
Geoff
GP lisper <········@CloudDancer.com> wrote:
> Well, if you examine the Escher picture, you can see at least 2
> different 'fish'. Henderson claimed that there are 4, but I couldn't
> find 2 more.
http://www.dartmouth.edu/~matc/math5.pattern/squarelimitp41.gif
take a look at the fins: there are two types of big fins and two types of
small fins. The big red fishes in the center has another big fin than the
red fish above the center. And the red fish top right the center has
another small fin. The white fish top right this fish has the same small
fin, but the same big fin as the big red fish. So you have all 4
combinations.
--
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
On Sat, 5 Feb 2005 06:07:36 +0000 (UTC), <··@frank-buss.de> wrote:
> GP lisper <········@CloudDancer.com> wrote:
>
>> Well, if you examine the Escher picture, you can see at least 2
>> different 'fish'. Henderson claimed that there are 4, but I couldn't
>> find 2 more.
>
> http://www.dartmouth.edu/~matc/math5.pattern/squarelimitp41.gif
>
> take a look at the fins: there are two types of big fins and two types of
> small fins. The big red fishes in the center has another big fin than the
> red fish above the center. And the red fish top right the center has
> another small fin. The white fish top right this fish has the same small
> fin, but the same big fin as the big red fish. So you have all 4
> combinations.
Ok, I see the rounded small fins now.
Thanks again for a great puzzle and lisp Frank. I certainly enjoy
your posts to c.l.l.
-- Everyman has three hearts; one to show the world, one to show
friends, and one only he knows.
Rainer Joswig wrote:
> A picture of playing around with the code in LispWorks CLIM
> on my iMac G5:
>
> http://lispm.dyndns.org/lisp/pics/fg.jpg
"Connection refused".
--
Gareth McCaughan
.sig under construc
"Rainer Joswig" <······@lisp.de> wrote in message ·································@news-50.dca.giganews.com...
> In article <············@newsreader2.netcologne.de>,
> Frank Buss <··@frank-buss.de> wrote:
>
>> I never really understood how to use higher order functions as combinators,
>> until I read the article from Peter Henderson about Functional Geometry.
>> Now it is easy for me to use it in Lisp:
>>
>> http://www.frank-buss.de/lisp/functional.html
>> http://www.frank-buss.de/lisp/fishes.pdf
>
> A picture of playing around with the code in LispWorks CLIM
> on my iMac G5:
>
> http://lispm.dyndns.org/lisp/pics/fg.jpg
>
> Note that you can have commands to manipulate pictures
> (via command line, menus or even drag&drop) and
> that CLIM can generate postscript.
>
Well, here's my shot LW-CAPI:
http://www.summerhayes.ca/pics/screen1.png
Still playing with it, used the SICP code for a base, if anyone's
interested I'll put the code up.
--
Geoff
"Geoffrey Summerhayes" <·······@NhOoStPmAaMil.com> wrote:
> Well, here's my shot LW-CAPI:
>
> http://www.summerhayes.ca/pics/screen1.png
That's great! In color and with curves and looks like you are managed to
use only one fish form.
> Still playing with it, used the SICP code for a base, if anyone's
> interested I'll put the code up.
yes, I'm interested. Currently I'm trying CAPI, too, for game programming:
http://www.frank-buss.de/lisp/aqueduct.html
so perhaps I can learn something by reading your code.
--
Frank Bu�, ··@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
On Sat, 5 Feb 2005 05:51:50 +0000 (UTC), <··@frank-buss.de> wrote:
> "Geoffrey Summerhayes" <·······@NhOoStPmAaMil.com> wrote:
>
>> Well, here's my shot LW-CAPI:
>>
>> http://www.summerhayes.ca/pics/screen1.png
>
> That's great! In color and with curves and looks like you are managed to
> use only one fish form.
Yes, he chose the other option (compared to Escher) to handle the
'triangles' from the incomplete tiling. I ended up concluding that
the irregular forms of Escher contributed to the "beauty" of the
picture. I wondered if that might be a general rule (to consider,
should you try to make other pictures).
I too would be interested in the source.
TIA
--
Everyman has three hearts;
one to show the world, one to show friends, and one only he knows.
"Frank Buss" <··@frank-buss.de> wrote in message ·················@newsreader2.netcologne.de...
> "Geoffrey Summerhayes" <·······@NhOoStPmAaMil.com> wrote:
>
>> Well, here's my shot LW-CAPI:
>>
>> http://www.summerhayes.ca/pics/screen1.png
>
> That's great! In color and with curves and looks like you are managed to
> use only one fish form.
>
>> Still playing with it, used the SICP code for a base, if anyone's
>> interested I'll put the code up.
>
> yes, I'm interested. Currently I'm trying CAPI, too, for game programming:
>
> http://www.frank-buss.de/lisp/aqueduct.html
>
> so perhaps I can learn something by reading your code.
>
Well it won't be learning anything about CAPI there's just enough there
to make the display.
Code's up
http://www.summerhayes.ca/files/painter.lisp.txt
--
Geoff