Okeydokey - I gave a link to a page with the code in the first post, and that, minus line numbers, looks more or less like this:

rem MANDELBROT

mode 1

rem MAXIMUM X AND Y PICTURE COORDINATES

MAX%=200 : rem MAX%<700

vdu 23,1,0;0;0;0; : rem Disable cursor

vdu19,2,2,0,0,0 : rem GREEN for YELLOW

rem define DISPLAY WINDOW AT CENTRE OF SCREEN

vdu24,640-MAX%/2;512-MAX%/2;640+MAX%/2;512+MAX%/2;

vdu29,640-MAX%/2;512-MAX%/2;

rem DEFINE TEXT DISPLAY AT BOTTOM OF SCREEN

vdu28,0,31,39,28 . . .

rem DEFINE ANGLE AT BOTTOM LEFT. ANGLE=AngleR+AngleIi

AngleR=-2 : AngleI=-1.25

rem LENGTH of SIDE IN COMPLEX SURFACE

Side=2.5

rem DISTANCE BETWEEN TWO POINTS IN COMPLEX SURFACE

Distance=Side/MAX%

T=time

rem CALCULATION

for Y%=0 to MAX% step 4

for X%=0 to MAX% step 4

rem C=CR+CIi

CR=X%*Distance+AngleR : CI=Y%*Distance+AngleI

rem Z=ZR+ZIi. Start value for Z equals C

ZR=CR : ZI=CI

Iteration%=0

rem Z=Z^2+C where Z^2=ZR^2-ZI^2+(2*ZR*ZI)i

repeat

A=ZR^2 : B=ZI^2 : Length=sqr(A+B) : ZI=2*ZR*ZI+CI : ZR=A-B+CR

Iteration%=Iteration%+1

until Length>2 or Iteration%>(16-1) : rem: set this to: (n*16)-1

gcol0,Iteration%mod4

plot X%,Y%

next

cls

print"TlME" (time-T)/100" S"

next

C&P that into basic and you get the first image I posted.

The variables AngleR and AngleI mark the bottom-left origin of the actual image, in terms of their coordinates in the Mandelbrot set's own internal logic. There is more than one origin to consider! I

*think* that to find the origin, set Angle(x) to -2.5 and Side to 5. This gives a square, and quartering it intersects at 0,0 on the real and imaginary axes - it looks like this:

... while the other origin is at the bottom-left of the square, in the computer's internal logic. But someone please correct me if I'm wrong, tho' this is what happens on the same scale with Angle(x) set to 0:

Side is an important variable too - the lower Side is, the more magnification - some of the OP pix had Side set to 0.000001 or so. But hack at will - I'd love to see it translated to C. And I want it animated! But I can't find a simple palette cycling thingybob. That was bloody easy on the Amiga! Blah. If you need it, the BBCBasic4Windows manual is

here.

Obviously, under the Rem Calculation bit, there's the gubbins that does the Z=Z²+C magic and sets the colours (the GCOL statement). I would post the code I'm using now, but it's all geared to BB4W, so if you're not using that (I just like BBC BASIC, ok? It's my comfort zone) then there's probably not much point in posting it, but there should be enough here to adapt it all from (first things to do are take away the "step 4" line in the for...next loops, and increase MAX% to make it all bigger...). Hell, if I can do it then I'm sure someone who actually knows what they're doing can.

Wow, Seye - a zoomable Mandelbrot generator? Would that be as resource-hungry as it sounds? Or have I misunderstood? Cuz they take silly time to draw, but I guess a language not as high-level as what I'm using would be way speedier.

Related cake-oriented fact: "Mandelbrot" is German for

*almond bread*, so these too are mandelbrots:

Looks good, tho' I doubt they have fractal properties. Not that I look for that in a cake (I felt this thread was heavy on the maths and psychedelia and light on cake. I hope this imbalance has now been redressed).

As long as you understand complex numbers (and how to handle them in various languages), the equation 'Z=Z*Z+C' and how to check if / when it runs off to infinity it shouldn't be to difficult to do in any language.

Heheh, I'm unashamedly doing baby steps here, but I have

*some* understanding of complex numbers (the Wiki page I linked to presents complex numbers and how to use them in a pretty accessible way. I was very taken with why

*i* was invented - as a way to force a solution to x²+1=0). Certainly it helps to develop this prog - anyone can drag a mouse, but seeing the Mandelbrot set in terms of numbers rather than (or

*as well as*) pretty patterns is educational/interesting/fun enough.

Of course, the aim is to make it zoomable. Ho hum. More bloodymindedness needed.