Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
python turtle advanced honeycomb sourcecode (Lasse Kosiol)
# turtle honeycomb
# Lasse Kosiol
# 1.9.2012
# python workshop opentechschool berlin
import turtle
from random import randint
size = 20
circles = 20
turtle.speed(100)
turtle.colormode(255)
def move(length, angle):
turtle.right(angle)
turtle.forward(length)
def hex():
turtle.pendown()
turtle.color( randint(0,255),randint(0,255),randint(0,255) )
turtle.begin_fill()
for i in range(6):
move(size,-60)
turtle.end_fill()
turtle.penup()
# start
turtle.penup()
for circle in range (circles):
if circle == 0:
hex()
move(size,-60)
move(size,-60)
move(size,-60)
move(0,180)
for i in range (6):
move(0,60)
for j in range (circle+1):
hex()
move(size,-60)
move(size,60)
move(-size,0)
move(-size,60)
move(size,-120)
move(0,60)
turtle.exitonclick()
@antonrasmussen

This comment has been minimized.

Copy link

@antonrasmussen antonrasmussen commented Nov 8, 2017

Very cool!

@3RAW

This comment has been minimized.

Copy link

@3RAW 3RAW commented Apr 26, 2018

Amazing!

@Jonnyshutter500

This comment has been minimized.

Copy link

@Jonnyshutter500 Jonnyshutter500 commented May 16, 2018

its rubbish it doesn't work !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented May 24, 2018

dope!

@raindrops69

This comment has been minimized.

Copy link

@raindrops69 raindrops69 commented Aug 5, 2018

nice

@raindrops69

This comment has been minimized.

Copy link

@raindrops69 raindrops69 commented Aug 5, 2018

try using IDLE 3.7.0 it works

@yannaing-lynn

This comment has been minimized.

Copy link

@yannaing-lynn yannaing-lynn commented Aug 8, 2018

This is very beautiful
And Thank You

@mithileshkunal

This comment has been minimized.

Copy link

@mithileshkunal mithileshkunal commented Feb 26, 2019

Loved it 👍

@jy-km

This comment has been minimized.

Copy link

@jy-km jy-km commented Jan 5, 2020

Not working

@Prof3ssa

This comment has been minimized.

Copy link

@Prof3ssa Prof3ssa commented Feb 9, 2020

doesn't work

@abir-shoaib

This comment has been minimized.

Copy link

@abir-shoaib abir-shoaib commented Mar 18, 2020

its rubbish it doesn't work !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

it does

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jul 5, 2020

superb !!!

@boiiiiiiiiiiiiiiiiii125

This comment has been minimized.

Copy link

@boiiiiiiiiiiiiiiiiii125 boiiiiiiiiiiiiiiiiii125 commented Jul 18, 2020

awesome

@extremeboiz

This comment has been minimized.

Copy link

@extremeboiz extremeboiz commented Sep 22, 2020

it tottaly works
so cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment