peter
26-03-2014, 20:51
Okay, here is a bananas tree without bananas.
Uses "ui"
#INCLUDE "abc.inc"
OpenWindow 440, 400
SetHandleDC hdc, hwnd
Dim mis,radd,frad,xsh,bpx,bpy,x2,y2 As Single
Dim tpx,tpy,aa,x1,y1,ht,xs As Single
bpx = 220
bpy = 410
tpx = bpx
Canvas_Clear &hffffff
For aa=-6 To 6
DrawLine bpx+aa,bpy, bpx,bpy-390,4,Rgb(15,128,0)
Next
radd=160
tpy=bpy-40
For ht=1 To 60
For xs=-100 To 100 Step 40
xsh=xs/100
mis = Rnd(1,2)
DrawLine tpx,tpy, tpx+(xsh*radd),(tpy-mis)*radd,4, Rgb(0,Rnd(0,128),0)
For aa=1 To 30
frad = Rnd(1,2)*radd
x1=tpx+(xsh*frad)
y1=tpy-mis*frad
x2=tpx+xsh*(frad+radd/5)
y2=tpy-mis*frad+(-mis+(Rnd(0,6)-.4))*(radd/5)
DrawLine x1,y1,x2,y2, 4, Rgb(0,Rnd(0,200),0)
Next
Next
radd= radd-4
tpy = tpy-9
Next
Canvas_Redraw
Canvas_WaitKey
Canvas_Window End hwnd
Uses "ui"
#INCLUDE "abc.inc"
OpenWindow 440, 400
SetHandleDC hdc, hwnd
Dim mis,radd,frad,xsh,bpx,bpy,x2,y2 As Single
Dim tpx,tpy,aa,x1,y1,ht,xs As Single
bpx = 220
bpy = 410
tpx = bpx
Canvas_Clear &hffffff
For aa=-6 To 6
DrawLine bpx+aa,bpy, bpx,bpy-390,4,Rgb(15,128,0)
Next
radd=160
tpy=bpy-40
For ht=1 To 60
For xs=-100 To 100 Step 40
xsh=xs/100
mis = Rnd(1,2)
DrawLine tpx,tpy, tpx+(xsh*radd),(tpy-mis)*radd,4, Rgb(0,Rnd(0,128),0)
For aa=1 To 30
frad = Rnd(1,2)*radd
x1=tpx+(xsh*frad)
y1=tpy-mis*frad
x2=tpx+xsh*(frad+radd/5)
y2=tpy-mis*frad+(-mis+(Rnd(0,6)-.4))*(radd/5)
DrawLine x1,y1,x2,y2, 4, Rgb(0,Rnd(0,200),0)
Next
Next
radd= radd-4
tpy = tpy-9
Next
Canvas_Redraw
Canvas_WaitKey
Canvas_Window End hwnd