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); } }
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); } }
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); }