SCREEN 800, 600
Global x#, y#, zx#, zy#, cx#, cy#, tp#
Global im, z, it
im=570: z=150
h = ScreenHeight()
w = ScreenWidth ()
Text 200,200,"WAIT A MOMENT...."
DrawScreen
Lock
For y=0 To h-1
For x=0 To w-1
zx=0
zy=0
cx= (x-400)/z
cy= (y-300)/z
it = im
While zx * zx + zy * zy < 4 And it>0
tp = zx * zx - zy * zy + cx
zy = 2 * zx * zy + cy
zx = tp
it = it-1
Wend
PutPixel2 x,y, RGB(it*12,it*8,it*4)
Next x
Next y
Unlock
DrawScreen
WaitKey
Function RGB(r0, g0, b0)
g0=g0*256: r0=r0*65536
Return r0+g0+b0
End Function
Edit: By they way, since you seem to be interested in graphics programming, you should check out our CoolBasic demo Linear Minds. Also includes source code!
By they way, since you seem to be interested in graphics programming, you should check out our CoolBasic demo Linear Minds. Also includes source code!
wow, this vector graphic is very cool! well done.
Unfortunately, your source code has too many finnish notations, this isn't that easy to read for me.
nevertheless, thanks for your offer.