Hello,
here's another Mandel Julia test.
include "asm.inc"
window 1024,768,1 '0=fullscreen, be careful with windowsXP due to the desctop icons!
float r,i,x,y,z t
int c[32]
for i=0 to 32
c[i] = RGB(i*8,i*14,i*8)
next
Sub Invers()
d = x*x + y*y
if d=0 then
r=100000
x=r
i=r
y=r
else
r=r/d
x=r
i=i/d
y=i
end if
End Sub
Sub Inside(float d, fac, z, it)
i = Abs(Log(d))*fac
if z = it then
r = GetR(c[i])
g = GetG(c[i])
b = GetB(c[i])
color r,g,b
else
color 0,0,0
end if
End Sub
Sub Julia_Init(float xss,yss,lt,rt,bm,tp,it,bb,inv,ins,fac,dx,dy,ci,cr)
dxpp = (rt-lt)/xss
dypp = (tp-bm)/yss
r=bm
for xr=0 to xss
i = lt
for yr=0 to yss
x = r
y = i
b = x
m = y
if inv=1 then Invers()
xs = x*x
ys = y*y
while key(27)=0
y = x*y
Y = y+y-cr
x = xs-ys-ci
xs = x*x
ys = y*y
d = xs+ys
if d < bb and z < it
z +=1
else
exit while
end if
wend
if ins=0
r = GetR(c[z])
g = GetG(c[z])
b = GetB(c[z])
color r,g,b
else
Inside(d, fac, z, it)
end if
setpixel xr+dx, yr+dy
z=0
r=b
i=m
i += dypp
next
r += dxpp
redraw
next
End Sub
lt=-2 : rt=2
bm=-2 : tp=2
t = ticks
Julia_Init(1024,768,lt,rt,bm,tp,20,30.0,1,1,5,1,1,-0.32,-0.043)
wintext "TIME: " + (ticks()-t)/1000 + " SECONDS"
waitkey
WinExit
[attachment deleted by admin]