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

LOGO-L> The follower



Do you remember the "dog curve":

The "dog", starting from some point on the x-axis, was
supposed to follow the "hare" that, starting on point
(0,0), was supposed to run along the y-axis. The path of
the dog while running to catch the hare describes a curve
very much like f(x)=1/x except that it touches the x-axis
and it might (depending on the relative speeds of our 
characters, and the place on the x-axis where the dog 
starts) touch the y-axis too.

Well that has to do with differential equations and the
math that goes with it is a little advanced for kids but I've
been a little fascinated with the idea of the "follower". (Maybe
because I'm a little fascinated with System Dynamics).

Ok, what if the hare doesn't run on a straight line, what about
a circle? And what if the dog doesn't follow the hare's current
position but some former position (say 20 seconds into the past)?

This dog runs three times faster than the hare. The dog is red
(he's Scottish) the hare is blue (from Iceland).



to ini

maketurtle 0 [100 100 180 pd]
maketurtle 1 [-200 300 130 pd]
localmake "s []
repeat 20 [queue "s ask 1 [towards ask 0 [pos]]]
repeat 10000 [
	ask 0 [
		setpencolor 1
		;lt ((random 400)/10)-20 fd 1 ;other path
		rt 1 fd 1
	]
	ask 1 [ 
		setpencolor 4
		queue "s towards ask 0 [pos]
		seth dequeue "s fd 3
	]
]


end


The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

   ---- File information -----------
     File:  follower.gif
     Date:  16 Jul 1998, 19:15
     Size:  5763 bytes.
     Type:  GIF-image

follower.gif



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