Skip to content

Generate an image of the famous Mandelbrot set fractal using Haskell and SDL2.

License

Notifications You must be signed in to change notification settings

nsvedberg/mandelbrot-hs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mandelbrot-hs

ITCS 4102 Group 2: The Strongly Typed

Generate an image of the famous Mandelbrot set fractal using SDL2.

Example screenshot

Requirements

You will need Haskell's cabal build system. The easiest way to set up Haskell is with GHCup.

After you have GHCup installed, you will need to run ghcup tui and make sure you have GHC 9.2.8 base-4.16.4.0 installed and selected for use.

You will also need SDL2 from your system's package manager. For Arch:

sudo pacman -S sdl2

or for Debian-based:

sudo apt install libsdl2-dev

Usage

To build:

cabal build

To run:

cabal run

Controls

Key Description
Q Quits the program
S Saves a screenshot of the current render to the screenshots/ folder
R Adjust the red offset.
G Adjust the green offset.
B Adjust the blue offset.
Z Adjust the saturation offset.
[ARROW] Adjust the colors.
[NUM] Changes fractal mode. 1: Mandelbrot, 2: Julia Set
[CLICK] Clicking a point on the screen moves the viewport to focus on that point
+ Zoom in
- Zoom out
? Show a help screen

About

Generate an image of the famous Mandelbrot set fractal using Haskell and SDL2.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published