I have not been a Turtle user since enthusiastic sesssions with my kids 
when they were doing Logo, many years ago.
Still I like the symmetry of angleTo() with distanceTo() and the hint 
from the noun names that they are returning data.  And I like face()  as 
the direct turtle action verb for conciseness or a clearer and longer 
faceTowards().  I like all the parameter types of Chris's. for angleTo() 
and face().

Andy
 
Gregor Lingl wrote:

>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
>>
>>
>>
>>
>>
>>    
>>
>
>  
>
>
> ------------------------------------------------------------------------
>


-- 
  Andrew N. Harrington
  Computer Science Department      Undergraduate Program Director
  Loyola University Chicago        http://www.cs.luc.edu/~anh
  512B Lewis Towers (office)       Office Phone: 312-915-7982
  Snail mail to Lewis Towers 416   Dept. Fax:    312-915-7998
  820 North Michigan Avenue        [EMAIL PROTECTED]
  Chicago, Illinois 60611          


--~--~---------~--~----~------------~-------~--~----~
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