Kudos, and a question, and a minor bug (?)

  • Nobody/Anonymous

    Great program. I've been messing with Mandelbrot on and off for twenty-odd years.  My first major effort involved wiring an MC68881 co-processer into my Apple IIe.  I eventually ended up using Turbo Pascal: navigating in lo-res on a quarter of a VGA screen, and then writing Bitmap files directly at arbitrary resolution (to be viewed with Paint Shop Pro).  Your program is about two orders of magnitude faster then mine on the same machine!
       Question: I wrote a TP routine to read your log files so that I could duplicate your views. What EXACTLY is "Zoom"  I have a pretty good approximate conversion, but I use the "width" of the view as my size variable; for example, the whole set runs from vaguely real= -2 to real= +1 for a "width" of 3.
       Bug (?): Minor point. When I duplicated one of your images, my Y-axis was backwards from yours (i.e.: vertical flip). I checked my (extremely simple) TP code, and it SEEMS to be correct.  Is it you or is it me?

    • Nobody/Anonymous

      I mis-wrote. When I said "Zoom", I meant "Mag"

    • Paul Gentieu

      Paul Gentieu - 2008-06-07

      Glad you like the program... I've also been working on various Mandelbrot programs for longer than I'd like to admit.

      As for your questions, here's my formula for using the Mag:

      RE_IM_DELTA = ((((double) offs * 4.0) / (double) size) / mag)

      Where offs is the x or y offset of a pixel from the center of the display window, and size is the width or height of the image in pixels (whichever is smaller). This RE_IM_DELTA is added to the real or imaginary coordinate of the image centerpoint to get the coordinate for the pixel.

      With this formula, you can just change the mag to zoom in or out, and change the image centerpoint to pan. It also shows the same area of the set regardless of screen window size.

      The constant 4.0 I think was just carried over from some old legacy code. It gives a reasonably sized image at mag = 1.0.

      For the Y axis, I'm sure your code is right. I think my Y axis works in screen coordinate units, where lesser values are higher up on the graph (the opposite of normal math conventions. :)


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks