Slow turtle

Discussion in 'Python' started by Brent W. Hughes, Jul 31, 2004.

  1. I'm using the turtle graphics module and am trying to teach it to my kids.
    The slowness of the turtle in drawing things is good at first because it's
    fun watching it do its thing. But now we'd like it to go faster so it
    doesn't take to long to see what it is producing. Is there a standard way to
    speed it up, or am I left with sifting through the source code to fix it
    myself?

    Brent
    Brent W. Hughes, Jul 31, 2004
    #1
    1. Advertising

  2. Brent W. Hughes

    Peter Otten Guest

    Brent W. Hughes wrote:

    > I'm using the turtle graphics module and am trying to teach it to my kids.
    > The slowness of the turtle in drawing things is good at first because it's
    > fun watching it do its thing. But now we'd like it to go faster so it
    > doesn't take to long to see what it is producing. Is there a standard way
    > to speed it up, or am I left with sifting through the source code to fix
    > it myself?


    If you are only interested in the final picture, you can use tracer(False).
    Otherwise reducing the delay or dividing nhops by a fixed number seem most
    promising. E. g.

    262c262
    < nhops = int(distance)
    ---
    > nhops = int(distance)/5

    273c273
    < self._canvas.after(10)
    ---
    > self._canvas.after(1)


    Peter
    Peter Otten, Jul 31, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    3
    Views:
    3,007
  2. HK
    Replies:
    3
    Views:
    433
  3. mike
    Replies:
    3
    Views:
    375
    Virgil Green
    Jul 11, 2005
  4. JosephByrns

    Slow, then quick then slow

    JosephByrns, Jul 10, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    2,475
    codezilla94
    Nov 13, 2007
  5. Adam Funk
    Replies:
    7
    Views:
    210
    Adam Funk
    Feb 6, 2013
Loading...

Share This Page