Skip to content

Commit 4446133

Browse files
committed
Changed domain to normal mandelbrot domain
1 parent 758c473 commit 4446133

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

source/config.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ constexpr std::size_t WINDOW_HEIGHT = 600UZ * 2;
1212
constexpr std::size_t FRAME_RATE = 60UZ;
1313

1414
constexpr complex_domain START_COMPLEX_DOMAIN{
15-
{complex_underlying{-1.402}, complex_underlying{-.001}},
16-
{complex_underlying{-1.400}, complex_underlying{.001} }
15+
complex_coordinate{-2, -1},
16+
complex_coordinate{1, 1.25 }
1717
};
1818

1919
const complex_underlying MANDELBROT_DIVERGENCE_NORM = 4;

source/mandelbrot/mandelbrot_window.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
namespace fractal {
2222

23-
std::unique_ptr<MandelbrotWindow::pixel_iteration_counts> MandelbrotWindow::calculate_(
23+
std::unique_ptr<MandelbrotWindow::pixel_iteration_counts> MandelbrotWindow::calculate(
2424
const DisplayDomain& full_display_domain, const DisplayDomain& new_domain_selection
2525
)
2626
{

source/mandelbrot/mandelbrot_window.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MandelbrotWindow {
2323

2424
using pixel_iteration_counts =
2525
std::array<iteration_count, WINDOW_HEIGHT * WINDOW_WIDTH>;
26-
std::unique_ptr<pixel_iteration_counts> calculate_(
26+
std::unique_ptr<pixel_iteration_counts> calculate(
2727
const DisplayDomain& full_display_domain,
2828
const DisplayDomain& new_domain_selection
2929
);

source/mandelbrot/window.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Window : public DisplayEventObserver {
5555
display_domain.get_end_coordinate().y + 1u
5656
);
5757

58-
set_pixel_colors(mandelbrot_.calculate_(DISPLAY_DOMAIN, DISPLAY_DOMAIN));
58+
set_pixel_colors(mandelbrot_.calculate(DISPLAY_DOMAIN, DISPLAY_DOMAIN));
5959
}
6060

6161
void on_mouse_button_pressed(const sf::Event::MouseButtonEvent& event) override
@@ -70,7 +70,7 @@ class Window : public DisplayEventObserver {
7070
DisplayDomain ends = calculate_rectangle_end_points(
7171
{selection_start_x_, selection_start_y_}, {event.x, event.y}
7272
);
73-
set_pixel_colors(mandelbrot_.calculate_(DISPLAY_DOMAIN, ends));
73+
set_pixel_colors(mandelbrot_.calculate(DISPLAY_DOMAIN, ends));
7474
}
7575

7676
std::optional<std::unique_ptr<sf::Drawable>> get_drawable() override

0 commit comments

Comments
 (0)