Explanation
Using Python Interpreter and TurtleWorld we are to recreate this image:
(Click to enlarge)
A very fast analysis was done:
(Click to enlarge)
And the findings were:
(Click to enlarge)
It is then assumed that the basic object is made up of forward, right, forward, left, forward, left, forward, right, forward, left, forward, left, forward (2), right executed four times. Let's call the previous move set as move_alpha(n) where n is the number of times to re-execute. In this case, theoretically, move_alpha(4) forms the basic object.
(Click to enlarge)
In the complex object, starting from the blue marker in the upper side, we can see 3 red dots which points to key location of a move_alpha(2). After that is an unknown move, which we'll call move_beta(1). Then another move_alpha(2). Followed by another unknown move which we'll call move_delta(1). But after move_delta(1), there seems to be another move set that looks like move_alpha(2). But there is one problem. Starting from the last location we've been. We can find out that this is an inverted move_alpha(1). Therefore we have to make another move set which we'll call move_gamma(1). Combing the move sets from the upper blue marker to the lower blue marker, we'll call it move_epsilon(1). And as you can see, move_epsilon(4) will actually create the entire complex object.
(Click to enlarge)
Code:
world.clear() ## initialize world
turtle = Turtle(world) ## initialize turtle
pd(turtle) ## activate turtle pen
step = 8 ## step distance
def move_alpha(turns):
for n in range(turns):
turtle.fd(step)
turtle.rt(90)
turtle.fd(step)
turtle.lt(90)
turtle.fd(step)
turtle.lt(90)
turtle.fd(step)
turtle.rt(90)
turtle.fd(step)
turtle.lt(90)
turtle.fd(step)
turtle.lt(90)
turtle.fd(2*step)
turtle.rt(90)
def move_beta(turns):
for n in range(turns):
turtle.fd(step)
turtle.rt(90)
turtle.fd(step)
turtle.lt(90)
turtle.fd(step)
turtle.rt(90)
turtle.fd(step)
turtle.rt(90)
turtle.fd(step)
turtle.lt(90)
turtle.fd(step)
turtle.lt(90)
turtle.fd(2*step)
turtle.rt(90)
def move_gamma(turns):
for n in range(turns):
turtle.fd(step)
turtle.rt(90)
turtle.fd(step)
turtle.lt(90)
turtle.fd(2*step)
turtle.rt(90)
turtle.fd(step)
turtle.lt(90)
turtle.fd(step)
def move_delta(turns):
for n in range(turns):
pu(turtle)
turtle.rt(90)
turtle.fd(2*step)
pd(turtle)
turtle.lt(90)
move_alpha(2)
turtle.lt(90)
pu(turtle)
turtle.fd(2*step)
pd(turtle)
turtle.fd(2*step)
def move_epsilon(turns):
for n in range(turns):
move_alpha(2)
move_beta(1)
move_alpha(2)
move_gamma(1)
move_delta(1)
turtle.rt(90)
## Body of the code
move_epsilon(4) ## draw complex object
pu(turtle) ## deactivate pen
turtle.fd(15 * step) ## move to next location
step = 20 ## increase stepping
pd(turtle) ## activate pen
move_alpha(4) ## draw basic object
Explaining the code: In the first part of the code are the initialization variables, then the move sets are defined, from move_alpha to move_epsilon. After that the body of the code.
Output Image:
(Click to enlarge)
(Click to enlarge)
Source Code
abeth's turtle.py
Update
There exist a better algorithm to solve this problem. For more information, email me.