Repeat

Simple geometric font exercise for Inktober!

Log in to post a comment.

// You can find the Turtle API reference here: https://turtletoy.net/syntax
Canvas.setpenopacity(1);

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

// The walk function will be called until it returns false.
function walk(i) {
    turtle.goto(-90 + i * 15, -60 + i * 35);
    Repeat();
    return i < 4;
}

function Repeat() {
    // R 
    turtle.pendown();
    turtle.seth(-90);
    turtle.forward(30);
    turtle.right(90);
    turtle.forward(7);
    turtle.circle(8, 180);
    turtle.forward(7);
    turtle.backward(5);
    turtle.left(120);
    turtle.forward(16.3);
    turtle.penup();
    
    //e
    turtle.seth(0);
    turtle.forward(3);
    turtle.left(90);
    turtle.forward(10);
    
    turtle.pendown();
    turtle.right(90);
    turtle.forward(20);
    turtle.left(90);
    turtle.circle(-10, 315);
    turtle.penup();

    turtle.seth(90);
    turtle.forward(3);
    
    //p
    turtle.seth(0);
    turtle.forward(7);
    turtle.seth(90);
    
    turtle.pendown();
    turtle.forward(10);
    turtle.backward(30);
    turtle.forward(10);
    turtle.circle(-10);
    turtle.circle(-10, 180);
    turtle.penup();
    
    turtle.forward(-10);

    //e
    turtle.seth(0);
    turtle.forward(3);
    turtle.left(90);
    turtle.forward(10);
    
    turtle.pendown();
    turtle.right(90);
    turtle.forward(20);
    turtle.left(90);
    turtle.circle(-10, 315);
    turtle.penup();

    turtle.seth(90);
    turtle.forward(3);
    
    // a
    turtle.seth(0);
    turtle.forward(6);
    turtle.left(90);
    turtle.forward(10);
    
    turtle.pendown();
    turtle.circle(10);
    turtle.circle(10, 180);
    turtle.backward(10);
    turtle.forward(20);
    turtle.penup();
    
    //t
    turtle.seth(0);
    turtle.forward(10);
    turtle.left(180);
    
    turtle.pendown();
    turtle.circle(5, 90);
    turtle.forward(25);
    turtle.backward(5);
    turtle.right(90);
    turtle.forward(5);
    turtle.penup();

}