Skip to content

Commit

Permalink
zoom, iterations and gradients
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodrake committed Oct 13, 2023
1 parent 90894fa commit d658883
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Mandelbrot Fractal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <SDL.h>
#include <SDL_ttf.h>
#undef main
#include <Windows.h>
#include <iostream>
#include <numeric>
#include <omp.h>
Expand Down Expand Up @@ -57,7 +56,7 @@ SDL_Color getColor(int iterations, int maxIterations) {

// Interpolate between two neighboring colors
SDL_Color color1 = colors[ifactor];
SDL_Color color2 = colors[min(ifactor + 1, maxColor)];
SDL_Color color2 = colors[std::min(ifactor + 1, maxColor)];

SDL_Color interpolatedColor = lerp(color1, color2, factor - ifactor);

Expand Down Expand Up @@ -133,7 +132,7 @@ int main()
TTF_Font* font = TTF_OpenFont("C:/Windows/Fonts/arial.ttf", 24);
if (!font)
{
std::cout << "xd";
TTF_Font* font = TTF_OpenFont("/usr/share/fonts/truetype/freefont/FreeMono.ttf", 24);
}
SDL_Surface* surface = TTF_RenderText_Solid(font, text.c_str(), {255, 255, 255});
SDL_Texture* texture = SDL_CreateTextureFromSurface(renderer, surface);
Expand Down

0 comments on commit d658883

Please sign in to comment.