Minh T. Nguyen

        "Enemy's Gate Is Down"
Search this site:

Minh Tri Nguyen Minh T. Nguyen enderminh Vietnamese nguyentriminh blog Visual Studio .NET Tips and Tricks Nguyễn Trí Minh
posts - 219, comments - 475, trackbacks - 135

Minh T. Nguyen's Mandelbrot Explorer 1.0 in Silverlight 2.0 with source code


Minh T. Nguyen's Mandelbrot Explorer is an application that allows you to zoom into the Mandelbrot set fractal at an arbitrary level. Simply select an area to zoom in, and use the back button to backtrace or the restart button to start from the beginning. If you don't see the fractal above, please install the freely-available Microsoft Silverlight 2.0 plug-in (available for most popular browsers) at www.silverlight.net. Note that this application is very power-hungry, so a fast computer is recommended.

Academic details: The Mandelbrot fractal is generated by drawing the set of complex numbers c on a complex plane, where the value of the function f(z) = z * z + c applied iteratively on itself is unbounded. In other words, if you pick a complex number c and an initial value of z being c, and apply the above function over and over again, you’ll see that the absolute value of the running result either always remains bounded below 2 or suddenly shoots up towards infinity after a certain number of iterations. Well if the latter happens, you draw the complex number on the plane with a certain color that is reflective of how many iterations it took for the function to escape. But anyways, before mathematicians are lynching me for such a rude definition, you’re probably better off reading a formal description of the Mandelbrot set over at Wikipedia.

Technical details: This application was recently updated with the Microsoft Silverlight 2.0 and is hosted via Microsoft Silverlight Streaming by Windows Live. The Mandelbrot generation algorithm is very loosely based on Marc Boizeau's implementation of using complex number classes and operator overloading, while the coloring of the complex points outside of the Mandelbrot set is borrowed from Pierre Leclercq's implementation. In order to draw pixels on a Bitmap in Silverlight, I used Joe Stegman's dynamic image generation code. 

Source code: The full source code for this Mandelbrot Explorer is posted here (requires Visual Studio .NET 2008). I don't care what you want to do with this. Just don't make money or claim that it's yours. :)

Version 1.0 Update: This 1.0 version is an update over the 0.9 version. It uses Silverlight 2.0's new DispatcherTimer to be able to modify UI elements from a timer event without the need to manually marshal control back to the UI thread (avoids the “cross-thread operation not allowed” exception). In addition, in version 0.9 I used a bad hack of drawing tiny rectangles on a canvas to mimic pixels since Silverlight does not have an out-of-the-box editable image class. Well, since then Joe Stegman has invented such an EditableImage by converting the pixel data in memory into a PNG image. This technique greatly improves the drawing performance, prompting me to even draw the view partially as it is being calculated. What's next? Well, really, I should be coding this using the DeepZoom technology, since this example is just crying out loud to be implemented using that, but I'll do that another time. :)

posted on Wednesday, December 03, 2008 12:54 AM

Feedback

# Minh T. Nguyen's Mandelbrot Explorer in Silverlight 1.1

12/3/2008 1:48 AM | Minh T. Nguyen

# Minh T. Nguyen's Mandelbrot Explorer 1.0 in Silverlight 2.0 with source code

Minh T. Nguyen 's Mandelbrot Explorer is an application that allows you to zoom into the Mandelbrot set
12/3/2008 2:18 AM | Minh T. Nguyen's Blog

# Thanks

Thanks for great post.
2/1/2010 11:45 AM | Porno izle

# Fenerbahçe

Thanks
2/2/2010 2:58 PM | Fenerbahce Maclari

# Tatil Forum

You can find information about <a href="http://www.tatilforum.com">holiday</a> vacation in Turkey forum site.
Site is Turkish but you can translate with google translate English and other languages.
www.tatilforum.com
2/2/2010 2:59 PM | Tatil forum

# re: Minh T. Nguyen's Mandelbrot Explorer 1.0 in Silverlight 2.0 with source code

You can find information about http://www.tatilforum.com holidayK vacation in Turkey forum site.
Site is Turkish but you can translate with google translate English and other languages.
www.tatilforum.com
2/2/2010 3:01 PM | Tatil forum

# re: Minh T. Nguyen's Mandelbrot Explorer 1.0 in Silverlight 2.0 with source code

i cant watch videos with silverlight
2/6/2010 2:32 PM | video izle

Post Comment

Title  
Name  
Url
Comment   
Protected by Clearscreen.SharpHIPEnter the code you see: