rem PERSIAN rem FROM AN ORIGINAL PROGRAM BY ACORN COMPUTERS rem IBM VERSION / 23 MAR 86; MODIFIED 25 SEP 98 rem RFO Basic version; 21 January 2016 di_height = 1152 % set to my Device di_width = 672 gr.open 255, 0, 0, 0 gr.orientation 1 % Portrait pause 1000 WakeLock 3 gr.screen screenWidth, screenHeight scale_x = screenWidth / di_width scale_y = screenHeight / di_height gr.scale scale_x, scale_y !---------------------------------- gr.bitmap.create screen, di_width,di_height gr.bitmap.draw nn, screen, 0, 0 gr.bitmap.drawinto.start screen !---------------------------------- xx=screenWidth/2 - 20 yy=screenHeight/2 gosub Functions do J1 = 0 for K = 296 to 240 step -40 do : J2 = floor(rnd() * 19) : until J2 <> J1 J1 = J2 call Colour(J1) for I =- K to K step 4 gr.line null, xx + K, yy + I, xx - K, yy -I gr.line null, xx + I, yy - K, xx - I, yy + K rem gr.render next gr.render pause 2000 next until 0 onBackKey: end Functions: !------------------------------------------------- ! Set colour !------------------------------------------------- fn.def Colour(c) c = Mod(c,18) % if c = 18 c = 0 if c = 19 c = 1 and so on if c = 0 : Red = 0 : Green = 0 : Blue = 0 % Black elseif c = 1 : Red = 128 : Green = 128 : Blue = 128 % Gray elseif c = 2 : Red = 192 : Green = 192 : Blue = 192 % Silver elseif c = 3 : Red = 255 : Green = 255 : Blue = 255 % White elseif c = 4 : Red = 128 : Green = 0 : Blue = 0 % Maroon elseif c = 5 : Red = 255 : Green = 0 : Blue = 0 % Red elseif c = 6 : Red = 128 : Green = 128 : Blue = 0 % Olive elseif c = 7 : Red = 255 : Green = 255 : Blue = 0 % Yellow elseif c = 8 : Red = 0 : Green = 128 : Blue = 0 % Green elseif c = 9 : Red = 0 : Green = 255 : Blue = 0 % Lime elseif c = 10 : Red = 0 : Green = 128 : Blue = 128 % Teal elseif c = 11 : Red = 0 : Green = 255 : Blue = 255 % Aqua elseif c = 12 : Red = 0 : Green = 0 : Blue = 128 % Navy elseif c = 13 : Red = 0 : Green = 0 : Blue = 255 % Blue elseif c = 14 : Red = 128 : Green = 0 : Blue = 128 % Purple elseif c = 15 : Red = 255 : Green = 0 : Blue = 255 % Fuchsia elseif c = 16 : Red = 199 : Green = 97 : Blue = 20 % Brown elseif c = 17 : Red = 218 : Green = 165 : Blue = 32 % Gold endif gr.color 255, Red, Green, Blue, 1 fn.end return