Data update

This commit is contained in:
Ingy döt Net 2023-09-16 17:28:03 -07:00
parent 5af6d93694
commit 796d366b97
455 changed files with 7413 additions and 1900 deletions

View file

@ -7,10 +7,10 @@ proc koch x1 y1 x2 y2 iter . .
y5 = y3 - (x4 - x3) * sin 60 + (y4 - y3) * cos 60
if iter > 0
iter -= 1
call koch x1 y1 x3 y3 iter
call koch x3 y3 x5 y5 iter
call koch x5 y5 x4 y4 iter
call koch x4 y4 x2 y2 iter
koch x1 y1 x3 y3 iter
koch x3 y3 x5 y5 iter
koch x5 y5 x4 y4 iter
koch x4 y4 x2 y2 iter
else
line x1 y1
line x3 y3
@ -26,7 +26,7 @@ move x1 y1
for ang = 0 step 120 to 240
x2 = x1 + 70 * cos ang
y2 = y1 + 70 * sin ang
call koch x1 y1 x2 y2 4
koch x1 y1 x2 y2 4
x1 = x2
y1 = y2
.

View file

@ -0,0 +1,25 @@
set_draw_defaults(
terminal = svg,
dimensions = [350,350],
proportional_axes = xy) $
wxdraw2d(
turtle(
to(koch_snowflake, [n, len],
ifelse(n = 0,
[forward(len)],
[koch_snowflake(n - 1, len),
right(60),
koch_snowflake(n - 1, len),
left(120),
koch_snowflake(n - 1, len),
right(60),
koch_snowflake(n - 1, len)]
)
),
repeat(6,
koch_snowflake(5, 300),
right(60)
)
)
);