okay!! what could be more interesting than geometry in its glory. I will be using turtle with tkinter, you are free to experiment with different values, shapes change drastically for better with a little tinkering ,
- from turtle import *
- from random import randint
- bgcolor('black')
- x = 1
- tracer(0, 0)
- while x < 500:
- a = randint(0,255)
- b = randint(0,255)
- c = randint(0,255)
- colormode(255)
- pencolor(a,b,c)
- fd(45 + x)
- rt(92)
- x = x+1
- exitonclick()
Changing value of argument of rt to 100
another variation
fd (40+ x) and rt(60)
setting rt(170)
- from turtle import *
- tracer(0,0)
- colors = ['red', 'purple', 'blue', 'green', 'orange']
- for x in range(300):
- pencolor (colors[x % 5])
- width(x/15 + 1)
- forward(x+6)
- left(59)
- update()
width(x/100 +1) and left(92)
left(150)
Note: Second sample code would take a little time to carve the figures, to speed up the process use tracer (0, 0) as in first sample , and update()..
2.1K views ·
View upvotes
· View 4 shares
· 1 of 8 answers
Something went wrong. Wait a moment and try again.