This question is not profound, but I can't figure this out myself and thought I'd ask here. Although the paper is of great historical importance, I don't think History of Science and Mathematics Stackexchange is appropriate.

Is there any historical information about the grid size used in the first rendering of the Mandelbrot set shown in The Dynamics of 2-Generator Subgroups of PSL(2, C), Robert Brooks and J. Peter Matelski, 1978? I'm just trying to reproduce this pattern and while I can get close, I can't quite nail it.

Since this is from about 40 years ago, computing time was several orders of magnitude slower (laptops are GigaFlops), so I understand I may need to play with the number of iterations. Also I haven't switched to higher precision yet (I'm just using python's float). But before I get too involved in that, I'd at least like to know I'm using the same grid points as they are.

EDIT: Ideally the answer would be the actual numbers known to be used by the authors when generating this historic image. But it seems more fun to deduce them, so either way is allowed.

Stopping at 1000 iterations, points with markers maintaned $\vert z \vert< 2$, just for example:

$\hskip3.3cm$enter image description here

enter image description here

  • 1
    $\begingroup$ I guess you could count the dots from $-2$ to $1/4$ to figure out the resolution. $\endgroup$ Jul 14 '17 at 17:53
  • 2
    $\begingroup$ @uhoh Sorry, I didn't mean to imply that it's a pointless question. I was just curious why it would be important. If it's just for historicity - I guess that's a good enough reason. $\endgroup$ Jul 14 '17 at 18:40
  • 1
    $\begingroup$ @uhoh I've also spent time rendering the Mandelbrot set (once even on a TI-83 calculator) and I can confirm that it is indeed fun. $\endgroup$ Jul 14 '17 at 18:52
  • 1
    $\begingroup$ It looks like there is a grid point at $(-0.75, 0)$, otherwise there would be a thicker bridge between the cardioid and the circle - this gives the X alignment of the grid. The antenna visibility shows the Y alignment of the grid is at 0. Counting dots (inaccurate as you say, so posting as a comment rather than an answer) across the circle gives around $0.035$ for the X spacing, the Y spacing looks around $0.055$ - so the grid is not square. $\endgroup$
    – Claude
    Jul 14 '17 at 19:06
  • 1
    $\begingroup$ @Claude thanks! I hadn't even though about using different scales for $x$ and $y$, I wonder if the grid was pre-scaled so that it would come out square after printing on the line printer? (6 lines, 10 characters per inch perhaps?) That would be fun to know! In fact, fun reigns, so let's drop the restriction of factual numbers and open it up to allow reverse-engineered values as well. I'll edit the question accordingly. $\endgroup$
    – uhoh
    Jul 14 '17 at 19:19

I wrote a small Haskell program using the Diagrams library:

import Diagrams.Prelude hiding (aspect)
import Diagrams.Backend.SVG.CmdLine (B, defaultMain)

import Data.Complex

main :: IO ()
main = defaultMain (diagram # centerXY # bg white # lw thin)

diagram :: Diagram B
diagram = vcat . map hcat $
  [ [ if mandelbrot (x :+ y) then asterisk else space
    | i <- [-36 .. 33], let x = spacing * i - 0.75
  | j <- [-16 .. 16], let y = spacing * j * aspect

aspect :: Double
aspect = 1.66

spacing :: Double
spacing = 0.035

iterations :: Int
iterations = 200

mandelbrot :: Complex Double -> Bool
mandelbrot c
  = null
  . dropWhile (<= 2)
  . map magnitude
  . take iterations
  . iterate (\z -> z^2 + c)
  $ 0

asterisk :: Diagram B
asterisk = withEnvelope space $ mconcat
  [ p2 (-2, -2) ~~ p2 (2,  2)
  , p2 (-2,  2) ~~ p2 (2, -2)
  , p2 ( 0, -3) ~~ p2 (0,  3)

space :: Diagram B
space = phantom' (rect 6 10)

phantom' :: Diagram B -> Diagram B
phantom' = phantom

Here is the output:

first Mandelbrot set image recreation

I found the important magic values aspect, spacing and iterations by trial and improvement: I used the spacing from dot counting, and first an aspect of $\frac{10}{6}$, but that was a little too high to get the right shape at the top and bottom so I reduced it a little bit by bit (9.99/6, 9.98/6, ...). Finally I tuned the iterations using binary search to get the remaining pixels the same as the image in the question (and I initially made a mistake, thanks for the correction in the comments).

  • 2
    $\begingroup$ Well done!..... $\endgroup$
    – lhf
    Jul 14 '17 at 23:05
  • $\begingroup$ Thank you! I've heard many fond references to Haskell but to see it here helps explain why it's so well liked by those who use it. Noticing the $x=-0.75$ point and unequal spacing right off was the key, sweet! Is 180 roughly the minimum number of iterations for a stable pattern? $\endgroup$
    – uhoh
    Jul 15 '17 at 4:45
  • 1
    $\begingroup$ @uhoh thanks, well spotted, I fixed it now $\endgroup$
    – Claude
    Jul 21 '17 at 13:17
  • $\begingroup$ Beautiful code <3 $\endgroup$
    – Jay
    Jan 13 at 14:17

I can confirm that the programming constants used were indeed $\Delta x = .035$ , $\Delta y = 1.66 * \Delta x$ . The grid center is $(-.75 , 0)$ which is a boundary point by the way: it is exactly represented in floating point. The original iteration cap was 250.

The run date was 8 Jan 1979. It was my first computer $M$ image using the now standard program. There has been lots of criticism of it, but it is clearly fine.

The font Lucida-console regular has aspect ratio very close to 1.66 Take Notepad or WinVi with this font and you have an effective previewer and printer in imitation of the lineprinter at Stony Brook in 1978.

Note: the UNIVAC mainframe had 36 bit single and 72 bit double precision. Of course, I ran both varieties. The modern choices are 32, 64, or 80 bit. Using 32 bit is problematic.

  • 3
    $\begingroup$ Thank you for your confirmation, what a wonderful first post @JPM! $\endgroup$
    – uhoh
    Jan 15 '20 at 21:37
  • $\begingroup$ To confirm, are you the actual author of the original image? $\endgroup$
    – Neinstein
    Jan 14 at 9:49
  • 1
    $\begingroup$ @Neinstein, if they answer your question, I should hope it to be negative -- given that Mr. Mandelbrot died a bit over 10 years ago. Although, never say never ... $\endgroup$
    – Noughtnaut
    Jan 14 at 13:29
  • $\begingroup$ @Noughtnaut Oh. aha. hm.... The sentence "It was my first computer 𝑀 image using the..." , plus the lot of uncited insight, kind of made me suspicious. Perhaps a young contributor? $\endgroup$
    – Neinstein
    Jan 14 at 16:52
  • 3
    $\begingroup$ @Neinstein OP is asking about a 1978 paper by Robert Brooks and J. Peter Matelski. $\endgroup$
    – att
    Feb 8 at 23:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.