Problems rendering Python Turtle on different browsers
BenFraser (0)

I'm having trouble getting Turtle to render properly on certain browsers. It draws properly up until a certain point then fails and shoots off the canvas. It does it in the same place every time but if I remove the the line of code where I apply the color method it'll go further before crashing. On my computer it works fine on Safari but not Chrome. Not sure about windows yet.

My first thought is that It's hitting a memory limit in chrome. Any thoughts or help out there?

Here is an example:

You are viewing a single comment. View All
malvoliothegood (191)

Your code works fine when I run it using Firefox on a Linux system. You might be interested in this code that draws a spiral:

import turtle
from random import randint

fred = turtle.Turtle()

turn_angle = 10
side = 400

for j in range(100):
  r = randint(0, 255)
  g = randint(0, 255)
  b = randint(0, 255)
  for i in range(4):     
  side -= 4