Chris schrieb: > 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)).
Yeah, I agree! ;-) > > 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. Yes, we should try to find out, what's going on .. I've attached my result. What's yours. Where does it differ from mine? > > /chris > > > > > -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
<<attachment: demo2.jpg>>
