Exemplo n.º 1
0
 private void buttonDrawSun_Click(object sender, EventArgs e)
 {
     Turtle.Delay    = 100;
     Turtle.PenColor = Color.Red;
     Turtle.X        = 100;
     Turtle.Y        = -100;
     for (int i = 0; i < 18; i++)
     {
         Turtle.Forward(250);
         Turtle.Rotate(10);
         Turtle.Backward(250);
         Turtle.Rotate(10);
     }
 }
Exemplo n.º 2
0
 private void buttonDraw_Click(object sender, EventArgs e)
 {
     Turtle.Delay = 200;
     Turtle.Rotate(30);
     Turtle.Forward(200);
     Turtle.Rotate(120);
     Turtle.Forward(200);
     Turtle.Rotate(120);
     Turtle.Forward(200);
     Turtle.Rotate(-30);
     Turtle.PenUp();
     Turtle.Backward(50);
     Turtle.PenDown();
     Turtle.Backward(100);
     Turtle.PenUp();
     Turtle.Forward(150);
     Turtle.PenDown();
     Turtle.Rotate(30);
 }
Exemplo n.º 3
0
        private void buttonDraw_Click(object sender, EventArgs e)
        {
            // Assign a delay to visualize the drawing process

            Turtle.Delay = 200;

            // Draw a equilateral triangle

            Turtle.Rotate(30);

            Turtle.Forward(200);

            Turtle.Rotate(120);

            Turtle.Forward(200);

            Turtle.Rotate(120);

            Turtle.Forward(200);

            // Draw a line in the triangle

            Turtle.Rotate(-30);

            Turtle.PenUp();

            Turtle.Backward(50);

            Turtle.PenDown();

            Turtle.Backward(100);

            Turtle.PenUp();

            Turtle.Forward(150);

            Turtle.PenDown();

            Turtle.Rotate(30);
        }