Example #1
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);
     }
 }
Example #2
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 #3
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);
        }