Code Monkey home page Code Monkey logo

fractol's Introduction

logo

This project is about creating graphically beautiful fractals.

About the project

A project made in accordance with the fractol project which is part of the Codam Core Curriculum. For this project it was mandatory to use the school's graphics library. The purpose of the project is to create graphically beautiful fractals. A fractal is a shape that looks similar at different scales. This means that if you zoom in on a fractal, it will look similar to the original shape. Fractals are often found in nature, like in the patterns of snowflakes or the branching of trees. They can also be created mathematically using recursive equasions.

Features

  • The mouse wheel zooms in and out, almost infinitely (within the limits of the computer).
  • The view can be adjusted using the arrow keys.
  • The program can display the Mandelbrot set.
  • The program is able to create different Julia sets by passing different parameters to the program.
  • The colors show the depth of each fractal.

logo

logo

logo

Getting started

Start by cloning the repository:

git clone --recursive https://github.com/fkoolhoven/fractol.git

Compile by using make:

make

Check MLX42's documentation for an overview of dependencies.

Usage

⚠️ Please note this project was made on/for macOS! ⚠️

To display the Mandelbrot set:

./fractol mandelbrot

To display the Julia set:

./fractol julia [real component of c] [imaginary component of c]

For example:

./fractol julia -0.538 0.50695
  • Zoom in and out with the mousewheel
  • Adjust view using the arrow keys
  • Quit the program with ESC or the window's close button

Important learnings

This project was my introduction into programming graphics. I learned to use a simple graphics library, practiced event handling and gained some insight into optimization. Additionally I learned about the mathematical notion of complex numbers. The most challening part of this project for me was generating the colors and having them blend into each other. I dove into the concept of linear interpolation for this, which wasn't mandatory. I passed the project with 115%.

Contact

See my profile page for ways to contact me!

fractol's People

Contributors

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