Learn log - shinysu/turtleGraphics GitHub Wiki
I started by hand drawing the squares in paper. Tried to find out if there is any recurring pattern.
Tried to draw squares using the Fibonacci number as the length. But the output was very small. So decided to use a factor to scale the size of the square
While trying to write a function that draws the smaller shapes(squares), the first one was always wrong. So used a turtle.backward() command outside the function that will be executed only for the first shape.
Drawing a quad was challenging part. Plotted the quad by varying the angle by 1 degree 90 times
circumference = pi * scale_num / 2
plot = circumference/angle
for j in range(angle):
x.forward(plot)
x.left(1)
New commands learned/used
turtle.seth(angle) - set the orientation of the turtle
angle = 0 → East
90 → North
180 → West
270 → South
turtle.setposition(x,y) → Move the turtle to an absolute position. The orientation of the turtle will not be changed
turtle.tracer() → to increase the speed of the turtle