I would agree. It was for that reason that the version I included in my
own modified turtle was called face(). I think a face() function that
accepts either

1) a coordinate
2) an angle
3) another turtle (i.e. a coordinate)

would be useful. The nice things about "towards()", however, is that it
reads well in use: setheading(towards(x)).

On the other hand, renaming it as "angleto()" and also creating a
similar "distanceto()" function that allows the turtle to learn about
its surroundings might be better. In this case the names don't suggest
an action, they suggest information. If you look at Gregor's 2nd demo
(the one showing new features) the following lines...

       while ( abs(position()[0]-turtle.position()[0])>4 or
               abs(position()[1]-turtle.position()[1])>4):

become

       while turtle.distanceto(position())> 4:

BTW, this demo doesn't seem to work, Gregor. The turtle just keeps
going around a big blue circle on my machine. I'm not sure what is
going on.

/chris


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"edupython" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/edupython
-~----------~----~----~----~------~----~------~--~---

Reply via email to