Go Down

Topic: Any Mandelbrot project I can copy for fun? (Read 8644 times) previous topic - next topic


I have a mega 2560 that's been gathering dust so I thought about using it to run a small color LCD module and do mandelbrot.  I searched by Google and the only one I found with detail readily available is a mono only.  I don't know if the code can work in color or not.

Does any of you know if there's a color version floating around?  What I'm hoping to get eventually (by tweaking code if needed) is one that has 2 mode: full auto screensaver-esque that continuously run, pause after completing for xx seconds, then zoom a random 1/4 of LCD and redraw that. And manual mode with either variable resistor or analog joystick to select a section to be zoomed.

Atari Lynx has something (hidden feature in Chip Challenge game) that has the manual mode I like but it's extremely slow running off 20 year old 16 bit CPU (plus a working Lynx system can cost around $50 on eBay).  Arduino Mega is considerably cheaper, more easily found, and can be customized.


Jun 23, 2013, 07:47 pm Last Edit: Jun 23, 2013, 07:51 pm by pito Reason: 1
It will be very slow as well. For toying with Mandelbrot you need at least DUE or a much faster mcu.. Zooming with variable resistor - not feasible, I think. A 320x240 LCD to write may take many minutes..


An stm32f4 with FPU on is about 300x faster in the Mandelbrot as the atmega2560..


Hmmm a cheap Due clone starts at around $40 and Arduino brand is around $55 plus I'd have to deal with 5v and 3.3v difference.


Mandelbrot is monochromatic by nature, so there's no "color" version per se. The color version you see are just mapping the different monochromatic values to different color palette, e.g. instead of 25% gray being gray, it's say red, and 50% gray instead of gray is blue. So if you have monochromatic version of Mandelbrot already, changing that to color is very simple. Mandelbrot is super simple to implement though. The challenge really is to optimize the code for good performance and deeper in the Manderbrot you zoom, more iterations you must calculate and thus more expensive it gets.


Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

Go Up