• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Plugins
  • Assigned To
  • Operating System
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by mattzz - 2004-03-14
Last edited by hohensoh - 2004-04-14

FS#2066 - mandelbrot plugin


this little plugin draws a mandelbrot set on the LCD.
Might be used as a performance test or just for the fun
of it.
It takes about 35 seconds on my JBR20 with recent firmware.
I set the default number of maximum iterations per
pixel to 10. That seems to be a reasonable value for
the start in terms of speed and accuracy of the
resulting image.

After completion you will see two numbers: The upper
one is the number of ticks needed for the mandebrot
set. The lower number is the number of maximum
iterations for each pixel.

If you really have plenty of time:

Play: zoom in
ON: zoom out
OFF: quit
Curser: shift area to the given direction
F1: Increase number of iterations by 5
F2: decrease number of iterations by 5
F3: reset all values

At least it’s fun with the simulator…


Closed by  hohensoh
2004-04-14 23:51
Reason for closing:  Accepted

We can use floats? (Although strongly discouraged)
Didn't know that.

Here goes the first patch (mandelbrot-20040314.patch) with
the following changes:

  1. changed n_iter to 15 (40secs, but much nicer picture)
  2. added painting of equal diverging speeds
  3. changed aspect ratio of mandelbrot image with respect to

the display

I think it looks a bit nicer know (still competely pointless
- I know. Who the hell wants a jukebox to do the work of a
numbercruncher… eeh, I do :)


This is the much faster fixed point math version.
Now it's even fun on the hardware :-) (3.5secs for a mandelbrot set @ 15 Iterations per pixel)


This is a three times faster version with higher accuracy.

  1. increased fractional part to 28 bit (higher accuracy,

deeper zooming)

  1. multiplications/divisions are now shift operations
  2. screen update every 8 lines with lcd_update_rect()
  3. some code tweaking for the sake of speed

Thanks to Joerg and Jens for the tough code review ;-)

Heading for a grayscale version…



Available keyboard shortcuts


Task Details

Task Editing