Skip to content

UnbihexiumFan/mandelbrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Mandelbrot Set Displayer

Hi all! This is a program designed to generate the mandelbrot set.

What is the mandelbrot set?

https://en.wikipedia.org/wiki/Mandelbrot_set

The mandelbrot set is a cool fractal. Okay, that doesn't narrow it down much.

The mandelbrot set is a fractal generated by taking the function zc(x)=x2+c, where c is a complex number and x starts at 0, and applying it forever and ever. Is it infinite? Not in the set :(. Is it finite? In the set :).

But wait! I don't have the time or patience to run it forever! Now what?

Aha! There's a trick! See, if the absolute value of zc ever goes above 2, then it will end up going to infinity, and will not be in the set! So, I just go through all the points, preform zc(x) however many times, and check if the absolute value is greater than 2!

That's the implementation, now for the actual instructions.

Parameters

A few parameters are given pre-render to control the appearance:

Size

The size of the display. (duh!) 800 or 1000 usually works best for me. I recommend using a multiple of four. (see below)

Points per unit

The number of points rendered per unit on default zoom. For example, if set to 25 (the default), it will render 25 points between 0 and 1, and 25*4=100 points on the x-axis. Works best when 4*ppu is a multiple of of the size, as each pixel is the same size.

Number of iterations

The number of times zc is applied to x. When setting a high # of iterations, it's best to have a low points per unit so that it doesn't lag super hard, if you want to do any exploring..

Coloring

How the mandelbrot set is colored. 0 sets it to no color (black), 1 colors by cycle (e.g. i becomes a cycle of length 2, -1+i -> -i -> -1+i).

Update while rendering

Controls whether or not the screen is updated mid-render. Always treated as 0/False for the first run.

Controls

Move - WASD

Zoom in/out- C/Z (respectively)

Refresh screen- R (NOTE: SCREEN WILL NOT RE-RENDER UNTIL THIS KEY IS PRESSED)

Home (set to default view)- H

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages