2D Mandelbrot Set, can't implement zoom

Hello. This is my first time posting here. I am currently in a computer graphics college course so I am very new to OpenGL. I have to draw, pixel by pixel, the Mandelbrot Set and implement zooming capability. My program draws the image but I don’t know where to go from here for the zooming portion.

The zoom will receive two mouse clicks as input (upper-left and lower-right corners) and redraw.

Using [b]glutMouseFunc/b I have created a function which reads the coordinates of the mouse clicks. Now I do not know what to do with these numbers in order to zoom.

If there is any more information required to assist please let me know. Any insight will be appreciated.

Hello,

Well, the Mandelbrot set is initially viewed with window settings (-2;1) on X axis and (-1;1) on Y axis.

Using this, you pass a several number of complex numbers representing this covered area. Zooming is just changing these window settings :slight_smile: The relation between your zoom rectangle and the window settings is trivial :wink: