[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> davi's star



George Mills wrote:

> You might try adding this to your UCB/MSWLogo library.
> It's a general purpose "Slow Line drawer".
>
> You can set it to any speed including 0 which restores normal drawing
> speed.
>
> slowdraw 60
> cs repeat 4 [fd 100 rt 90]
> slowdraw 0
> cs repeat 4 [fd 100 rt 90]
>
> to slowdraw :speed
> ; Usage: slow 60 (Wait 1 second for each move)
> ;        slow 0  (Normal drawing)
> make "redefp "true
> ; Restore things if already slow
> if primitivep "origforward~
>   [
>   copydef "forward "origforward
>   copydef "fd      "origforward
>   erase "origforward
>   ]
> if primitivep "origback~
>   [
>   copydef "back    "origback
>   copydef "bk      "origback
>   erase "origback
>   ]
>
> ; if a delay was specified define new slow draw routines
> if not :speed = 0~
>   [
>   copydef "origforward "forward
>   copydef "origback    "back
>   erase "fd
>   define "fd (list [d] [origforward :d] (list "wait :speed))
>   erase "bk
>   define "bk (list [d] [origback    :d] (list "wait :speed))
>   copydef "forward "fd
>   copydef "back    "bk
>   ]
> make "redefp "false
> end
> bury "slowdraw

Sounds a good idea. I'll use in my next recursive graphics course. The
problem there is usually that the computer is too speedy, and the
inexperienced-yet student can't really follow the stages in the image
building.

SLOWDRAW, together with SHOWTURTLE might serve me beautifully.

Thanks,

[[Yehuda]]



---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home