Skip to content

MykBamberg/Mandelbrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Mandelbrot Visualizer

A CLI tool that generates colorful visualizations of the Mandelbrot set in your terminal using ANSI escape codes.

Features

  • Customizable colors

  • Customizable maximum iteration number

  • Adjustable output dimensions

  • Configurable view bounds

  • Posterization

  • Brightness adjustment

  • Parallelization

  • ANSI escape code 24 bit color output

  • Bitmap image output

Build

Build requires any D compiler

# build executable
$ make

# install executable
$ sudo make install

# uninstall executable
$ sudo make uninstall

Usage

mandelbrot [OPTIONS]

Arguments:
-x         --width Width of output
-y        --height Height of output
-f    --foreground Foreground color in hex
-b    --background Background color in hex
-p --posterization Set posterization level
-r          --root Set the nth root of the brightness level
-a        --bounds Set visible part of the fractal 'x0,y0,x1,y1'
-t         --ascii Only use ASCII characters
-q          --hash Hash brightness values, creates a strong visual variation between color bands
-i    --iterations Maximum number of iterations
-o        --output Output as Bitmap image

Examples

mandelbrot -x 100 -y 60 -f 4040ff -b 080810
mandelbrot -p 15 -r 2
mandelbrot -a -1.5,-0.5,-0.75,0 -x 100 -y 80
mandelbrot -x 1500 -y 1000 -o ./output.bmp
$ mandelbrot
normal
$ mandelbrot -x 100 -y 60 -f 4040ff -b 080810
color size
$ mandelbrot -p 18 -r 1.7 -q
posterization hash root
$ mandelbrot -a -1.50001692,-6.77048840e-05,-1.49988151,6.77048840e-05 -q -r 1.7 -x 100 -y 80
zoom
$ mandelbrot -x 24000 -y 16000 -i 256 -r 2 -q -o output.bmp
output