Example #1
0
        void TaskC2(double min, double sideLen)
        {
            if (sideLen < min)
            {
                return;
            }

            TurtleCanvas.Left(150);
            TurtleCanvas.Forward(sideLen);
        }
Example #2
0
 void TaskA11(double min, double sideLen)
 {
     if (sideLen < min)
     {
         return;
     }
     TurtleCanvas.Left(60);
     TurtleCanvas.Forward(sideLen);
     TaskA11(min, sideLen - min);
 }
Example #3
0
 void TaskC1(double min, double sideLen)
 {
     if (sideLen < min)
     {
         return;
     }
     TurtleCanvas.Left(5);
     TurtleCanvas.Forward(sideLen);
     TurtleCanvas.Left(120);
     TaskC1(min, sideLen * 0.98);
 }
Example #4
0
 void TaskB6(double min, double sideLen)
 {
     if (sideLen < min)
     {
         return;
     }
     for (int a = 0; a < 3; a++)
     {
         TurtleCanvas.Forward(sideLen);
         TurtleCanvas.Left(120);
         TaskB6(min, sideLen / 3);
     }
 }
Example #5
0
 void TaskA13(double min, double sideLen)
 {
     if (sideLen < min)
     {
         return;
     }
     TurtleCanvas.Forward(sideLen);
     TurtleCanvas.Left(45);
     TaskA13(min, sideLen * 0.6);
     TurtleCanvas.Left(90);
     TaskA13(min, sideLen * 0.6);
     TurtleCanvas.Left(45);
     TurtleCanvas.Forward(sideLen);
 }
Example #6
0
        void TaskA5(double min, double sideLen)
        {
            if (sideLen < min)
            {
                return;
            }

            for (int a = 0; a < 3; a++)
            {
                TurtleCanvas.Forward(sideLen);
                TurtleCanvas.Left(180);
                TaskA5(min, sideLen / 2);
                TurtleCanvas.Right(60);
            }
        }
Example #7
0
 void TaskB1(double min, double sideLen)
 {
     if (sideLen < min)
     {
         return;
     }
     for (int a = 0; a < 2; a++)
     {
         TurtleCanvas.Forward(sideLen / 2);
         TaskB1(min, sideLen / 2);
         TurtleCanvas.Forward(sideLen / 2);
         TurtleCanvas.Left(90);
         TurtleCanvas.Forward(sideLen);
         TurtleCanvas.Left(90);
     }
 }
Example #8
0
 void TaskA8(double min, double sideLen)
 {
     if (sideLen < min)
     {
         return;
     }
     for (int a = 0; a < 6; a++)
     {
         TurtleCanvas.Forward(sideLen / 4);
         TurtleCanvas.Right(120);
         TaskA8(min, sideLen / 2);
         TurtleCanvas.Left(120);
         TurtleCanvas.Forward(3 * sideLen / 4);
         TurtleCanvas.Left(60);
     }
 }
Example #9
0
 void TaskA12(double min, double sideLen)
 {
     if (sideLen < min)
     {
         return;
     }
     for (int a = 1; a <= 3; a++)
     {
         for (int b = 0; b < 3; b++)
         {
             for (int c = 0; c < 3; c++)
             {
                 TurtleCanvas.Forward(sideLen / 3);
                 TurtleCanvas.Left(120);
             }
             TaskA12(min, sideLen / 3);
             TurtleCanvas.Forward(sideLen / 3);
         }
         TurtleCanvas.Left(120);
     }
 }
Example #10
0
        void TaskB8(double min, double sideLen)
        {
            if (sideLen < min)
            {
                return;
            }

            TurtleCanvas.Forward(sideLen);
            TaskB8(min, sideLen / 2);
            TurtleCanvas.Left(180);
            TurtleCanvas.Forward(sideLen);
            TurtleCanvas.Left(135);
            TurtleCanvas.Forward(sideLen);
            TaskB8(min, sideLen / 2);
            TurtleCanvas.Left(180);
            TurtleCanvas.Forward(sideLen);
            TurtleCanvas.Right(90);
            TurtleCanvas.Forward(sideLen);
            TaskB8(min, sideLen / 2);
            TurtleCanvas.Left(180);
            TurtleCanvas.Forward(sideLen);
            TurtleCanvas.Left(135);
        }