This is the Small Basic version. I'm still on a learning curve with this dialect.
I tried to post this on the Small Basic website, but failed the spam bot test. It might be that stroke I had awhile back that made me a little bit unstable. I got a double dose of Religion since then and this life does not seem all that important.
There's just a few years left to work with here, and my mind tends to drift to things of greater importance, but I still have time for Basic.
red = rgb(255,0,0) :blue = rgb(0,0,255):green = rgb(0,255,0):violet = rgb(255,0,255):yellow = rgb(255,255,0):bluegreen = rgb(0,255,255)
red2 = rgb(255,0,0):blue2 = rgb(255,0,0):green2 = rgb(255,0,0):violet2 = rgb(255,0,0):yellow2 = rgb(255,0,0):bluegreen2 = rgb(255,0,0)
black = rgb(0,0,0):white = rgb(255,255,255)
view 20,20,800,600
color 10
cls
Pi2=6.28318 : Type = 3 : Count = 0 : Count2 = 0
Ang1 = Pi2/Type : Ang = 0 : x = 150 : y = 500
color (rgb(255,0,0))
func SetColor( clr )
if( clr = 0 ) then
red = 0 : green = 0 : blue = 0
end if
if( clr = 1 ) then
red = 255 : green = 200 : blue = 200
end if
if( clr = 2 ) then
red = 255 : green = 0 : blue = 0
end if
if( clr = 3 ) then
red = 255 : green = 200 : blue = 0
end if
if( clr = 4 ) then
red = 255 : green = 255 : blue = 0
end if
if( clr = 5 ) then
red = 0 : green = 255 : blue = 0
end if
if( clr = 6 ) then
red = 0 : green = 0 : blue = 255
end if
if( clr = 7 ) then
red = 255 : green = 0 : blue = 255
end if
if( clr = 8 ) then
red = 200 : green = 200 : blue = 200
end if
if( clr = 9 ) then
red = 255 : green = 255 : blue = 255
end if
if( clr = 10 ) then
red = 100 : green = 100 : blue = 100
end if
if( clr = 11 ) then
red = 200 : green = 180 : blue = 160
end if
if( clr = 12 ) then
red = 200 : green = 0 : blue = 0
end if
if( clr = 13 ) then
red = 200 : green = 160 : blue = 0
end if
if( clr = 14 ) then
red = 200 : green = 200 : blue = 0
end if
if( clr = 15 ) then
red = 0 : green = 200 : blue = 0
end if
if( clr = 16 ) then
red = 0 : green = 0 : blue = 200
end if
if( clr = 17 ) then
red = 200 : green = 0 : blue = 200
end if
if( clr = 18 ) then
red = 150 : green = 0 : blue = 0
end if
if( clr = 19 ) then
red = 0 : green = 150 : blue = 0
end if
if( clr = 20 ) then
red = 0 : green = 0 : blue = 150
end if
if( clr = 21 ) then
red = 100 : green = 0 : blue = 0
end if
if( clr = 22 ) then
red = 0 : green = 100 : blue = 0
end if
if( clr = 23 ) then
red = 0 : green = 0 : blue = 100
end if
color ( rgb(red, green, blue))
end
func RotateLeft()
Ang = Ang + Ang1
if Ang > Pi2 then
Ang = Ang - Pi2
end if
end
func MoveSteps ( distance )
dx = cos(Ang) * distance
dy = sin(Ang) * distance
x2 = x + dx
y2 = y - dy
line x,y,x2,y2
x = x2 : y = y2
end function
func Fractal(size)
local cnt = 0
Ang1 = Pi2/Type
Count = Count + 1
while cnt < 3
MoveSteps ( size )
RotateLeft()
cnt = cnt + 1
if size > 10 then
Fractal(size/2)
end if
wend
end
x = 400 : y = 290 : Ang = 0
Count2 = 0
color (blue)
while ( Count2 < 20)
Fractal(250)
Count2 = Count2 + 1 : Ang = Count2 * 9
SetColor( Count2 )
wend
?"Press any key to exit .."
repeat : until (inkey$ <> "" )
end