Projects using CPython and Turtle graphics
This script draws recursively generated trees.
A lot of the tree's parameters have random variation.
The code uses Turtle graphics for drawing and the timer function.
This script shows a series of patterns of Truchet Tiles.
The tiles are drawn using the Turtle libary. All patters are made from 4 different tiles.
The patterns are defined as rows and columns of tile numbers, for this nested tuples are used:
pattern_X = (
(2,4,3,4,4,2),
(2,1,2,2,4,4),
(3,4,4,2,2,4),
(2,2,4,4,2,1),
(4,2,2,4,3,4),
(4,4,2,1,2,2)
)
Randomly generated Truchet Tiles using complementery tiles for pleasing result.
code of version which loops automatically through random patterns, mouse click stops script:
code of version which saves pattern to text file when key is pressed, loops to next random patterns with mouse click:
An animated spiral effect using Turtle graphics
This script defines a fucntion to draw an ellipse using Turtle graphics.
Turtle graphics does have a circle function but no ellipse.
The ellipse function is then used to draw a python logo suing Turtle graphics.
This script draws a Sierpinsky triangle recursively using turtle.
This one makes use extra functionality in CPython's turtle on the PC, such as drawing filled shapes.
The code shows several triangles using successively deeper recursion.