Skip to content

About

Fractal explorer (Mandelbrot, Julia) using MiniLibX - 42 Core Project

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

42 Core: Fract-ol

Fractal explorer (Mandelbrot, Julia) using MiniLibX - 42 Core Project.

Language: C 42 School

🛠 Setup

Requires MiniLibX.

make

🚀 Usage

./fractol [fractal_name]

Example: ./fractol mandelbrot or ./fractol julia 0.285 0.01

🏗 Architecture

Rendering Logic

  • Iterative Calculation: For each pixel, the program calculates if the complex number escapes the set within a maximum number of iterations.
  • Color Mapping: Maps the iteration count to a color gradient for visual representation.
  • Optimization: Uses double precision floating point numbers for smooth zooming.

Interactive Features

  • Zoom: Mouse wheel support for zooming into the fractal.
  • Shifting: Arrow keys to move the viewport.
  • Color Shifting: Dynamic color palette swapping.

⚖️ Trade-offs

  • MiniLibX vs. SDL: MiniLibX was used as per the 42 subject constraints. While SDL is more powerful, MLX provides a lower-level understanding of window management and pixel buffers.
  • Double vs. Long Double: Double precision was chosen for a balance between performance and zoom depth. Long double provides more depth but is significantly slower on some architectures.

About

Fractal explorer (Mandelbrot, Julia) using MiniLibX - 42 Core Project

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages