示例#1
0
        public static void Start()
        {
            Tortoise.Show();
            Tortoise.SetSpeed(10);
            ColorWheel.AddColor(Colors.BlueViolet);
            ColorWheel.AddColor(Colors.Violet);
            ColorWheel.AddColor(Colors.Purple);

            for (int i = 0; i < 75; i++)
            {
                try
                {
                    //var aaa = 100 / i;

                    var nextColor = ColorWheel.GetNextColor();
                    Tortoise.SetPenColor(nextColor);

                    Tortoise.Move((i + 1) * 5);
                    Tortoise.Turn(360.0 / 3);
                }
                catch (Exception re)
                {
                    MessageBox.ShowMessage("Hold up: " + re);
                }
            }
        }
示例#2
0
        public static void Start()
        {
            Tortoise.Show();
            Tortoise.Hide();
            Tortoise.SetX(225);
            Tortoise.SetY(150);

            Tortoise.SetSpeed(10);
            ColorWheel.AddColor(Colors.Crimson);
            ColorWheel.AddColor(Colors.DarkRed);
            ColorWheel.AddColor(Colors.FireBrick);
            for (int i = 0; i < 6; i++)
            {
                Tortoise.SetPenColor(ColorWheel.GetNextColor());
                Tortoise.Move((i + 1) * 4);
                Tortoise.Turn(-360.0 / 6);
                for (int j = 0; j < 15; j++)
                {
                    Tortoise.SetPenWidth(17);
                    Tortoise.Move((j + 1) * 8);
                    Tortoise.Turn(360.0 / 5);
                }

                //--Tortoise.getBackgroundWindow().setBackground(PenColors.Yellows.PeachPuff);
            }

            Tortoise.SetX(300);
            Tortoise.SetY(200);
            for (int i = 0; i < 5; i++)
            {
                Tortoise.SetPenColor("Black");
                Tortoise.Move(25);
                Tortoise.Turn(360.0 / 5);
            }
        }
示例#3
0
 private static void DrawOctogon()
 {
     for (int i = 0; i < 8; i++)
     {
         var nextColor = ColorWheel.GetNextColor();
         Tortoise.SetPenColor(nextColor);
         Tortoise.Move(50);
         Tortoise.Turn(360.0 / 8);
     }
 }
示例#4
0
        private static void AdjustPen()
        {
            Tortoise.SetPenColor(ColorWheel.GetNextColor());
            var width = Tortoise.GetPenWidth();

            Tortoise.SetPenWidth(width + 1);
            if (Tortoise.GetPenWidth() > 4)
            {
                Tortoise.SetPenWidth(1);
            }
        }
示例#5
0
 public static void Start()
 {
     Tortoise.Show();
     Tortoise.SetSpeed(10);
     CreateColorPalette();
     for (int i = 0; i < 30; i++)
     {
         var nextColor = ColorWheel.GetNextColor();
         Tortoise.SetPenColor(nextColor);
         DrawOctagonWithOverlap();
         Tortoise.Turn(360.0 / 30);
         Tortoise.Turn(5);
     }
 }