Questions tagged [turtle-graphics]

A method for drawing computer graphics using a cursor, known as a turtle. Turtle-graphics supports game development, visualizations, animation, etc.

A method for drawing graphics, which uses a cursor (known as a turtle) for specifying the position, the direction and the attributes (color, line width, etc.) of the lines being drawn. It was popularized by the Logo programming language. Similar functionality can currently be found in Python's turtle module, which is part of its standard library.

The turtle runs commands sent to it sequentially, including moving forwards or backwards, turning/rotating, and raising or lowering "the pen" determining if the turtle is currently drawing a line while moving. This output pathway of the turtle can additionally be post-processed into 3-dimensional models. Depending upon the implementation, the turtle may traverse 2D, 3D, or N-dimensional coordinate spaces.

3188 questions
209
votes
6 answers

How do I move the turtle in LOGO?

How do I move the turtle in LOGO?
Joel Spolsky
  • 33,372
  • 17
  • 89
  • 105
47
votes
5 answers

Turtle graphics - How do I control when the window closes?

I have a small python script which draws some turtle graphics. When my script has finished running, the turtle screen automatically closes, so to be able to see the graphics for a while I have to use time.sleep(5) at the end of the script to delay…
Tomas Aschan
  • 58,548
  • 56
  • 243
  • 402
42
votes
2 answers

Turtle module - Saving an image

I would like to figure out how to save a bitmap or vector graphics image after creating a drawing with python's turtle module. After a bit of googling I can't find an easy answer. I did find a module called canvas2svg, but I'm very new to python…
jjclarkson
  • 5,890
  • 6
  • 40
  • 62
28
votes
3 answers

How to speed up python's 'turtle' function and stop it freezing at the end

I have written a turtle program in python, but there are two problems. It goes way too slow for larger numbers, I was wonder how I can speed up turtle. It freezes after it finishes and when clicked on, says 'not responding' This is my code so…
clickonMe
  • 521
  • 2
  • 6
  • 12
27
votes
3 answers

Attribute Error: 'list' object has no attribute 'split'

I am trying read a file and split a cell in each line by a comma and then display only the first and the second cells which contain information regarding the latitude and the longitude. This is the…
loveTrumpsHate
  • 601
  • 3
  • 11
  • 15
21
votes
2 answers

Python turtle module causes OS X to crash

I'm working through Think Python chapter 4, where they tell you to type the following to see if you have the turtle module: import turtle bob = turtle.Turtle() This is supposed to open a new window, but instead, it crashes my computer. I've seen it…
valerieo
  • 211
  • 2
  • 4
21
votes
5 answers

What does bad color sequence mean in Python turtle?

I am using python turtle for a project where I need turtle to draw characters. However, when I try to use the RGB value for a color, I keep getting an error message. The input is: turtle.color((151,2,1)) followed by a series of movements. However,…
derpyherp
  • 455
  • 4
  • 9
  • 18
20
votes
3 answers

How to close the Python turtle window after it does its code?

I'm working on a simple program in Python 3.5 that contains turtle graphics and I have a problem: after the turtle work is finished the user has to close the window manually. Is there any way to program the window to close after the turtle work is…
st4tic
  • 369
  • 2
  • 3
  • 8
19
votes
12 answers

Turtle Graphics Not Responding

I am creating diagrams with the turtle package in Python, and it is successful to some extent, except for one problem. Once turtle generates the diagram that I have in code, it causes the program to say "Not responding" and eventually I have to end…
ElectroNerd
  • 375
  • 1
  • 6
  • 18
17
votes
2 answers

How to hide a turtle icon/pointer in Python

When using Python Turtle, how do you hide turtle icon(s)/pointer(s) in turtle graphics in Turtle code so that it won't show when testing?
Bryant
  • 199
  • 1
  • 1
  • 5
16
votes
7 answers

Python Turtle Graphics Window only Opens Briefly then Closes

I have recently begun using the turtle module in Python, and I admit, I am a complete novice. I have been having trouble getting the graphics window in which the turtle does its drawing to stay open. Even when I try to run something as simple as…
Randoms
  • 2,110
  • 2
  • 20
  • 31
16
votes
3 answers

Python Turtle, draw text with on screen with larger font

I'm using python turtle's write method to write text on the screen like this: turtle.write("messi fan") The size of the font is too small. How can I increase the size of font?
open source guy
  • 2,727
  • 8
  • 38
  • 61
12
votes
9 answers

Python turtle set start position

How do I set the startpos (topleft of my turtle square) when starting my code? And I don't mean that it starts from the middle and then goes to that position. I want the turtle to start there.
Wouter Vandenputte
  • 1,948
  • 4
  • 26
  • 50
11
votes
4 answers

How to fully delete a turtle

I made a small tkinter game that uses turtle for graphics. It's a simulation of the Triangle Peg Game from Cracker Barrel that is able to tell the player the next best move to make at any point in the game, among other features. Pegs are just…
11
votes
18 answers

Did you feel learning to program with turtle graphics was useful?

I'm preparing to teach someone to program. When I learned the course material, I used turtle graphics for the first few exercises. In reading introductory textbooks, I have not found one that uses the technique. Did others find this approach…
minty
  • 22,235
  • 40
  • 89
  • 106
1
2 3
99 100