Proceed to Safety


Robert P. Munafo, 2023 Mar 20.

A pixel is a rectangular (usually square) portion of an image, part of a grid of rows and columns. In drawing the Mandelbrot set, pixels are assigned to points in some uniform manner.

To draw the image, for each pixel a point (real and imaginary coordinates) is computed, the point is iterated, and a representation function is used to select a pixel color.

There are two common ways to assign points to pixels: "corner" and "center". The choice affects only user interface behaviour. With "corner" method, the complex number (point) comes from a corner of the pixel, such as the upper-left as shown here:

| | | --P-------P-------P-- | | | | pixel | pixel | | | | --P-------P-------P-- | | |

In the "center" method, the complex number (point) used for iteration comes from the center of the pixel:

| | | --+-------+-------+-- | pixel | pixel | | P | P | | | | --+-------+-------+-- | | |

For just rendering and viewing images, this choice doesn't matter too much. However, if the user interface involves clicking on the image with the mouse and then doing an action such as zooming in, then the "corner" or "center" choice will impact what coordinate becomes the new center of the image after the zoom-in. This can cause a visible shift when the "corner" method is used, but generally no such shift for the "center" method.

A similar concern can arise in pixel counting algorithms.

From the Mandelbrot Set Glossary and Encyclopedia, by Robert Munafo, (c) 1987-2024.

Mu-ency main pageindexrecent changesDEMZ

Robert Munafo's home pages on AWS    © 1996-2024 Robert P. Munafo.    about    contact
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Details here.

This page was written in the "embarrassingly readable" markup language RHTF, and was last updated on 2023 Mar 20. s.27