Fractal application revisited

This year, I wrote a fractal demo application using DSS/CCR

Distributed Agents and Fractals using DSS/VPL

Now, I’m exploring parallel execution using Task Parallel Library, threads, or MPI (Message Passing Interface). But before writing new versions of fractal app using parallel programming, I added to my ajcodekatas Google code, a base application, WinForm Fractal, that generates fractal images using the GUI thread:

http://code.google.com/p/ajcodekatas/source/browse/#svn/trunk/FractalExample

 

There is a class library, with core classes, and a WinForm project, that uses a Calculator object to calculate a Sector of fractal. An excerpt of that invocation:

 

private void Calculate() { Bitmap bitmap = new Bitmap(pcbFractal.Width, pcbFractal.Height); pcbFractal.Image = bitmap; pcbFractal.Refresh(); realWidth = realDelta * pcbFractal.Width; imgHeight = imgDelta * pcbFractal.Height; realMin = realCenter - realWidth / 2; imgMin = imgCenter - imgHeight / 2; int width = pcbFractal.Width; int height = pcbFractal.Height; SectorInfo sectorinfo = new SectorInfo() { FromX = 0, FromY = 0, Width = width, Height = height, RealMinimum = realMin, ImgMinimum = imgMin, Delta = realDelta, MaxIterations = colors.Length, MaxValue = 4 }; Calculator calculator = new Calculator(); Sector sector = calculator.CalculateSector(sectorinfo); this.DrawValues(sector.FromX, sector.FromY, sector.Width, sector.Height, sector.Values); }

Run Fractal.GUI project, and click on Calculate:

You can drag the mouse to select a zone. Releasing the mouse, a new image is generated. You can change the colors, that are randomly selected:

Next Steps

I want to add new versions:

– Multithread version

– Parallel version using Task Parallel Library

– Distributed version (MPI.NET? AjMessages?)

If you are impatient, there is an excellent tutorial, implementing a fractal application using HPC 2008 and the above technologies, ready to download from:

Learning Parallel Programming — from shared-memory multi-threading to distributed-memory multi-processing

Suggestions, comments, welcome!

Angel “Java” Lopez
http://www.ajlopez.com/en
http://twitter.com/ajlopez

32 thoughts on “Fractal application revisited

  1. Pingback: Webcast de desarrollo con Windows HPC Server 2008 - Angel "Java" Lopez

  2. Pingback: Webcast de desarrollo con Windows HPC Server 2008 | Buanzolandia

  3. Pingback: Fractals using MPI.NET and HPC « Angel “Java” Lopez on Blog

  4. Pingback: Webcast de desarrollo con Windows HPC Server 2008 | Buanzolandia

  5. Pingback: Azure: Fractal application « Angel “Java” Lopez on Blog

  6. Lenore

    My brother suggested I would possibly like this website.
    He was once totally right. This post actually made my day.
    You can not consider just how much time I had spent for this info!
    Thank you!

    Reply
  7. houston solar tour

    Howdy very cool site!! Man .. Beautiful ..
    Amazing .. I will bookmark your web site and take the feeds
    also? I’m happy to search out so many helpful info here in the submit, we want work out more strategies in this regard, thank you for sharing. . . . . .

    Reply
  8. Numbers

    Hi there i am kavin, its my first occasion to commenting anyplace, when i read this
    post i thought i could also make comment due to this sensible article.

    Reply
  9. alifefullofadventure.Blogspot.com Additional Info additional reading Check Out alifefullofadventure.Blogspot.com Check This Out Click at alifefullofadventure.Blogspot.com Click At this website click for source Click Here Click In this article Click on ali

    Appreciating the persistence you put into your site and detailed information you offer.
    It’s nice to come across a blog every once in a while that isn’t the same out
    of date rehashed material. Excellent read! I’ve saved your site and I’m including your RSS feeds to my Google account.

    Reply
  10. Kristen

    First of all I want to say terrific blog! I had
    a quick question in which I’d like to ask if you do not mind.
    I was interested to know how you center yourself and clear your thoughts prior
    to writing. I’ve had difficulty clearing my thoughts in getting my thoughts out.
    I truly do enjoy writing however it just seems like the first
    10 to 15 minutes are lost simply just trying to figure out
    how to begin. Any ideas or tips? Appreciate it!

    Reply
  11. Http://Www.Youtube.Com/Watch?V=SzLRLimfMv0

    The cosmetic dentist crowns however will probably be white and look more like natural teeth.

    Chipped or cracked teeth are also common,
    with lots of people accidentally biting too hard on food.

    It will be worth looking into this too especially if your case is unique and complicated.

    Reply
  12. Orval

    It’s remarkable to pay a quick visit this
    website and reading the views of all mates on the topic of
    this post, while I am also keen of getting familiarity.

    Reply
  13. Kent

    I do not even know how I ended up here, but I
    thought this post was great. I do not know who you are but definitely you’re
    going to a famous blogger if you are not already 😉 Cheers!

    Reply
  14. amazing prima lite garcinia reviews

    Today, I went to the beach with my children. I found a
    sea shell and gave it to my 4 year old daughter and
    said “You can hear the ocean if you put this to your ear.” She placed the shell to her ear and screamed.
    There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is totally off topic but I had to tell someone!

    Reply
  15. dr oz

    I’m now not positive where you’re getting your information, but good topic.
    I must spend some time learning much more or figuring out more.
    Thanks for magnificent info I was searching for this info for my
    mission.

    Reply
  16. health : fitnes

    Howdy! I could have sworn I’ve been to this blog before but after reading through some
    of the post I realized it’s new to me. Anyways,
    I’m definitely glad I found it and I’ll be book-marking and checking back frequently!

    Reply
  17. loss Diet

    I was curious if you ever thought of changing the layout
    of your blog? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with it better.
    Youve got an awful lot of text for only having one or 2 pictures.
    Maybe you could space it out better?

    Reply
  18. weight loss product

    Hello there, just became alert to your blog through Google, and found that it’s truly informative.
    I am going to watch out for brussels. I will be grateful if you continue
    this in future. A lot of people will be benefited from your writing.
    Cheers!

    Reply
  19. channel 4 psychopath test online

    I am really enjoying the theme/design of your website.
    Do you ever run into any web browser compatibility problems?
    A number of my blog readers have complained about my
    blog not operating correctly in Explorer but looks great in Opera.
    Do you have any tips to help fix this issue?

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s