First two days

Published: 08/01/2025

This blog post lists in dots what I have been doing for the past two days. Furthermore, I go a little deeper into some of the things I found.

Summary

Different definitions

Ray Marching

  • Different renders exist (https://www.youtube.com/watch?v=svLzmFuSBhk)
    • rasteriser: for 2d to 3d element conversion - lines & points are converted into pixels - GPU for real-time
    • ray tracing: used for animation (movies) - takes a long time to convert, but has a realistic image
    • ray marching: with distance estimator (DE), the closest point know the distance and so make circles to next point - much more detailed - from 2:38

Self-similarity

Self-similarity is a key trait of fractals, but self-similarity alone doesn’t make a fractal (think of a line). Fractals have a fine structure at small scales (zoom-in) & can’t be described with Euclidean Geometry. Self-similarity literally means that it is similar to a part of itself, in every repetition (iteration) the same form returns. (updated: 10/01/2025).

Recursion

Recursion is the process of repeatedly applying a rule, indicating that the outcome of one iteration becomes the starting point for the next; the output of a process is fed back into the process itself, over and over again. In code you call a function inside a function (see example below).

In maths we have a recursion() formula that we know from secondary school: factorial() function. When we want to calculate the factorial of 4, it refers itself to make calculations, until it reaches the stopping condition.

Attention! Fractals continue to infinity, but because our computer would then crash (frozen computer due to infinite loop), we stop when a certain condition is completed. An exit condition is required!

Factorial() function n! = n×(n−1)! where 0! = 1

const factorial = (n) => {
  if (n <= 1) {
  return 1;  
  } else {
  return n * factorial(n - 1);
  }
}

Nature of Code

I read chapter 8: fractals on nature of code website (https://natureofcode.com/fractals/, to do: trees & L-systems)

  • Euclidean Geometry ↔ Geometry of Nature: fractals
    • Euclidean: basic shapes like circle, square, lines
  • The focus of this article here is on 2d fractals, not 3d, but was good to understand concepts (see below: key traits of fractals).
  • Fractals described in the article:
    • Koch curve
    • Cantor set
  • Tried to do some exercises in p5.js
Trying a recursive patter in p5js
Left: reference image, right: what I made.

Creating a Mandelbulb point cloud in processing

7 January, I was mainly concerned with software search and then watched a tutorial (https://www.youtube.com/watch?v=NJCiUVGiNyA) several times and participated in the steps myself to understand how things work. The tutorial was about the mandelbulb which is a 3d fractal of the 2d fractal mandelbrot. After making the 3d point cloud in processing, I tried to understand the mandelbrot better.

In summary, the mandelbrot represents complex numbers that are bounded and do not continue to infinity. Everything in the shape (usually coloured black) is part of the mandelbrot. The operations that produce an unbounded row have outcomes that get larger and larger the more often the operation is repeated. To better understand whether or not a point exists in the mandelbrot, I refer to this source: https://www.skytopia.com/project/fractal/mandelbrot.html#pandora.

In the tutorial, spherical coordinates are used, since White & Nylander’s (2009) formula is based on them. White & Nylander’s formula: https://www.skytopia.com/project/fractal/2mandelbulb.html (scroll down). You can also see how different the mandelbulb looks like in different powers & iterations.

The tutorial works with processing (https://processing.org/).

  • PeasyCam (so you can rotate the fractal around) - Sketch > Import Library… > Add Library…
  • auto format code: edit > auto-format
  • P3D → kind of render mode for rendering 3d content; you also have a default renderer, PDF, P2D and SVG; this render mode makes use of OpenGL-compatible graphics hardware
  • maybe for future - connecting with Arduino: https://processing.org/tutorials/electronics/#code
Mandelbulb trials in processing
Mandelbulb trials in Processing

Insight

The period when people discovered and did the most with fractals is over, you can see this from the amount of articles you can find around 2008 - 2014 (a decade ago), but still some fractal artists make amazing things. It is not the easiest thing to do as it involves difficult maths and I myself am still learning all about this. But I want to try to make the most of it and see what I can do within this timeframe. Although I have to be aware that a full digital installation that is multi-sensory is too high, as was also mentioned at the first coaching moment.

Further steps for me are (1) delimiting the scope and seeing it more as different elements, but still making it belong together so that a conclusion can be made at the end. This includes a restatement of (1.1) what I want to do (process & deliverables), (1.2) the end result and (1.3) research question. The tip I was given at the coaching moment is to focus this week on researching the different applications of fractals, how fractals work (what mathematics is behind them), 2d fractals first then 3d and still waiting to look at software. (2) Secondly, a good schedule should also be created. (e.g. 4 days I keep working on the sense ‘hearing’ and make a demo).

Software list