Sunday, July 3, 2016

The Code 7 Project - Problem 3 - Turtle Drawing

(Code. Canvas. Command-line.)

The Code 7 Project - Problem 3 - Turtle Drawing

Drawing with code.  This was more of a fun exercise than it was "serious" problem-solvingBasically, for problem 3, I tested out the drawing capabilities of the Turtle extension of PythonI made it draw a certain species of fractal pattern (something like the patterns in tree branching or lung branching).  The Python code gives simple interactivity with Terminal to let you choose the number of fractal "levels" in the output drawing.  My solution just took a couple of functions to modularize things, as well as a little recursion (see example code for "tail recursion" under Problem 2).

Links to more info:

[EDIT, July 4th, 2016:  You can copy and paste this code into the interface at https://trinket.io/python
so you can test drawing with the Turtle extension without having to install Python (the tutorialspoint website isn't able to create drawings with Turtle).]

[EDIT EDIT, July 5th, 2016:  Oooor you can run the code right here:]

 

_________________________

LINKS TO OTHER STUFF: 

Favourites
Programming
Original Art
Games

Chinese Learning Projects:
 - Book
 - HSK 1
 - HSK 5
 - Homonyms Mnemonics