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

            TurtleCanvas.Left(150);
            TurtleCanvas.Forward(sideLen);
        }
Beispiel #2
0
 void TaskA11(double min, double sideLen)
 {
     if (sideLen < min)
     {
         return;
     }
     TurtleCanvas.Left(60);
     TurtleCanvas.Forward(sideLen);
     TaskA11(min, sideLen - min);
 }
Beispiel #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);
 }
Beispiel #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);
     }
 }
Beispiel #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);
 }
Beispiel #6
0
 void TaskA4(double min, double sideLen)
 {
     if (sideLen < min)
     {
         return;
     }
     for (int a = 0; a < 3; a++)
     {
         TurtleCanvas.Forward(sideLen);
         TurtleCanvas.Right(60);
         TaskA4(min, sideLen / 2);
         TurtleCanvas.Right(180);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
     }
 }
Beispiel #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);
        }