title: How would you get turtle to overlap certain areas of squares?
body: <p>So I had to get familiar with turtle for a project with school. I got basically everything my professor asked besides for overlapping the squares. <a href="https://i.stack.imgur.com/YJhY7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YJhY7.png" alt="My squares"></a></p>
  
  <p>However he would like the squares to overlap like this</p>
  
  <p><a href="https://i.stack.imgur.com/0H1id.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0H1id.png" alt="Profsquares"></a></p>
  
  <p>I haven't been able to replicate this at all. I am wondering if their is something I need to throw into my code to easily solve it.</p>
  
  <p>Here is my code</p>
  
  <pre><code>import turtle #Imports the 'turtle module' which allows intricate shapes and pictures to be drawn
  my_turtle_pos = (10 , 10)
  def square(my_turtle,x,y,length) : #I set up a function that helps me determine the square
  
      my_turtle.penup() #Picks 'up' the turtle pen
      my_turtle.setposition(x-length/2,y-length/2) #Helps set positon
      my_turtle.pendown() #Puts 'down' the turtle pen
      my_turtle.color('black','red') #Allows black outline, with red filling
      my_turtle.begin_fill() #Starts the filling of red and helps remember the starting point for a filled area
      my_turtle.forward(length) #Moves the turtle by the specified amount 'length'
      my_turtle.left(90) #Moves the turtle by given amount '90'
      my_turtle.forward(length)
      my_turtle.left(90)
      my_turtle.forward(length)
      my_turtle.left(90)
      my_turtle.forward(length)
      my_turtle.left(90)
      my_turtle.end_fill() #Stops filling with red, which will close with the current color
  
  def graphic_pattern(my_turtle,x,y,length,times): #recursive function
      if times &lt;= 0:  #This just tells us how many 'times' it needs to repeat till given amount
          return
      newSize = length/2.2 #This will grab the new size
      graphic_pattern(my_turtle,x-length/2,y-length/2,newSize,times-1) #Functions to help with writing 'smaller' squares
      graphic_pattern(my_turtle,x-length/2,y+length/2,newSize,times-1)
      graphic_pattern(my_turtle,x+length/2,y-length/2,newSize,times-1)
      graphic_pattern(my_turtle,x+length/2,y+length/2,newSize,times-1)
      square(my_turtle,x,y,length)
  
  
  my_turtle = turtle.Turtle(shape="arrow") #You can use differen't shapes for the turtle, I chose arrow, though the turtle was cool :)
  my_turtle.speed(100) #I am not sure how fast the turtle can go, I just chose 100 cause it went by quicker.
  
  graphic_pattern(my_turtle,3,0,300,4) #Example pattern stated from homework assignment.
  </code></pre>
  
  <p>I think it's something to do with where the pen draws the squares first. Thanks for any input!</p>