Angel \”Java\” Lopez on Blog

December 17, 2008

Fractal application revisited

Filed under: .NET, C Sharp — ajlopez @ 9:46 am

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:


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


  1. […] Fractal application revisited […]

    Pingback by Webcast de desarrollo con Windows HPC Server 2008 - Angel "Java" Lopez — December 18, 2008 @ 12:29 pm

  2. […] Fractal application revisited […]

    Pingback by Webcast de desarrollo con Windows HPC Server 2008 | Buanzolandia — December 19, 2008 @ 12:00 am

  3. […] Filed under: .NET, C Sharp, High Performance Computing — ajlopez @ 5:50 am I updated my fractal example to support MPI.NET (Message Passing Interface with .NET) and parametric tasks in Windows HPC Server […]

    Pingback by Fractals using MPI.NET and HPC « Angel “Java” Lopez on Blog — December 26, 2008 @ 5:51 am

  4. […] (Estar?? participando en lugar de Jorge "Chorch" Garc??a). Habr?? ejemplos de MPI.NET, con c??digo. Estoy adaptando mi ejemplo de Fractal: Fractal application revisited […]

    Pingback by Webcast de desarrollo con Windows HPC Server 2008 | Buanzolandia — December 29, 2008 @ 1:21 am

  5. […] January, I reimplemented my Fractal application, now using Azure (my Azure-related posts). The idea is to calculate each sector of a fractal image, […]

    Pingback by Azure: Fractal application « Angel “Java” Lopez on Blog — February 15, 2011 @ 10:21 am

  6. It’s an remarkable piece of writing designed for all the internet viewers; they will obtain benefit from it I am sure.

    Comment by Martina — April 23, 2013 @ 5:53 am

  7. 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!

    Comment by Lenore — May 8, 2013 @ 6:42 am

  8. 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. . . . . .

    Comment by houston solar tour — May 9, 2013 @ 10:06 pm

  9. 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.

    Comment by Numbers — May 10, 2013 @ 1:02 pm

  10. 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.

    Comment by Additional Info additional reading Check Out Check This Out Click at Click At this website click for source Click Here Click In this article Click on ali — May 11, 2013 @ 6:25 am

  11. I like it whenever people get together and share ideas.
    Great blog, stick with it!

    Comment by buy water filters — August 29, 2013 @ 4:54 pm

  12. I think this is among the most important information for me.

    And i am glad reading your article. But want to remark on few general things, The website style is great,
    the articles is really nice : D. Good job, cheers

    Comment by Garcinia Cambogia Extract - 100% Pure Premium NaturalExtract 1000 Mg. — August 29, 2013 @ 11:32 pm

  13. 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!

    Comment by Kristen — September 17, 2013 @ 7:57 am

  14. Wow, this post is good, my younger sister is analyzing these things, thus
    I am going to inform her.

    Comment by toothache medication — September 30, 2013 @ 6:23 pm

  15. You have made some really good points there. I looked on the internet to learn more about the issue and found most individuals will go along with your views on
    this website.

    Comment by tips dental care — October 3, 2013 @ 6:04 am

  16. 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.

    Comment by Http://Www.Youtube.Com/Watch?V=SzLRLimfMv0 — March 17, 2014 @ 9:18 am

  17. Your style is so unique in comparison to other folks I’ve read stuff from.
    Thanks for posting when you’ve got the opportunity,
    Guess I will just book mark this site.

    Comment by uk overseas mortgages — June 30, 2014 @ 4:42 am

  18. 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.

    Comment by Orval — August 12, 2014 @ 12:48 am

  19. 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!

    Comment by Kent — August 12, 2014 @ 9:57 pm

  20. 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!

    Comment by amazing prima lite garcinia reviews — August 13, 2014 @ 6:09 am

  21. 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

    Comment by dr oz — August 13, 2014 @ 9:14 pm

  22. 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!

    Comment by health : fitnes — August 15, 2014 @ 2:12 am

  23. 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?

    Comment by loss Diet — September 11, 2014 @ 5:11 pm

  24. What’s Going down i am new to this, I stumbled
    upon this I have discovered It absolutely helpful and it has aided me out loads.
    I’m hoping to contribute & assist other users like its helped me.
    Good job.

    Comment by nutra natural dr oz cambogia garcinia reviews — September 22, 2014 @ 6:35 pm

  25. If some one wishes expert view on the topic of running a blog then i advise him/her to visit this web site, Keep up the fastidious work.

    Comment by Margo — September 30, 2014 @ 1:33 am

  26. 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.

    Comment by weight loss product — October 7, 2014 @ 7:23 am

  27. No matter if some one searches for his necessary thing,
    therefore he/she wishes to be available that in detail, so that thing is maintained over here.

    Comment by the psychopath test a journey through the madness industry — October 9, 2014 @ 2:23 am

  28. 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?

    Comment by channel 4 psychopath test online — October 9, 2014 @ 2:28 am

  29. Very good information. Lucky me I came across your blkog by accident (stumbleupon).
    I’ve bookmarked it for later!

    Comment by Harriet — October 22, 2014 @ 6:31 am

  30. медные аноды цена – шестигранник латунный, лист латунный цена.

    Comment by RaymondCog — February 13, 2017 @ 1:25 pm

  31. распашонки оптом от производителя – пеленки оптом от производителя, мамин малыш пятигорск одежда для малышей оптом.

    Comment by SamuelBof — March 6, 2017 @ 1:55 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

You are commenting using your 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

Create a free website or blog at

%d bloggers like this: