Slow down this turtle, please 
Author Message
 Slow down this turtle, please

Hi I'm here again finding out interesting things. And asking always asking

This is a very speedy turtle, teacher, I can't really see how much it's
turning right!
Interesting point. I found out slowdraw,  it's fantastic and it's solving my
problem.
I've changed a few things and converted it into a slowturn routine that was
saved in the Library Procedures.
Slowdraw makes your fd and bk instructions to be drawn slower and slowturn
makes the same but with your rt and lt instruction (I'm talking about
MSWLogo (6.4)

to slowturn :speed
make "redefp "true
; Restore things if already slow
if primitivep "origleft~
   [
   copydef "left "origleft
   copydef "lt      "origleft
   erase "origleft
   ]
if primitivep "origright~
   [
   copydef "right    "origright
   copydef "rt      "origright
   erase "origright
   ]
; if a delay was specified define new slow turn routines
if not :speed = 0~
   [
   copydef "origleft "left
   copydef "origright  "right
   erase "rt
   define "rt (list [d] (list "repeat :speed (list "origright (word ": "d)
"/ :speed "wait 1)))
   erase "lt
   define "lt (list [d] (list "repeat :speed (list "origleft    (word ": "d)
"/ :speed "wait 1)))
   copydef "left "lt
   copydef "right    "rt
   ]
make "redefp "false
end

I'm not a programmer, so can anybody explain me how this delay is produced?.
I could understand why the programmer used primitivep ,copydef ,"redefp and
wait but I'm not good in managing lists.

Ana Anticic Lovic
Buenos Aires - Argentina

_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en http://www.*-*-*.com/

To unsubscribe from this group, send an email to:

LogoForum messages are archived at:
http://www.*-*-*.com/

Your use of Yahoo! Groups is subject to http://www.*-*-*.com/



Tue, 11 May 2004 11:22:01 GMT  
 Slow down this turtle, please

Quote:
>   define "rt (list [d] (list "repeat :speed (list "origright (word ": "d)
>"/ :speed "wait 1)))

The (word ": "d) part is unnecessarily complicated;
        ":d
will work.

Quote:
>I'm not a programmer, so can anybody explain me how this delay is produced?.

The delay is produced by the WAIT primitive, which takes an input in 1/60 sec
units.  So if :SPEED is 10 and you say RIGHT 90, what happens is
        repeat 10 [origright 9 wait 1]
so the total turning is 10*9 = 90, but it takes 10/60 sec to happen.


Sat, 15 May 2004 05:15:28 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Slow down this turtle, please

2. Slow down this turtle, please

3. My browser moves too fast - Please help to slow it down

4. Please explain: canvas and font commands slowing down

5. vw2.5 sometimes slows down when large

6. MTIMER slows PB down

7. global floating windows slow down graphics?

8. Slow down utility ???

9. Super security slows down

10. Topspeed DB - Record Filter slow down ?!?

11. Slowing down/freezing until user interrupt & proceed

12. Bizzare slowing down in forms ...

 

 
Powered by phpBB® Forum Software