Skip to content

thyrgle/collatz_fractal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Collatz Fractal Generator

Collatz Fractal


Among the many fractals, there is Collatz Fractal based on a complex extension of:

def f(x):
    if x % 2 == 0:
        return x / 2
    return 3 * x + 1

To generate the fractal, you pick a bunch of points and repeatedly apply f over and over again a large number of times. Morally, f(f(f(f(....f(x)....)))). In this case, however, it is not a real number x but instead a complex number (often denoted z). The end result is plotted by giving it a color that "corresponds" to the resulting magnitude.


Heavily modified variant of the Mandelbrot example given here.

About

Collatz fractal generator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages