This Notebook was largerly inspired by the following article

Link to article

The integer circle allgorithm can be used to ... generate points on a circle. Here is a simple example:

Changing the variable factor_a from $\frac{1}{8}$ to $\frac{1}{16}$ in the code above results in points ... on an Octagon.

The integer circle algorithm can be parametricied by 4 parameters:

  1. $x_0$ (x_0 in code) the starting x value
  2. $y_0$ (y_0 in code) the starting y calue
  3. the factors $a$ and 4. $b$ inside the floor call

    In the case in the code sample below a = b = $\frac {1}{16}$. By choosing a larger $x_0$ we will get a rounder circle. In this code sample we iterate until we end up at the starting position (x_0, y_0):

Now we can get a little bit crazyier with these starting parameters discovererd by Steve Witham:

  1. $x_0 = 233$ (the 13. Fibbonaci number)
  2. $y_0 = 0$
  3. $a = 1$
  4. $b = 4 \sin{(\frac {\pi}{5})}^2$

it takes 17070 steps for x, y to return to its inital position

Having an algorithm with 4 parameters means we have a 4 Dimensional object to explore its convergence behavior. The following function returns how many steps it takes to return to the starting condition.

Now we render some 2D fractals holding 2 parameters constant and varying over the other 2: For know we hold the params $a$ and $b$ constant: