dynamic
generative
color
Fourier Blooms – The Art of Parametric Curves and Recursive Trees

Fourier Blooms – The Art of Parametric Curves and Recursive Trees

written by reyrove

07 Oct 2024100 EDITIONS
1 TEZ

Setting the Scene: A Canvas of Possibilities

const ratio = 1 / 1;
const prefix = 'Fourier 2';
const features = {};

Choosing the Colors: A Bold and Gentle Palette

const BackgroundColours1 = ['#CD5C5C', '#F08080', ...];
const BackgroundColours2 = ['#FFFFE0', '#FFFACD', ...];
const ForegroundColours1 = ['#ff4a03', '#ff7803', ...];
const ForegroundColours2 = ['#610803', '#5c2f08', ...];

Tree Circles: Where Geometry Meets Nature

function drawTreeCircle(ctx, startX, startY, length, angle, depth, branchWidth, color1, color2, radius) {
ctx.arc(endX, endY, Radius, 0, 2 * Math.PI);

Random Generation: A Touch of Chaos

function randomgenerat(number, limits) {
  let A = [];
  for (let i = 0; i < number; i++) {
    A[i] = Math.floor($fx.rand() * (limits[1] - limits[0]) + limits[0]);
  }
  return A;
}

Parametric Curves: The Star of the Show

function drawParametricCurve1(ctx, centerX, centerY, radius, steps, color, Width, color2) {
const parametricX = (T) => centerX + R / B1[0] * Math.sin(T / A1[0] + D1[0]);
const parametricY = (T) => centerY + R / B1[0] * Math.cos(T / A2[0] + D1[0]);

Drawing the Curves: A Digital Symphony

ctx.arc(x, y, radius / 300 * $fx.rand(), Math.PI * $fx.rand(), Math.PI + Math.PI * $fx.rand());

The Dance of Two Curves

drawParametricCurve1(ctx, w / 2, h / 2, 3 * w / 4, 80, color21, w / 200, color4);
drawParametricCurve2(ctx, w / 2, h / 2, w / 2, 150, color32, w / 200, color4);

Bringing It All Together: The Canvas Comes Alive

ctx.arc(0, 0, w / 2, 0, Math.PI * 2, true);
drawTreeCircle(ctx, X1, Y1, w / 70, Angle1, 10, w / 300, color11, color11, w / 500);

Explore and Play

This digital garden is yours to explore! You can play with the code, tweak the parameters, and see what kind of beautiful, unique artwork you can create. Each time, the tree branches and curves will grow in new, unpredictable ways, just like life itself.

For the full code, click here, and share your creations with me on X, Instagram, and Facebook. I’d love to see what you come up with! 🌸✨

And, if you ever want to join us in our digital home, you’re always welcome as our guest. Come, create, and be part of this magical journey with us.

With all my love,

_Frostbond Coders 🌸💻

stay ahead with our newsletter

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

feedback