'Note: Copy and Paste the code in black below into MS Excel Visual Basic Macro Editor.

'That is: Select All, Copy, Launch Excel, New Workbook,

' Go to Tools, Macro, Record New Macro, Stop,

'Go to Tools, Macro,Select Macro1, Edit

' Paste after name ("Macro1()"), and Run Macro.

'After running, Plot M-set by selecting all cells (click on top left corner)

'Edit, Insert Chart, Pick 3D surface, finish wizard, Select as new Sheet.

 

Cells.Select
Selection.NumberFormat = "0"
For i = 1 To 201
For j = 1 To 201
Let xold = 0
Let yold = 0
For n = 1 To 49
Let xnew = xold ^ 2 - yold ^ 2 + (i -1)/ 50 - 2
Let ynew = 2 * xold * yold + (j-1) / 50 - 2
Let RSq = xnew ^ 2 + ynew ^ 2
If RSq > 4 Then Exit For
Let xold = xnew
Let yold = ynew
Next n
Cells(i, j).Value = n
Next j
Next i