### Test Snowflake Arm Branches 005

Inspired by Dan Catt's work at: revdancatt.com/penplotter/036-snowflakes Dan's list of Pen Plotter Tools at: revdancatt.com/penplotter/

```// rupertxrussell snowflakes reverse engineered from Dan Catt
// https://revdancatt.com/penplotter/036-Snowflakes
// see full list of Dan's Pen Plotter Tools at: https://revdancatt.com/penplotter/
// MIT Licence

Canvas.setpenopacity(-1); // Black background

let turtle = new Turtle();
let angle = 0 //min=0 max=360 step=1
let scale = 10 //min=2 max=20 step=0.5

turtle.penup();
turtle.goto(-50,25);
turtle.pendown();

// save the current position and heading
initialX = turtle.xcor();
initialY = turtle.ycor();

// draw the full length of the arm
turtle.forward(scale * 7)

turtle.jump(initialX,initialY)

circle(scale);
jumpForward(scale * 0.8);

triangle(scale)
jumpForward(scale);

square(scale)
jumpForward(scale * 1.5);

hexagon(scale)
jumpForward(scale * 1.5);

equalatralTriangle(scale)

function triangle(length){
initialX = turtle.xcor();
initialY = turtle.ycor();

turtle.forward(length /2);
turtle.right(90 + 45);

turtle.forward(length * 0.71);
turtle.right(90);

turtle.forward(length * 0.71);
turtle.right(90 + 45);
turtle.forward(length /2);
}

jumpForward(scale);
}

function equalatralTriangle(length){
initialX = turtle.xcor();
initialY = turtle.ycor();
turtle.forward(length /2);
turtle.left(120);
turtle.forward(length * 1);
turtle.left(120);
turtle.forward(length * 1);

turtle.left(120);
turtle.forward(length /2);
turtle.jump(initialX,initialY)
}

function hexagon(length){
initialX = turtle.xcor();
initialY = turtle.ycor();

// reset the scale
length = length * 0.6;

turtle.forward(length);

turtle.right(60)
turtle.forward(length);

turtle.right(60)
turtle.forward(length);

turtle.right(60)
turtle.forward(length);

turtle.right(60)
turtle.forward(length);

turtle.right(60)
turtle.forward(length);

turtle.jump(initialX,initialY)
}

function square(length){
initialX = turtle.xcor();
initialY = turtle.ycor();

// reset the scale
length = length * 0.7;

turtle.forward(length);

turtle.right(90)
turtle.forward(length);

turtle.right(90)
turtle.forward(length);

turtle.right(90)
turtle.forward(length);

turtle.jump(initialX,initialY)