Sierpinski square curve: Difference between revisions
Content deleted Content added
m Minor edit |
m Minor edit |
||
Line 139:
try (Writer writer = new BufferedWriter(new FileWriter("sierpinski_square.svg"))) {
SierpinskiSquareCurve s = new SierpinskiSquareCurve(writer);
int size = 635, length = 5;
s.currentAngle = 0;
s.currentX =
s.currentY =
s.lineLength =
s.begin(
s.execute(rewrite(5));
s.end();
Line 173 ⟶ 174:
break;
case '+':
turn(
break;
case '-':
turn(-ANGLE);
break;
}
|