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

Re: LOGO-L> davi's star



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

Yehuka wrote:
> 
> When I saw Erich's code, I put, first of all, a WAIT 60 after each of
> his 3 FD's, to make sure that no segment is traced more than once...
> 
> Your demo does it programmatically. One has to remember though, after
> running procedure demo, to restore to the original FD.
> 
> Regards...
> 
> [[Yehuda]]

-- 
===============================================================
George Mills
email: mills@softronix.com
http://www.softronix.com
The www page contains some very powerful educational software.
Our single most important investment is our kids.
---------------------------------------------------------------
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