Does turtle graphics have the wrong associations?

Alf P. Steinbach alfps at start.no
Fri Nov 13 02:51:30 EST 2009


* Raymond Hettinger:
> On Nov 11, 10:21 pm, "Alf P. Steinbach" <al... at start.no> wrote:
>> One reaction to <url: <url:http://preview.tinyurl.com/ProgrammingBookP3> has
>> been that turtle graphics may be off-putting to some readers because it is
>> associated with children's learning.
>>
>> What do you think?
> 
> How about calling it Raptor Graphics that will please everyone ;-)

He he. :-)



import turtle as raptor
raptor.shape( "triangle" )

def draw_poison_bush( level, angle, stem_length ):
     start_pos = raptor.pos()
     raptor.left( angle )
     raptor.forward( stem_length )
     if level > 0:
         draw_poison_bush( level-1, 30, 0.7*stem_length )
         draw_poison_bush( level-1, 0, 0.85*stem_length )
         draw_poison_bush( level-1, -37, 0.65*stem_length )
     raptor.right( angle )
     raptor.goto( start_pos )

raptor.title( "A DANGEROUS poison bush!" )

raptor.left( 90 )
raptor.back( 180 )
draw_poison_bush( 6, 0, 80 )

raptor.mainloop()



Cheers,

- Alf



More information about the Python-list mailing list