rem  This program written by    Rick3137  for NaaLaa6
     
     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  ;  n1# = 1.0 ;  clr = 1 
Angle# = 0.0   ;  AngleR# = 120.0 ; c1 = 0 ; c2 = 0 ; d# = 0.0
hidden:
a = 0 ; b = 0          
   rem   Starts Program
     set redraw off

set window 0, 0, 1200, 700, true, 1
set color 25, 25, 40
cls
 redraw
set color 100, 0, 200
pendown = 1
 do 
      d# = 580.0
      c1 = 1
      c2 = 3
      n1# = 3.0
      Angle# = 0.0
      Angle2# = 90.0
      AngleR# = 0.0
 
   while cnt2 < 20

      PenX# = 0.0
      PenY# = 280.0
      Angle# = 0.0
    wait 900

    AngleR# = AngleR# + 0.5
    set color 25, 25, 40
    cls
    redraw
    set color 100, 0, 200
    cnt = 0

          while cnt < 360
         
            proc ChangeColor(1)
            proc RotateRight( 180.0 - AngleR# )
            proc MoveSteps ( 600.0 )
            cnt = cnt + 1
          wend
          if AngleR# > 30.0 then AngleR# = 2.0 ;  PenX# = 0.0  ; PenY# = 280.0
     
       set caret 10, 10    
       wln  " HIT SPACEBAR for "
       wln  " Next Screen or"
    wln  " ESC to Quit"
       redraw
       do; if keydown(27, true) then end; wait 10; until keydown(" ", true)
   
   
    wend
     

      redraw
      wln  " HIT SPACEBAR TO END "
       redraw
       wait keydown
       a = 1
       set color 25, 25, 60
       cls
       redraw
       set color 100, 0, 200
   
 until a > 0


    
        rem wait keydown
        end
 
     rem   This ends the program.


 

procedure  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

 endproc


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

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


endproc

procedure  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
endproc

                rem  math degrees = 450 - compass degrees
procedure  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
     Angle2# = n#
   
endproc

procedure  MoveSteps ( t# )                          
      lx = 0 ; ly  = 0 ; lx2  =  0 ; ly2  =  0                             
                                              
     x1#  =  500.0  + PenX#                               
     y1#  =  300.0  - PenY#                                
     proc  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#)
    
 endproc

 
Make a Free Website with Yola.