Cut the knot: learn to enjoy mathematics
A math books store at a unique math study site. Shopping at the store helps maintain the site. Thank you.
Learning Math Online
Sites for teachers
Sites for parents
Terms of use
Awards
Interactive Activities

CTK Exchange
CTK Wiki Math
CTK Insights - a blog
Math Help

III Millennium Olympiad

Games & Puzzles
What Is What
Arithmetic
Algebra
Geometry
Probability
Outline Mathematics
Make an Identity
Book Reviews
Stories for Young
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
Visual Illusions
My Logo
Math Poll
Cut The Knot!
MSET99 Talk
Other Math sites
Front Page
Movie shortcuts
Personal info
Privacy Policy

Guest book
News sites

Recommend this site

Sites for parents

Education & Parenting

Manifesto  |  Bookstore  |  Contents  |  Amazon store  |  Term index  |  What changed?  |  Contact  |  Recommend
RSS Feed: Recent changes at CTK

Color Cycling on the Mandelbrot Set

Within past 25 years, personal computers moved from being able to display text (regular, blinking and underlined) to the contemporary celebration of desktop graphics with streaming video. The first - black and white (BW) - graphic adapters have been followed by CGA (4-color graphics), EGA (16-colors), VGA (256), SVGA, and more. For me, as for many others, the graphic adapter brought an ability to generate and observe the mathematical wonder of the Mandelbrot set. Even in black and white and low resolution, the image held inexpressible fascination for mathematics and computer buffs.

I have no recollection worth being stored in my memory related to the introduction of the CGA. The EGA was a completely different matter. It was a technological quantum leap compared to 2- and 4-color graphics. Not only there were 16 colors to draw with, the colors had not been fixed. Instead, the adapter featured 16 color registers, each of which could hold - if the memory serves - an 8-bit color. To draw a figure of a given color, a programmer would assign that color to one of the registers and specify that register when drawing the figure. Once the figure was drawn, it was a simple matter to change its color without changing a single pixel on the display. All it took was assigning a different color to the register the figure had been drawn with. The change was instantaneous. One immediate application of this technology was the color cycling, which, in particular, transformed the Mandelbrot set from the realm of mystery into an object of beauty.

The exterior of the Mandelbrot set consists of points for which certain iterations diverge. Depending on how soon the divergence has been detected for a particular pixel, the pixel is assigned a register. After the picture has been drawn, one swaps the colors in the 16 registers in a cycling manner. The effect has been spectacular.

The first Java implementation did not have a facility to emulate color cycling, although it was able to utilize graphic adapters far more sophisticated than the hopelessly obsolete EGA. However, the new versions of Java did support that feature, which I was only too glad to exploit. The applet below does nothing but shows what the color cycling is about. (The applet requires Java 2, jre 1.4.2.)


This applet requires Sun's Java VM 2 which your browser may perceive as a popup. Which it is not. If you want to see the applet work, visit Sun's website at http://www.java.com/en/download/index.jsp, download and install Java VM and enjoy the applet.


Buy this applet
What if applet does not run?

Pure magic.

About Fractals

Copyright © 1996-2010 Alexander Bogomolny

35680648Page copy protected against web site content infringement by Copyscape

Search:
Keywords:

Google
Web CTK