by chaos_haunter

Gingerbread Kingdom

IPFS
Gingerbread Kingdom

14 February 2022TEZOSIPFS

A variant of the "Gingerbread Man" fractal. There are 7 basic forms and endless variants within each


The main code is only these few lines below (Q1, Q2, and Q3 are coefficients that need to be set):
with(Math) for(t=0;t<6;t+=1/30)
{
X = XN = Y = t;
for(i = 4e4; --i;)
{
D = (X*X+Y*Y)**.5;
A = (Y > 0 ? acos(-X / D) : acos(X / D) + PI) + PI/4;
x.fillRect(D*sin(A), -D*cos(A), 1, 1),
XN = Math.abs(X * Q1 + 1/Y * C(X + Q3) / W / 64) * (X * Q1 + C(X + Q3) / Q2) - Y,Y = X, X = XN;
}
}

Programmer since 1987, Looking for beauty in chaos

Most of my work is based on chaotic or fractal functions. They are just a set of equations which draw various things serendipitiously.

22 EDITIONS

0 RESERVES

minted

22 / 22

fixed price

1 TEZ

stay ahead with our newsletter

receive news on exclusive drops, releases, product updates, and more

feedback