#### Rick3137

• Jr. Member
• Posts: 95
« on: 01. June 2016, 00:00:27 »
Art experiment. Some code translated from Small Basic and SDLBasic.
Code: [Select]
-- By Rick3137
win = openwindow ("Start",-1,-1,1200,700)
setactivewindow (win)

backcolor (0,0,0,255)

cls()
wx = 1000 ; wy = 700 ; a = 0
clr = 1 ; --wx = windowwidth ; wy = windowheight
color (255,225,255,255)

function MakeColor()
local  r = 255
if (clr == 1) then ; color (255,255,255,r) ; end
if (clr == 2) then ; color(255,0,0,r) ; end
if (clr == 3) then ; color(255,100,0,r) ; end
if (clr == 4) then ; color(255,255,0,r) ; end
if (clr == 5) then ; color(100,255,0,r) ; end
if (clr == 6) then ; color(255,255,0,r) ; end
if (clr == 7) then ; color(0,255,100,r) ; end
if (clr == 8) then ; color(0,100,255,r) ; end
if (clr == 9) then ; color(0,0,255,r) ; end
if (clr == 10) then ; color(100,0,255,r) ; end
if (clr == 11) then ; color(255,0,255,r) ; end
if (clr == 12) then ; color(255,0,100,r) ; end
if (clr == 13) then ; color(100,0,150,r) ; end
if (clr > 14) then ; clr = 0 ; end
end
da = .1 -- change of angle
ang = 0 -- Angle
c = .01  -- circle size
dr = .4 -- change of radius
clr =0  -- color

for a = 0 , 6000  do

x = cos(ang ) * r
y = sin(ang ) * r
MakeColor()
circle (wx/2 + x, wy/2 + y, c/2)  ; MakeColor()
circle (wx/2 + x, wy/2 + y, c)   ; MakeColor()
circle (wx/2 + x, wy/2 + y, c*2)  ; MakeColor()
circle (wx/2 + x, wy/2 + y, c*4)  ; MakeColor()
clr = clr + 1
if (clr>16) then
clr = 1
end
r = r + dr
--da = da + .01
ang = ang  + da
c = c +.02
end

sync()
key=inkey()

closewindow(win)
closeapplication()

http://rb23.yolasite.com  Ricks Programs
http://rb27.synthasite.com   Sight and Sound

#### Rick3137

• Jr. Member
• Posts: 95
##### Re: DoodleBot3 Made with EGSL
« Reply #1 on: 01. June 2016, 01:21:05 »
This is the EGSL version. Something made PulsarLua run slow . I might switch back to EGSL.

Code: [Select]

-- By Rick3137  http://rb23.yolasite.com/

-- Starts Program
screen (1200,700,32," Eye of the Storm ")
color (25,25,20)
backcolor (0,0,0)
clearscreen()

wx = 1200 ; wy = 700 ; a = 0
clr = 1 ; --wx = windowwidth ; wy = windowheight
color (255,225,255)

function MakeColor()
local  r = 255
if (clr == 1) then ; color (255,255,255) ; end
if (clr == 2) then ; color(255,0,0) ; end
if (clr == 3) then ; color(255,100,0) ; end
if (clr == 4) then ; color(255,255,0) ; end
if (clr == 5) then ; color(100,255,0) ; end
if (clr == 6) then ; color(255,255,0) ; end
if (clr == 7) then ; color(0,255,100) ; end
if (clr == 8) then ; color(0,100,255) ; end
if (clr == 9) then ; color(0,0,255) ; end
if (clr == 10) then ; color(100,0,255) ; end
if (clr == 11) then ; color(255,0,255) ; end
if (clr == 12) then ; color(255,0,100) ; end
if (clr == 13) then ; color(100,0,150) ; end
if (clr > 14) then ; clr = 0 ; end
end
da = .1 -- change of angle
ang = 0 -- Angle
c = .01  -- circle size
dr = .4 -- change of radius
clr =0  -- color

for a = 0 , 6000  do

x = cos(ang ) * r
y = sin(ang ) * r
MakeColor()
circle (wx/2 + x, wy/2 + y, c/2)  ; MakeColor()
circle (wx/2 + x, wy/2 + y, c)   ; MakeColor()
circle (wx/2 + x, wy/2 + y, c*2)  ; MakeColor()
circle (wx/2 + x, wy/2 + y, c*4)  ; MakeColor()
clr = clr + 1
if (clr>16) then
clr = 1
end
r = r + dr
--da = da + .01
ang = ang  + da
c = c +.02
end

sync()

inkey()
closewindow()

http://rb23.yolasite.com  Ricks Programs
http://rb27.synthasite.com   Sight and Sound