Statische Anzeige Version
This commit is contained in:
5
.vscode/tasks.json
vendored
5
.vscode/tasks.json
vendored
@@ -15,9 +15,10 @@
|
|||||||
"-Wconversion",
|
"-Wconversion",
|
||||||
"-Wsign-conversion",
|
"-Wsign-conversion",
|
||||||
"-Werror",
|
"-Werror",
|
||||||
"${fileDirname}/**.cpp",
|
"${workspaceFolder}/main.cpp",
|
||||||
|
"${workspaceFolder}/mandelbrot.cpp",
|
||||||
"-o",
|
"-o",
|
||||||
"${fileDirname}/${fileBasenameNoExtension}",
|
"${workspaceFolder}/main",
|
||||||
"-lraylib",
|
"-lraylib",
|
||||||
"-lGL",
|
"-lGL",
|
||||||
"-lm",
|
"-lm",
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ namespace Constants {
|
|||||||
constexpr int maxIterations{2000};
|
constexpr int maxIterations{2000};
|
||||||
constexpr int windowWidth{600};
|
constexpr int windowWidth{600};
|
||||||
constexpr int windowHeight{600};
|
constexpr int windowHeight{600};
|
||||||
constexpr double posRealRange{3.0};
|
constexpr double posRealRange{1.0};
|
||||||
constexpr double negRealRange{-3.0};
|
constexpr double negRealRange{-2.5};
|
||||||
constexpr double posImagRange{3.0};
|
constexpr double posImagRange{1.25};
|
||||||
constexpr double negImagRange{-3.0};
|
constexpr double negImagRange{-1.25};
|
||||||
} // Namespace Constants
|
} // Namespace Constants
|
||||||
|
|||||||
4
main.cpp
4
main.cpp
@@ -27,13 +27,9 @@ void drawMandelbrot() {
|
|||||||
|
|
||||||
int iterationsMandelbrot{calculateMandelbrot(cReal, cImag)};
|
int iterationsMandelbrot{calculateMandelbrot(cReal, cImag)};
|
||||||
|
|
||||||
if (iterationsMandelbrot - 1 == maxIterations) {
|
|
||||||
DrawPixel(x, y, BLACK);
|
|
||||||
} else {
|
|
||||||
float t = static_cast<float>(iterationsMandelbrot) / maxIterations;
|
float t = static_cast<float>(iterationsMandelbrot) / maxIterations;
|
||||||
Color color = LerpColor(BLUE, RED, t);
|
Color color = LerpColor(BLUE, RED, t);
|
||||||
DrawPixel(x, y, color);
|
DrawPixel(x, y, color);
|
||||||
}
|
|
||||||
// std::cout << "Iterations: " << iterationsMandelbrot << '\n';
|
// std::cout << "Iterations: " << iterationsMandelbrot << '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user