Commit 9bb12a3f by kollo

small update + mandala.bas

parent dab80c81
Examples how to mix X11-Basic and C
===================================
Makefile Makefile for the examples below
c-demo.c Demonstration on how to use the x11basic library within a C main() program
c-demo2.c Demonstration on how to use the x11basic library and xbc compiled object code within c
library.bas example, how to produce .o linkabel object files
......@@ -11,6 +11,7 @@
' 01.2013: adapted to new **program structure
' 03.2013: added new compile flags -L and --pseudo
' 03.2014: corrected bug with -s (strip) MH
' 01.2016: added prefix macro to library path MH
'* This file is part of X11BASIC, the basic interpreter for Unix/X
'* ======================================================================
......
'Mandala by Antoni gual
'for Rel's 9 LINER contest at QBASICNEWS.COM 1/2003
'------------------------------------------------------------------------
TEXT 0,16,"Mandala by Antoni gual"
DIM palette%(16)
FOR i%=0 TO 15
palette%(i%)=COLOR_RGB((i% + 1)/16,0,0)
NEXT i%
' 1 SCREEN 12
2:
v%=RND()*20+10
DIM VX%(v%+2),VY%(v%+2)
FOR d1%=-1 TO v%
FOR d2%=d1%+1 TO v%
IF d1% = -1
VX%(d2%) = 320 + (SIN(6.283185 * (d2% / v%)) * 200)
ELSE
COLOR palette%(v% MOD 16)
LINE VX%(d1%),VY%(d1%),VX%(d2%),VY%(d2%)
endif
IF d1% = -1
VY%(d2%) = 200 + (COS(6.283185 * (d2% / v%)) * 200)
endif
NEXT d2%
NEXT d1%
SHOWPAGE
PAUSE 0.1
IF LEN(INKEY$) = 0
GOTO 2
ENDIF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment