Skip to content

Repository files navigation

Fractol

Overview

Fractol is a graphical application built in C that generates and displays various types of fractals in real-time using MiniLibX and X11 on Linux. This project was developed as part of the 42Lisboa curriculum.

Features

  • Real-time rendering and exploration of famous fractals:
    • Mandelbrot set
    • Julia set (with customizable starting parameters)
    • Burning Ship fractal
    • Tricorn fractal
  • Color palette toggling and creative coloring modes
  • Mouse and keyboard event handling (zoom, move, palette change, etc.)
  • Adjustable zoom and iteration depth for high detail

Requirements

  • Linux with X11
  • MiniLibX (included as submodule/folder: minilibx-linux)
  • libft (included as submodule/folder: libft)
  • C compiler (Clang or GCC)
  • Make

Build Instructions

git clone https://github.com/adilsxn/fractol.git
cd fractol
make

Usage

Run the compiled binary:

./fractol <fractal_type> [real_arg imag_arg]

Supported Fractals

  • m : Mandelbrot
  • t : Tricorn
  • b : Burning Ship
  • j : Julia (optionally followed by two floats for real and imaginary parameters)

Examples

  • Mandelbrot:
    ./fractol m
    
  • Julia (default parameters):
    ./fractol j
    
  • Julia (custom parameters):
    ./fractol j -0.4 0.6
    
  • Burning Ship:
    ./fractol b
    
  • Tricorn:
    ./fractol t
    

Controls

  • Arrow keys / WASD: Move across the fractal
  • Mouse wheel / +/-: Zoom in and out
  • Number keys / P: Change color palettes
  • ESC: Exit the program

Project Structure

  • src/ : Source files
  • inc/ : Header files
  • libft/ : Custom C library (required for compilation)
  • minilibx-linux/ : Minimal graphics library (required for compilation)

License

This project is licensed under The Unlicense.


Made with ❤️ by adilsxn @ 42Lisboa.

About

Fractol is a graphical application built in C that generates and displays various types of fractals in real-time

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages