--  This program written by       Rick3137
      --   http://rb23.yolasite.com/
time1 = timerticks()
time2 = 0

Pi2=6.28318 ; Type = 3 ; Count = 0 ; Count2 = 0
 Ang1 = Pi2/Type ; Ang = 0 ; x = 490 ; y = 580
 red = 100 ; green = 0 ; blue = 255
 color (255,0,0)


 function SetColor( clr )
         if clr == 0  then
          red = 0 ; green = 0 ; blue = 0
         end
         if clr == 1  then
          red = 255 ; green = 200 ; blue = 200
         end
         if clr == 2  then
          red = 255 ; green = 0 ; blue = 0
         end
         if clr == 3  then
          red = 255 ; green = 200 ; blue = 0
         end
         if clr == 4  then
          red = 255 ; green = 255 ; blue = 0
         end
         if clr == 5  then
          red = 0 ; green = 255 ; blue = 0
         end
         if clr == 6  then
          red = 0 ; green = 0 ; blue = 255
         end
         if clr == 7  then
          red = 255 ; green = 0 ; blue = 255
         end
         if clr == 8  then
          red = 200 ; green = 200 ; blue = 200
         end
         if clr == 9  then
          red = 255 ; green = 255 ; blue = 255
         end
         if clr == 10  then
          red = 100 ; green = 100 ; blue = 100
         end
          if clr == 11  then
          red = 200 ; green = 180 ; blue = 160
         end
          if clr == 12  then
          red = 200 ; green = 0 ; blue = 0
         end
          if clr == 13  then
          red = 200 ; green = 160 ; blue = 0
         end
          if clr == 14  then
          red = 200 ; green = 200 ; blue = 0
         end
          if clr == 15  then
          red = 0 ; green = 200 ; blue = 0
         end
          if clr == 16  then
          red = 0 ; green = 0 ; blue = 200
         end
          if clr == 17  then
          red = 200 ; green = 0 ; blue = 200
         end
          if clr == 18  then
          red = 150 ; green = 0 ; blue = 0
         end
          if clr == 19  then
          red = 0 ; green = 150 ; blue = 0
         end
          if clr == 20  then
          red = 0 ; green = 0 ; blue = 150
         end
          if clr == 21  then
          red = 100 ; green = 0 ; blue = 0
         end
          if clr == 22  then
          red = 0 ; green = 100 ; blue = 0
         end
         if clr == 23  then
          red = 0 ; green = 0 ; blue = 100  -- Jesus Is Comming
         end
         color (red, green, blue)

 end
 function RotateLeft()
      Ang = Ang + Ang1
      if Ang > Pi2 then
       Ang = Ang - Pi2
   end

 end

  function 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 Fractal(size)
         local    cnt = 0
          Ang1 = Pi2/Type
          Count = Count + 1
          while cnt < 3
          do
             MoveSteps ( size )
             RotateLeft()
             cnt = cnt + 1
               if size > 10 then
                  Fractal(size/2)
               end

          end
 end


      -- Starts Program
      screen (1200,700,32," Fractal Speed Test ")


      color (100,0,200)
      backcolor (0,0,20)
      clearscreen()
      redraw()

      time1 = timerticks()
      x = 400 ; y = 290 ; Ang = 0
      Count2 = 0
      color (red, green, blue)
   while ( Count2 < 20)
     do
      Fractal(250)
      Count2 = Count2 + 1 ;   Ang = Count * 9
      SetColor( Count2 )
     end
    time2 = timerticks() - time1

    drawtext(10,10,"Press any key to exit ..")
    drawtext( 10,20,time1 )
    drawtext( 10,40,time2)
    drawtext(60,40," ms. Drawing time ")
    redraw()
    inkey()
      closewindow()     -- This ends the program.










 








































































































 

Make a free website with Yola