Giter Site home page Giter Site logo

starlitdreams / mandelbrot-set-plotter Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 13 KB

This repository contains a simple Mandelbrot set plotter in C++ using SDL2. It visualizes the Mandelbrot set by calculating iterations for each point in the complex plane. Features include customizable colors and efficient SDL2 rendering. Requires SDL2 and a C++ compiler. Contributions welcome. Licensed under MIT.

License: MIT License

C++ 100.00%
cmath complex-numbers cpp math numeric sdl2

mandelbrot-set-plotter's Introduction

Mandelbrot Set Plotter

This project is a simple Mandelbrot set plotter written in C++ using SDL2. The Mandelbrot set is a famous fractal defined by iterating a complex function. This program generates a visual representation of the Mandelbrot set by calculating the number of iterations it takes for each point in the complex plane to escape a given radius.

Features

  • Computes and visualizes the Mandelbrot set.
  • Uses SDL2 for rendering.
  • Custom linear interpolation function for coordinate mapping.
  • Adjustable color scheme based on the iteration count.

Example

image

Prerequisites

  • SDL2 library
  • C++ compiler (e.g., g++)

Building and Running the Program

Windows

  1. Ensure you have the SDL2 library installed. You can download it from SDL2 Downloads or using MSYS

    pacman -S mingw-w64-x86_64-SDL2
  2. Clone this repository or download the source code.

  3. Open a terminal or command prompt and navigate to the directory containing the source code.

  4. Compile the code using the following command:

    g++ -fdiagnostics-color=always -g path_to_your_source_code/mandelbrot.cpp -o path_to_your_output_directory/mandelbrot.exe -Ipath_to_sdl2_include -Lpath_to_sdl2_lib -lmingw32 -lSDL2main -lSDL2 -mconsole
    

License

This project is licensed under the MIT License. See the LICENSE file for details.

mandelbrot-set-plotter's People

Contributors

starlitdreams 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.