Go Down

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

wilykat

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.

pito

#1
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..

See:
http://www.youtube.com/watch?v=V5_Re_A5lfo

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

wilykat

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.

JarkkoL

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.


Go Up