[Tutor] Ongoing trouble with Turtle's end_fill() - caused by abug in turtle.py

Alan Gauld alan.gauld at btinternet.com
Thu Aug 7 20:26:31 CEST 2008


"Dick Moores" <rdmoores at gmail.com> wrote

> 1. The turtle has some behavior I don't see how to eliminate. If you
> refer to lines 223, 225, 227, 229, etc., you'll see that the turtle
> always faces in the direction it is moving when drawing a rectangle.

That is correct behaviour for a turtle!
Remember turtle graphics are notionally about moving a physical
drawing device (the turtle) around on the floor or desk. If the turtle
doesn't turn to face the direction of travel it can't travel that way!

IMHO that's just a feature of the technology and any other behaviour
would be out of keeping with the intent.

> Using the Python2.6 beta2 version of turtle.py, the turtle can be 
> seen
> at each corner spinning to orient itself to the new direction. I 
> don't
> want this.

While far from common in turtle implementations (I have only seen
it in my old CP/M Logo version) it is a feature that would be true
of a physical turtle too. Its not really a bug but a "feature" I 
guess!

> 2. The turtle can also be seen moving from the last corner of the 
> last
> rectangle to the first corner of the next. I don't want this.

Again true of a physical turtle... But if you set speed to fastest
does that work? Also in the old turtle moduile there was a way to
hide the turtles movements completely and just draw the finished
graphic - which was orders of magnitude faster for complex
shapes - is that still available in turtle26?

One way to hide the turtle would be top change colour to the
background color. That would make themoving turtle invisible...

> 3. When the screen is cleared between cycles by line 367, the blank
> screen shows for a second or so. I don't want this.
> In my program using the old turtle I've had to create
> colored-backgrounds by drawing a rectangle almost as large as the
> screen (see my draw_background() beginning at line 365). With the 
> new
> turtle, the background color can be set by, for example,
> screen.bgcolor("orange"). But even so, in the V16 I was trying to
> write, that blank screen still shows for a second or so. With the 
> old
> turtle, the transition from one "background" to another seems
> instantaneous. No white blank screen visible at all.

Sounds like a valid complaint that one...

> 4. I've attempted to make the turtle invisible, but haven't 
> succeeded.

Should be possible to set color to bgcolor. but set it back to
draw the lines or they too will be invisible!

> I'm guessing that all the problems I've mentioned aren't the result 
> of
> bugs--rather, I just don't understand the doc.

Matybe more not understanding(remembering) the origin of turtle 
graphics.
It was for kids to understand computer graphics... Seeing the shapes
being drawn is a big part of that.

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 




More information about the Tutor mailing list