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
0
votes
0 answers

How can I find out why the for loop doesn't work at all?

I'm not sure why my program doesn't enter the for loop at all, the code is below: ### Retrieve and edit polygons def buttonEdit(): for line in myFile: ptList = line.strip('[]').split(',') for pt in range(1,…
Albert
  • 1
  • 1
0
votes
1 answer

Turtle screen gets closed when .onclick() or onscreenclick() is used

I have a global variable, 'is_game_on' set to 'False' to start with. I have a turtle which responds to .ondrag() function. My program works perfectly fine if I change the 'is_game_on' variable to 'True' (The main program runs in a while loop when…
Srinivas
  • 568
  • 1
  • 4
  • 21
0
votes
1 answer
0
votes
2 answers

How do I get all the turtles to respond to a click using python turtle onclick?

I am trying to make a game where you have to collect the turtle so when you click a turtle it moves into a box. The problem with this is that when you click one of the turtles a turtle moves that you didn't click. I think that it is because I…
0
votes
2 answers

How do I get the coordinates of a specific turtle in turtlesim (by python script)?

I am fairly new to this and I am trying to get the coordinates of a turtle to calculate Euclidean distances in python. I have a python code which moves around 2 turtles. one named "turtle1" and the other named "turtle2". I am solely confused on how…
0
votes
2 answers

How to make a frowning face on Python Turtle?

I need to make a frowning turtle face in python however I can't get the semi-circle arc like frown right, it's too big or not complete. import turtle t =…
R S
  • 5
  • 1
0
votes
1 answer

Powershell Turtle Functionality - Is there a way to mimic the Python Turtle in Powershell?

Powershell Turtle Functionality - Is there a way to mimic the Python Turtle in Powershell? I have searched the internet and can only find people creating functions to place dashes, underscores or pipes to make horizontal or vertical "lines".
colemd1
  • 113
  • 7
0
votes
1 answer

Convert python turtle graphics number chain to name

I have been making a simple list function to make add a bunch of images for turtles to use, however I keep getting this error when running it: _tkinter.TclError: couldn't open "_1.gif": no such file or…
0
votes
1 answer

How do you make a turtle a random image from a list using import random

So I have 3 bosses and I have images for each but I don't know how to the turtle randomly select a image to use. Should I make another list to store the images and then make it randomly pick a turtle? Should I also make the turtle change right then…
0
votes
2 answers

How can I find out which fonts are available in Turtle?

I'm working with python's turtle module and want to load different fonts. I've read that turtle uses tkinter's fonts but some of these fonts that should be available are in fact not. Does anyone know how I can add fonts or get a list of available…
1337_N00B
  • 47
  • 8
0
votes
1 answer

How to pass variable from java to turtle file?

I have a project with the structure: -config -repositories -test-repo.ttl The test-repo.ttl file looks like this: @prefix lookup: . @prefix pathfinder:…
Ian Kurtis
  • 137
  • 7
0
votes
1 answer

How do I prevent the barriers and the doors overlapping?

# Imported Modules for Randomization and Turtle import turtle as trtl import random as rand from random import * # Painter Configuration and Screen Configuration painter = trtl.Turtle() distanceForward =…
0
votes
2 answers

How can I create a Pause function inside a class and then use it inside turtle game?

I was working on a snake game using turtle graphics in python. The game worked well. Then, I wanted to improve on it and add a pause function to it. When I just wrote the lines of code for the pause function inside the game code, it worked, but my…
Daniel
  • 13
  • 4
0
votes
0 answers

Pycharm error while running Python Turtle Graphics

I have looked at similar questions but I still can't seem to solve this problem. I am trying to use Python Turtle in Pycharm and it simply won't work. I get the message "Not responding". It should also be noted that this is an issue solely with…
António Rebelo
  • 186
  • 1
  • 13
0
votes
2 answers

How to fix UnboundLocalError for unassigned variable that I assigned?

I am trying to create a Koch snowflake generator in Python using the Turtle library and recursion. I have a list of strings with hex codes in them and I am using the variable color to have the pen change colors in the order of the list. As you can…