rem 'Fake' fractal fern rem Original QBASIC program published in PC Magazine rem BB4W version by David Williams rem RFO Basic version by Roy Shepherd 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.text.size 40 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 !---------------------------------- gr.color 255, 0, 255, 0, 1 x=0 y=0 loopCount = 0 for i = 1 to 80000 r = rnd() * 1 loopCount ++ if r<=0.1 then A=0 : B=0 : C=0 : D=0.16 : E=0 : F=0 if r>0.1 & r<=0.86 then A =0.85 : B =0.04: C =-0.04 : D =0.85: E =0 : F = 1.6 if r>0.86 & r<=0.93 then A =0.2 : B=-0.26 : C =0.23 : D =0.22: E = 0 : F = 1.6 if r>0.93 then A=-0.15 : B =0.28 : C=0.26 : D=0.24 : E=0 : F =0.44 newx=A*x+B*y+E newy=C*x+D*y+F x=newx y=newy !gr.point null, 250+96*newx, 32+96*y gr.point null, 250+96*x, 32+96*y if loopCount = 1000 then gr.render : loopCount = 0 next gr.text.draw null, 100, screenHeight - 300, "DONE!"% Если надпись слишком высоко, то screenHeight - 100 gr.render do : pause 1 : until 0 onBackKey: end