rem  This program written by    Rick3137  For NaaLaa
     rem   The original was written by Leszpio at  Scratch.mit.edu
     rem   http://rb23.yolasite.com/
visible:
pendown = 0 ;   PenX# = 0.0 ; PenY# = 0.0 ; Angle# = 0.0 ; Angle2# = 0.0 ; x1# =0.0 ; y1# = 0.0
 x2# = 0.0  ;  y2# = 0.0 ; dx# = 0.0 ; dy# = 0.0 ; d# = 0.0 ;  cnt2 = 0 ; red =0 ; green = 0 ; blue = 0 ; key = 0
stx#  = 0.0  ; sty# = 0.0 ; cnt3 = 0 ; cnt = 0  ; k =0  ; a = 0 ;  n2 = 1  
Angle# = 270.0   ;  AngleR# = 120.0
k =  0  ;  i#  =  6.0
hidden:
 clr = 1          
   rem   Starts Program
     set redraw off

set window 0, 0, 1200, 700, true, 1
set color 25, 25, 60
cls
 redraw
set color 100, 0, 200
  

    
      pendown = 1
      while (cnt < 6)
        set color 25, 25, 60
            cls
            redraw
            proc makecolor clr

            k =  4 * n2 + 3
            cnt2 = 0
       i2 = int(i#)
                 while (cnt2 < 360/ i2)
                
                 cnt3 = 0
                       while (cnt3 < k)
                      
                       a = MoveSteps(280.0)
                       k2# = float#( k )
                       a = RotateRight( 180.0 - 180.0 / k2# )
                       cnt3 = cnt3 + 1
                       redraw
                       wend
                 a = RotateLeft( i# )
                     proc makecolor clr
       clr = clr + 1
       if (clr > 70) then clr = 1 
                
                 cnt2 = cnt2 + 1
                 wend
            set caret 100,100
           
            wln " Hit Space To Continue Or Esc To Quit"
            redraw
            do
       if keydown(27, true) then end
       wait 1
      until keydown(" ", true)
            i# = i# - 1.0
            n2 = n2 + 1
            cnt = cnt + 1
      wend
         wait keydown
 
     rem   This ends the program.
procedure  makecolor( clr)             ;  rem All variables are local
    if clr > 70 then clr = 1
    if clr = 0 then clr = 1
    if clr < 0 then clr = 1
    if clr = 1 then set color 10, 20, 255
    if clr = 2 then set color 20, 40, 255
    if clr = 3 then set color 30, 60, 255
    if clr = 4 then set color 40, 80, 255
    if clr = 5 then set color 50, 100, 255
    if clr = 6 then set color 60, 120, 255
    if clr = 7 then set color 70, 140, 255
    if clr = 8 then set color 80, 160, 255
    if clr = 9 then set color 90, 180, 255
    if clr = 10 then set color 150, 200, 255
    if clr = 11 then set color 10, 255, 255
    if clr = 12 then set color 20, 255, 255
    if clr = 13 then set color 30, 255, 255
    if clr = 14 then set color 40, 255, 255
    if clr = 15 then set color 50, 255, 255
    if clr = 16 then set color 60, 255, 255
    if clr = 17 then set color 70, 255, 255
    if clr = 18 then set color 80, 255, 255
    if clr = 19 then set color 90, 255, 255
    if clr = 20 then set color 100, 255, 255
    if clr = 21 then set color 0, 255, 100
    if clr = 22 then set color 0, 255, 90
    if clr = 23 then set color 0, 255, 80
    if clr = 24 then set color 0, 255, 70
    if clr = 25 then set color 0, 255, 60
    if clr = 26 then set color 0, 255, 50
    if clr = 27 then set color 0, 255, 40
    if clr = 28 then set color 0, 255, 30
    if clr = 29 then set color 0, 255, 20       
    if clr = 30 then set color 0, 255, 10
    if clr = 31 then set color 255, 255, 10
    if clr = 32 then set color 255, 255, 20
    if clr = 33 then set color 255, 255, 30
    if clr = 34 then set color 255, 255, 40
    if clr = 35 then set color 255, 255, 50
    if clr = 36 then set color 255, 255, 60
    if clr = 37 then set color 255, 255, 70
    if clr = 38 then set color 255, 255, 80
    if clr = 39 then set color 255, 255, 90       
    if clr = 40 then set color 255, 255, 100
    if clr = 41 then set color 255, 10, 255
    if clr = 42 then set color 255, 20, 255
    if clr = 43 then set color 255, 30, 255
    if clr = 44 then set color 255, 40, 255
    if clr = 45 then set color 255, 50, 255
    if clr = 46 then set color 255, 60, 255
    if clr = 47 then set color 255, 70, 255
    if clr = 48 then set color 255, 80, 255       
    if clr = 49 then set color 255, 90, 255
        if clr = 50 then set color 255, 200, 255
    if clr = 51 then set color 10, 255, 0
    if clr = 52 then set color 20, 255, 0
    if clr = 53 then set color 30, 255, 0
    if clr = 54 then set color 40, 255, 0
    if clr = 55 then set color 50, 255, 0
    if clr = 56 then set color 60, 255, 0
    if clr = 57 then set color 70, 255, 0
    if clr = 58 then set color 80, 255, 0
    if clr = 59 then set color 90, 255, 0       
    if clr = 60 then set color 100, 255, 0
    if clr = 61 then set color 0, 255, 10
    if clr = 62 then set color 0, 255, 20
    if clr = 63 then set color 0, 255, 30
    if clr = 64 then set color 0, 255, 40
    if clr = 65 then set color 0, 255, 50
    if clr = 66 then set color 0, 255, 60
    if clr = 67 then set color 0, 255, 70
    if clr = 68 then set color 0, 255, 80
    if clr = 69 then set color 0, 255, 90       
    if clr = 70 then set color 0, 155, 0


                  
endproc




  

function  ChangeColor(n)
    blue = blue + n
    if blue > 255 then blue = blue - 150
        red = red + n
    if red > 255 then red = red - 200
        green = green + n
    if green > 255 then green = green - 230

    if blue < 90 then blue = blue + 100
    if red < 70 then red = red + 80
    if green < 50 then green = green + 50




    set color  red,green,blue

 endfunc


function  RotateRight(n#)
         Angle# = Angle# + n#

               if  Angle# > 360.0   then  Angle# = Angle# - 360.0 
               if  Angle# = 360.0    then  Angle# = 0.0


endfunc

function  RotateLeft(n#)
         if  Angle# = n#  
               Angle# = 0.0
               n# = 0.0
         endif
         if  Angle# > n# 
           Angle# = Angle# - n#
         else 
           Angle# = n# - Angle# 
           Angle# = 360.0 - Angle#
         endif
endfunc

                rem  math degrees = 450 - compass degrees
function  GetAngle# (n#)  ;       rem  input compass degrees, output math degrees                            
    n# = 450.0 - n#
    if n# = 450.0 then n# = 90.0
    if n# > 450.0 then n# = n# - 360.0
 
    return n#
endfunc

function  MoveSteps ( t# )                          
      lx = 0 ; ly  = 0 ; lx2  =  0 ; ly2  =  0                             
                                              
     x1#  =  500.0  + PenX#                               
     y1#  =  300.0  - PenY#                                
     Angle2#  =  GetAngle#  ( Angle# )                        
     dx# = cos (Angle2#)                                         
     dy# = sin (Angle2#) 
     x2#  =  x1#  +  ( dx# * t# )
     y2#  =  y1#  -   (dy# * t# )
     lx = int(x1#)  ;  lx2 = int(x2#)  ;  ly = int(y1#)  ;  ly2 = int(y2#)
     if pendown = 1   then   draw line lx,ly,lx2,ly2 
     PenX# = PenX# + (dx# * t#)  
     PenY# = PenY# + (dy# * t#)
     return lx
 endfunc

 

Make a free website with Yola