cover image

Fractals!

Here are two projects in which I have worked with fractals.

One in C, the other in HLSL (High Level Shader Language) using shadertoy, a website to create shaders.

Check the C project out on Github, and the shader on shadertoy

The C fractals

This was a project I had to do for my school called fract-ol.

The goal was to use a small C graphics library (created by my school based on) to generate and display multiple fractals. We then had to be able to navigate this fractal, and of course, zoom into it!

Keep in mind that we were not allowed to use multi-threading, and that the code runs on the CPU (not the GPU), so the performances degrade quickly

I chose to create a few fractals:

The shadertoy fractal

This one is used as the background of my homepage!

Once I had finished the project for my school, I wanted to experiment a bit with GPU generated fractals, in order to have better looking fractals, and smoother transitions, this is where I found shadertoy.

Shadertoy is a website where you can create shaders, i.e. images that are generated on the go using your GPU, so anything you see on that website is not a video, but a picture generated using code!

I learned the basics of shader creation in an afternoon with this handy tutorial and adapted my code to run without any math libraries!