[MWForum]Re: moving turtles at the same time

Ray Catzel mwforum@lists.mathcats.com
Sat, 1 Nov 2003 08:44:27 -0500


I agree with John's approach. I like the focus on turtles as individual and
separates objects. It has many features of the Object oriented languages.
Also MicroWorlds EX takes this a step further by focusing on the turtle's
"backpack". Without realizing it the young students are working with
"properties" of "objects" and the students seem to be comfortable working
with these properties. Properties like the coordinate positions, heading,
responses to colour are used by the students without having to talk about
variables, coordinate geometry and conditional commands.
Bottom line: the approach of associating the code with an individual turtle
is my preference too.
ray catzel

-----Original Message-----
From: mwforum-admin@lists.mathcats.com
[mailto:mwforum-admin@lists.mathcats.com]On Behalf Of John St.Clair
Sent: Friday, October 31, 2003 11:57 PM
To: mwforum@lists.mathcats.com
Subject: Re: [MWForum]Re: moving turtles at the same time


I never use the FOREVER command but instead prefer to write a procedure
for each turtle I want moving, put the name of the procedure into the
turtle instruction line, and then use the CLICKON command to activate
each turtle.  For instance,  if I want 3 birds to fly across the screen
at different speeds and disappear at the edge of the screen I would
write a separate procedure for each bird.

TO FLY1
TALKTO "T1
REPEAT 100[SETSH 9 FD 3 WAIT .5 SETSH 10 FD 3 WAIT .5]
HT
END

TO FLY2
TALKTO "T2
REPEAT 150[SETSH 9 FD 2 WAIT .5 SETSH 10 FD 2 WAIT .5]
HT
END

TO FLY3
TALKTO "T3
REPEAT 300[SETSH 9 FD 3 WAIT 1 SETSH 10 FD 1 WAIT 1]
HT
END

I would have a START or STARTUP procedure (depending on whether I want
it to start automatically or manually),  that would set the position,
heading, shape of each turtle (bird) and then start each with the
CLICKON command.

TALKTO "T1 CLICKON
TALKTO "T2 CLICKON
TALKTO "T3 CLICKON

That would make all three birds fly at the same time.  It seems to me
that I have more control of the action when using the CLICKON command.
Are there advantages  of using FOREVER or disadvantages of using
CLICKON that I don't see?

-John


On Friday, October 31, 2003, at 08:14 AM, Daniel Ajoy wrote:

> On 31 Oct 2003 at 8:21, Ask an Expert - Question wrote:
>
>> how do u get turtles moving at the same time using the
>> procedures page
>
> This procedure is an example:
>
> to movemany
> forever [t1, repeat 360 [fd 1 rt 1]]
> forever [t2, fd 1]
> forever [t3, repeat 360 [fd 1 lt 1]]
> end
>
> It is demonstrated in the project attached.
>
>
> Daniel
> OpenWorld Learning
>
>
> <MoveMany.mw2>
John St. Clair				Global SchoolNet Foundation
john.stclair@verizon.net		www.gsn.org
Vina Danks Middle School	LogoForum moderator
Teacher of Logo and Lego	groups.yahoo.com/group/logoforum

_______________________________________________
MWForum mailing list
MWForum@lists.mathcats.com
http://lists.mathcats.com/mailman/listinfo/mwforum
Attachments archived at:
http://www.mathcats.com/mwforum/attachments.html
To unsubscribe or for administrative questions contact
mailto:mwforum-admin@lists.mathcats.com