private void buttonSun_Click(object sender, EventArgs e)
 {
     for (int i = 1; i <= 36; i++)
     {
         Turtle.Forward(210);
         Turtle.Rotate(170);
     }
 }
 private void buttonHexagon_Click(object sender, EventArgs e)
 {
     for (int i = 1; i <= 6; i++)
     {
         Turtle.Rotate(60);
         Turtle.Forward(100);
     }
 }
 private void buttonStar_Click(object sender, EventArgs e)
 {
     Turtle.PenColor = Color.Green;
     for (int i = 1; i <= 5; i++)
     {
         Turtle.Forward(200);
         Turtle.Rotate(144);
     }
 }
Example #4
0
        private void buttonSun_Click(object sender, EventArgs e)
        {
            Turtle.Delay = 100;

            for (int i = 0; i < 36; i++)
            {
                Turtle.Forward(250);
                Turtle.Rotate(170);
            }
        }
Example #5
0
        private void buttonSpiral_Click(object sender, EventArgs e)
        {
            Turtle.Delay = 200;

            for (int i = 0; i < 20; i++)
            {
                Turtle.Forward(15 + (i * 8));
                Turtle.Rotate(60);
            }
        }
        private void buttonSipral_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < 20; i++)
            {
                Turtle.Forward(100);
                Turtle.Rotate(60);

                Turtle.Forward(i++);
            }
        }
Example #7
0
        private void buttonHexagon_Click(object sender, EventArgs e)
        {
            Turtle.Delay = 200;

            for (int i = 0; i < 6; i++)
            {
                Turtle.Rotate(60);
                Turtle.Forward(200);
            }
        }
Example #8
0
 private void drawStar_Click(object sender, EventArgs e)
 {
     Turtle.Delay    = 200;
     Turtle.PenColor = Color.Green;
     for (int i = 0; i < 5; i++)
     {
         Turtle.Forward(200);
         Turtle.Rotate(144);
     }
 }
Example #9
0
        private void buttonSun_Click(object sender, EventArgs e)
        {
            Turtle.Delay    = 50;
            Turtle.PenColor = Color.Yellow;

            for (int i = 0; i < 36; i++)
            {
                Turtle.Forward(250);
                Turtle.Rotate(170);
            }
        }
Example #10
0
        private void buttonSpiral_Click(object sender, EventArgs e)
        {
            Turtle.Delay    = 100;
            Turtle.PenColor = Color.DarkGreen;

            for (int i = 0; i < 20; i++)
            {
                Turtle.Forward(i * 10);
                Turtle.Rotate(60);
            }
        }
        private void buttonSpiral_Click(object sender, EventArgs e)
        {
            int x = 10;

            for (int i = 1; i <= 20; i++)
            {
                Turtle.Forward(x);
                x += 10;
                Turtle.Rotate(60);
            }
        }
Example #12
0
        private void buttonDrawSpiral_Click(object sender, EventArgs e)
        {
            Turtle.Delay    = 200;
            Turtle.PenColor = Color.Green;
            int step = 10;

            for (int i = 0; i < 20; i++)
            {
                Turtle.Forward(step);
                Turtle.Rotate(60);
                step += 10;
            }
        }
Example #13
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);
     }
 }
Example #14
0
        private void buttonTriangle_Click(object sender, EventArgs e)
        {
            Turtle.Delay    = 100;
            Turtle.PenColor = Color.Red;

            for (int i = 0; i < 3; i++)
            {
                for (int index = 0; index < 22; index++)
                {
                    Turtle.Forward(index * 10);
                    Turtle.Rotate(120);
                }
            }
        }
 private void buttonTriangle_Click(object sender, EventArgs e)
 {
     Turtle.PenColor = Color.Red;
     for (int i = 0; i <= 3; i++)
     {
         int x = 10;
         for (int j = 1; j <= 25; j++)
         {
             Turtle.Forward(x);
             x += 10;
             Turtle.Rotate(120);
         }
     }
 }
Example #16
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);
 }
        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);
        }