Statische Anzeige Version

This commit is contained in:
2026-01-30 18:14:55 +01:00
parent 51c0ac2510
commit 7ee1bc6245
3 changed files with 10 additions and 13 deletions

5
.vscode/tasks.json vendored
View File

@@ -15,9 +15,10 @@
"-Wconversion",
"-Wsign-conversion",
"-Werror",
"${fileDirname}/**.cpp",
"${workspaceFolder}/main.cpp",
"${workspaceFolder}/mandelbrot.cpp",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"${workspaceFolder}/main",
"-lraylib",
"-lGL",
"-lm",

View File

@@ -4,8 +4,8 @@ namespace Constants {
constexpr int maxIterations{2000};
constexpr int windowWidth{600};
constexpr int windowHeight{600};
constexpr double posRealRange{3.0};
constexpr double negRealRange{-3.0};
constexpr double posImagRange{3.0};
constexpr double negImagRange{-3.0};
constexpr double posRealRange{1.0};
constexpr double negRealRange{-2.5};
constexpr double posImagRange{1.25};
constexpr double negImagRange{-1.25};
} // Namespace Constants

View File

@@ -27,13 +27,9 @@ void drawMandelbrot() {
int iterationsMandelbrot{calculateMandelbrot(cReal, cImag)};
if (iterationsMandelbrot - 1 == maxIterations) {
DrawPixel(x, y, BLACK);
} else {
float t = static_cast<float>(iterationsMandelbrot) / maxIterations;
Color color = LerpColor(BLUE, RED, t);
DrawPixel(x, y, color);
}
float t = static_cast<float>(iterationsMandelbrot) / maxIterations;
Color color = LerpColor(BLUE, RED, t);
DrawPixel(x, y, color);
// std::cout << "Iterations: " << iterationsMandelbrot << '\n';
}
}