CMM2 demo programs


Author Message
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6206
Posted: 06:57am 22 May 2020      

I really need to get out more:

 'Lissajous by Antoni Gual
 ' for Rel's 9 LINER contest at QBASICNEWS.COM  1/2003
 ' converted to MMBasic for the CMM2 by TassyJim May 2020
 
 DIM col(15) ' GWBasic colours
 col(0) = RGB(BLACK)
 col(1) = RGB(BLUE)
 col(2) = RGB(GREEN)
 col(3) = RGB(CYAN)
 col(4) = RGB(RED)
 col(5) = RGB(MAGENTA)
 col(6) = RGB(150, 75, 0)    ' brown
 col(7) = RGB(192,192,192)   ' dull white
 col(8) = RGB(127,127,127)   ' grey
 col(9) = RGB(173, 216, 230) ' light blue
 col(10) = RGB(173, 216, 230)' light green
 col(11) = RGB(144, 238, 144)' light cyan
 col(12) = RGB(255, 100, 100)' light red
 col(13) = RGB(255, 120, 255)' light magenta
 col(14) = RGB(YELLOW)       ' yellow
 col(15) = RGB(WHITE)        ' bright white
 DIM INTEGER i , n
 DIM FLOAT k,l,j
 
 MODE 2,8
 DO
   CLS
   i = (i + 1) AND &HFFFFF
   k = 6.3 * RND()
   l = 6.3 * RND()
   n = (n + 1) MOD 15
   FOR j = 0 TO 100000
     PIXEL 320 + 300 * SIN(.01 * SIN(k) + j), 240 + 200 * SIN(.01 * SIN(l) * j), col(n + 1)
   NEXT j
 LOOP UNTIL INKEY$ <>""
 MODE 1,8


Give it time to cycle through a few patterns.

Jim