MRaster examples 21.0.0.0
Image Processing Library
|
Draw a grayscale Mandelbrot Set. More...
Go to the source code of this file.
Draw a grayscale Mandelbrot Set.
Copyright (c) 1988-2015,2018 Mitchell Jay Richling https://www.mitchr.me All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The escape time Mandelbrot rendering algorithm delivers us a single data point, the iteration count, per pixel. Niavely this maps directly to a monochrome image; however, the iteration counts used are frequently beyond 256 – the limit for most display technology. Additionally the spatial distribution of these counts is quite compressed near the edige of the Mandelbrot set leading to visually unsatsifying results. In responce a great many schemes have been developed to colorize the results, and the vast majoritiy of these schemes can be broken down into standard image processing steps used in scientific image analyssis. This program takes a very directrect approach and produces a deep (16-bit) greyscale TIFF image. This image may then be loaded up in your favroith scietific image analysis pacakger (Mine is Fiji an ImageJ derivative), where one may then quickly play with various coloring schemes. Most of thje classic ones can be reporduced in one or two steps – a LUT and perhaps a homogenious mathematical filter. This is a great way to expore known coloring schemes, and to develop new ones.
Notes:
Definition in file mandelbrot_grayscale.cpp.