Git Product home page Git Product logo

fractol's Introduction

Fractol

Overview

Fractol is a captivating computer graphics exploration project that delves into the beauty and complexity of fractals. Developed using the C programming language and the MiniLibX library, this project renders stunning visual representations of the Julia and Mandelbrot fractal sets. Beyond being a visual spectacle, Fractol serves as a practical application of complex numbers, graphics optimization, and event handling in graphics programming.

Installation

To install Fract'ol, follow these steps:

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

Ensure that the MiniLibX library is installed on your system before compiling.

Usage

Run the program with the following command:

./fractol [fractal-type]

Replace [fractal-type] with either M for Mandelbrot or J for Julia to view the respective fractal set.

Examples

# Generate Mandelbrot set
./fractol M

# Generate Julia set with custom parameters
./fractol J 0.5646454 0.954

FRACTAL GEOMETRY

Fractal geometry is a branch of mathematics that studies complex shapes and structures exhibiting self-similarity at different scales. A fractal is a geometric pattern or object that repeats itself at varying levels of magnification. The defining characteristic of fractals is their ability to replicate similar structures infinitely within a finite space.

MANDELBROT

The Mandelbrot set is a set of complex numbers in the complex plane, defined by iterating a simple mathematical expression. The set is named after the mathematician Benoît B. Mandelbrot. The mathematical expression for determining whether a complex number c belongs to the Mandelbrot set is:

Zn+1 = (Zn)^2 + c

where Z0 = 0. The iteration continues, and if the magnitude of Zn remains bounded (does not become infinitely large) for all iterations, then the complex number c is considered part of the Mandelbrot set. In mathematical terms:

∣Zn∣ ≤ 2 for all n

If |Zn| exceeds 2 at any iteration, c is not part of the Mandelbrot set. The Mandelbrot set is often visualized in the complex plane, with different colors or shades representing whether a point is inside or outside the set based on the number of iterations required for the magnitude to exceed 2. Mandelbrot Set

JULIA

The Julia set is another set of complex numbers in the complex plane, defined through iteration of a specific mathematical expression. The Julia set is associated with a fixed complex number c , and the iteration is determined by the following mathematical expression:

Zn+1 = (Zn)^2 +c

where Z0 is the initial complex number. Similar to the Mandelbrot set, the iteration continues, and if the magnitude of Zn remains bounded (does not become infinitely large) for all iterations, then Z0 is considered part of the Julia set associated with the fixed c. In mathematical terms:

∣Zn∣ ≤ 2 for all n

If Zn exceeds 2 at any iteration, Z0 is not part of the Julia set. The Julia set exhibits intricate and complex fractal patterns, and different Julia sets can be generated by varying the fixed complex number c. Julia Set Julia Set Julia Set

COMPLEX NUMBERS

Certainly! Complex numbers are numbers that have both a real part and an imaginary part. A complex number is typically represented in the form a + bi, where a is the real part, b is the imaginary part, and i is the imaginary unit, defined as the square root of -1.

Mathematically, a complex number z is expressed as:

z = a + bi

Here,

  • a is the real part,
  • b is the imaginary part,
  • i is the imaginary unit (i^2 = -1).

Complex numbers are fundamental in mathematics and are widely used in various fields, including physics and engineering, to represent quantities with both magnitude and direction.

fractol's People

Contributors

oumimoun avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.