peter
25-02-2014, 20:51
Hi,
your own lawn.
Uses "ui"
#INCLUDE "gdip.inc"
OpenWindow 300, 300
Randomize
Single kt, idx, idy, wx, wy, jy, jx, tx, ty, r, y, x, k, c
Single m, xmin, xmax, ymin, ymax
kt=50 : m =4.0 : xmin =2.1 : xmax =-0.6 : ymin =-1.5 : ymax =1.5
idx =(xmax - xmin)/320
idy =(ymax - ymin)/320
SetSmoothMode 2
ClsColor Argb(255,0,200,0)
For x=0 To 310
jx = xmin + x*idx
For y =0 To 350
jy = ymin + y*idy
k =0
wx=0
wy=0
While iswindow(hwnd)
If r <= m And k < kt Then
tx = wx*wx - wy*wy + jx
ty = 2*wx * wy + jy
wx = tx
wy = ty
r = wx*wx + wy*wy
k = k + 1
Else
Exit While
End If
Wend
DrawEllipse x,y,15,15,1, ARGB(255,0,Rnd(24,255),0)
Next
Canvas_Redraw
Next
While IsWindow(hwnd) And GetAsyncKeyState(27)=0
Sleep 10
Wend
Canvas_Window End hwnd
your own lawn.
Uses "ui"
#INCLUDE "gdip.inc"
OpenWindow 300, 300
Randomize
Single kt, idx, idy, wx, wy, jy, jx, tx, ty, r, y, x, k, c
Single m, xmin, xmax, ymin, ymax
kt=50 : m =4.0 : xmin =2.1 : xmax =-0.6 : ymin =-1.5 : ymax =1.5
idx =(xmax - xmin)/320
idy =(ymax - ymin)/320
SetSmoothMode 2
ClsColor Argb(255,0,200,0)
For x=0 To 310
jx = xmin + x*idx
For y =0 To 350
jy = ymin + y*idy
k =0
wx=0
wy=0
While iswindow(hwnd)
If r <= m And k < kt Then
tx = wx*wx - wy*wy + jx
ty = 2*wx * wy + jy
wx = tx
wy = ty
r = wx*wx + wy*wy
k = k + 1
Else
Exit While
End If
Wend
DrawEllipse x,y,15,15,1, ARGB(255,0,Rnd(24,255),0)
Next
Canvas_Redraw
Next
While IsWindow(hwnd) And GetAsyncKeyState(27)=0
Sleep 10
Wend
Canvas_Window End hwnd