Click here to Skip to main content
15,888,286 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to do a C# program that shows a mandelbrot fractal. What graphics tools is the best suited to do this. GDI+, WPF or other? I have never worked with graphics other than simple forms and controls.
Posted
Updated 3-Mar-12 14:51pm
v2
Comments
Robert1974 3-Mar-12 4:45am    
I use visual studio 10
OriginalGriff 3-Mar-12 4:51am    
You can use the "Improve Question" widget to add information, rather than posting it as a separate comment.

Have a look at this: Mandelbrot Set for C#[^] it just uses SetPixel, which is part of System.Drawing
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 3-Mar-12 20:53pm    
Would be too slow due SetPixel, maybe even noticeable compared to calculations...
--SA
Sergey Alexandrovich Kryukov 3-Mar-12 21:01pm    
Please see my answer.
--SA
Either WPF or System.Drawing with System.Windows.Forms could work for you. I would suggest you use a bitmap for rendering. This way, you can have a tree of already calculated regions on a complex plain, and you can derive new region from any of the already rendered regions using mouse selection.

I only would warn you against using SetPixel. Even though calculations are pretty slow, too…

Wind System.Drawing, you should use the technique based on LockBits:
http://msdn.microsoft.com/en-us/library/5ey6h79d.aspx[^].

With WPF, you would use System.Windows.Media.Imaging.WriteableBitmap:
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.aspx[^].

Both MSDN pages have some code samples showing how to work without SetPixel

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900