The message below is being cross-posted from the LogoForum. Please
reply here at comp.lang.logo and it will be cross-posted back to the
LogoForum. The original author of this message is
jotape1960@[EMAIL PROTECTED]
In LogoForum@[EMAIL PROTECTED]
"Ben Yates" <ti99_forever@[EMAIL PROTECTED]
>
wrote:
>
> --- In LogoForum@[EMAIL PROTECTED]
Pavel Boytchev <pavel@[EMAIL PROTECTED]
> wrote:
> >
> > Bertrand Carette wrote:
> > > The question is : does any Logo implement *tail recursion *?
and
> why not ?
> >
> >
> > I think UCBLogo and maybe its cousins have tail recursion.
> > The implementation of tail recursion looks pretty simple at
first
> > glance, but then the problems start to pile one over another...
> >
>
> Even the first implementation of TI Logo back in 1979 had tail
recursion.
>
> It is, of course, the simple form where the last line before the
END
> is evaluated to see if a real procedure call with stack space is
necessary
>
I don't want to be irreverent to the old Logo masters and/or the
super-brains of this forum but... it's just my opinion... we're go
away from the central point of the original question: HOW CAN WE
SHRINK/GROW SQUARES WITH MSWLOGO.
Only as a comment: the word "RECURSION" isn't in my old Oxford
English Dictionary and I don't know if IT IS on a new edition
(please, let me know about it). In the "official" spanish language
dictionary we have a word "RECURSIVIDAD" that means: iteration,
doesn't matter from where to where: just iteration. In
one "spuriuos" spanish computer terms dictionary I read "RECURSION"
as one thing called from inside of the thing itself (as the standard
Logo using) BUT... and a very personal BUT, I insist we can see far
beyond, we can see a loop iteration as a kind of recursion too.
Just, my idea.
Go back to the central question, MSWLOGO lets us to save a *.GIF
pictures (GIFSAVE). So we could draw a little square, save it (with
the GIFSAVE command), then we draw another square (smaller/bigger
than the first square), save the new square (GIFSAVE again) and so
on, many times we want. So, we'll get a *.GIF file format with a
very nice shrink/grow animation of a simple figure (as the square):
to grow
make "append "false
for [size 10 300 10][cs home square :size
(gifsave "growsquare.gif 4 :append 0)
make "append "true]
end
to shrink
make "append "false
for [size 300 10 -10][cs home square :size
(gifsave "shrinksquare.gif 4 :append 0)
make "append "true]
end
to square :size
repeat 4 [fd :size rt 90]
end
Despite the "academic" recursion definition discussion, I think the
GIF animation is a very good starting point to see the Logo graphics
capabilities.
GOD BLESS YOU ALL!!!!!!!
Juan J. Paredes G.
From Curicó, Chile, South America, with love
__._,_.___
LogoForum messages are archived at:
http://groups.yahoo.com/group/LogoForum


|