Skip to content

Commit 77ebcc4

Browse files
committed
apply coding style
1 parent 41b2589 commit 77ebcc4

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

fractals/hilbert_curve.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,22 @@ def hilbert_curve(order, x0=0, y0=0, xi=1, xj=0, yi=0, yj=1):
4444
order - 1, x0 + xi / 2, y0 + xj / 2, xi / 2, xj / 2, yi / 2, yj / 2
4545
)
4646
points += hilbert_curve(
47-
order - 1, x0 + xi / 2 + yi / 2, y0 + xj / 2 + yj / 2, xi / 2, xj / 2, yi / 2, yj / 2
47+
order - 1,
48+
x0 + xi / 2 + yi / 2,
49+
y0 + xj / 2 + yj / 2,
50+
xi / 2,
51+
xj / 2,
52+
yi / 2,
53+
yj / 2,
4854
)
4955
points += hilbert_curve(
50-
order - 1, x0 + xi / 2 + yi, y0 + xj / 2 + yj, -yi / 2, -yj / 2, -xi / 2, -xj / 2
56+
order - 1,
57+
x0 + xi / 2 + yi,
58+
y0 + xj / 2 + yj,
59+
-yi / 2,
60+
-yj / 2,
61+
-xi / 2,
62+
-xj / 2,
5163
)
5264

5365
return points
@@ -60,7 +72,7 @@ def plot_hilbert_curve(points):
6072
x, y = zip(*points)
6173
plt.plot(x, y)
6274
plt.title("Hilbert Curve")
63-
plt.gca().set_aspect('equal', adjustable='box')
75+
plt.gca().set_aspect("equal", adjustable="box")
6476
plt.show()
6577

6678

0 commit comments

Comments
 (0)