// You can find the Turtle API reference here: https://turtletoy.net/syntax
// Released under the MIT licence 
// https://mit-license.org/
// you can use this for commercial gain if you like eg you can sell artworks with this image.

Canvas.setpenopacity(1);

var scale = 0.25;
// const angle = 51; //min=0 max=360 step=1
// const angle2 = 51; //min=0 max=360 step=1

// Global code will be evaluated once.
const turtle = new Turtle();
turtle.penup();
turtle.goto(0,0);
turtle.pendown();

// The walk function will be called until it returns false.

    
    // M2 Starting Point
    turtle.penup();
    turtle.goto(125 * scale,156 * scale); // m2
    turtle.pendown();
    
    // Start of arc 4
    turtle.setheading(142);
    turtle.circle(200 * scale, extent = -180 - 98); // arc 4  end point

    // arc4 becomes arc 2
    turtle.right(180);
    turtle.circle(50 * scale, extent = 180);
    

    // arc 2
    turtle.circle(300 * scale, extent = 277); // end arc 2
    
    // arc2 becomes 6 via radius 100
    turtle.circle(100 * scale, extent = 180);
    
    // arc 6
    turtle.left(180);
    turtle.circle(100 * scale, extent = -276);
    
    // arc 6 becomes arc 1 part 1
    turtle.left(180);
    turtle.circle(150 * scale, extent = 42);
    

    // arc 6 becomes arc 1 part 2
    turtle.left(180);
    turtle.circle(150 * scale, extent = -125);
    
    // arc 1
    turtle.circle(350 * scale, extent = -277);
    
    // arc 1 becomes arc 5 via radius of 100
    turtle.circle(100 * scale, extent = -180);   
    
    // arc 5
    turtle.left(180);
    turtle.circle(150 * scale, extent = 276);
    
    // arc 5 becomes arc 3 via radius of 50
    turtle.left(180);
    turtle.circle(50 * scale, extent = -180);   
    
    // arc 3
    // turtle.right(180);
    turtle.circle(250 * scale, extent = -277);