title: How to create a tessellation with turtles in Python
body: <p>I'm trying to create a rhombus tessellation pattern with the turtle graphics on python that looks like this image: </p>
  
  <p><a href="http://www.supercoloring.com/sites/default/files/styles/coloring_medium/public/cif/2015/01/tessellation-with-rhombus-coloring-pages.png" rel="nofollow noreferrer">http://www.supercoloring.com/sites/default/files/styles/coloring_medium/public/cif/2015/01/tessellation-with-rhombus-coloring-pages.png</a></p>
  
  <p>I thought about creating a hexagon pattern first and then dividing the hexagons into thirds. I'm not sure how I can create the hexagon pattern recursively. So far, I'm only alternating the angles of the turtles as I run the program and I don't have a definite strategy. Any advice on how to approach this?</p>
  
  <p>So far, I created 3 hexagons in the center with 3 turtles and used for loops to draw the hexagons around the 3 hexagons. However, when I loop the program, the turtles trace back the same path as before and it takes a while for it to draw the others.</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code>import turtle
  t = turtle.Turtle()
  t1 = turtle.Turtle()
  t2 = turtle.Turtle()
  t1.left(120)
  t2.left(240)
  for i in (t, t1, t2):
      i.speed(0)
  
  def hex():
      for b in (t, t1, t2):
          for i in range(6):
               b.forward(100)
               b.right(60)
  
  
  for i in range(3):
      t.left(120)
  hex()
  def rep():   
      for i in range(3):
          for a in (t, t1, t2):
              a.forward(100)
              a.right(60)
              for i in range(6):
                  a.forward(100)
                  a.left(60)
  rep()
  
  def rep2():
      for a in (t, t1, t2):
          for i in range(3):
              a.left(120)
              a.forward(100)
              a.right(60)
              rep()
  
      a.right(120)
      a.forward(100)
      a.right(60)
      rep()
  rep2()
  </code></pre>