Ooops
February 27, 2021, 04:11:30 AM

Author Topic: micro(A) Interpreter  (Read 11346 times)

Offline Aurel

  • Full Member
  • ***
  • Posts: 218
Re: o2Basic - micro(A) Interpreter
« Reply #120 on: February 02, 2021, 07:44:49 AM »
'current month bio-rythm in micro(A)
var lx1 ,ly1 ,lx2 ,ly2, f, y, startx, stopx
var dd ,mm ,yy ,cd, cm, cy, bd, bm, by,dx,n
'set maincolor
wcolor 100, 60, 0 : fcolor 220, 200, 130
print 20,5,"Ubuntu Bio - Rythm"
'call draw raster fn
drawRaster()

'current date
cd=21
cm=2
cy=2021
'user birthday
bd=8
bm=5
by=1969
'call 3 func...
testDD()
testMM()
testYY()
'show days..
showDays()

func drawRaster()
fcolor 100, 140, 110 : rect 20, 40, 601, 240
lx1=20 :lx2=620 : ly1=60
'horizontal lines ...........................
while ly1 < 280
   ly2=ly1
   line lx1, ly1, lx2, ly2

ly1 = ly1 + 20
wend

ly1=40
ly2=240
'vertical lines.............................
while lx1 < 620
   lx2=lx1
   line lx1, ly1, lx2, ly2

lx1=lx1+20
wend

swap
endfn

func testDD()
'test dd
dd=cd-bd
fcolor 255,100,100 : print 40,262,dd
'phisical curve...
startx = 20 : f = startx: stopx = 620 : fColor 255,100,100
 while f < stopx
   y = 140 + 50*sin(f/30+dd)
   pset f,y
f=f+1
swap
wend

endfn

func testMM()
'test mm
mm=cm-bm
fcolor 100,240,100 : print 80,262,mm
'mental curve...
startx = 20 : f = startx: stopx = 620 : fColor 100,240,100
 while f < stopx
   y = 140 + 50*sin(f/(30+dd))
   rect f,y,4,4
f=f+6
swap
wend

endfn

func testYY()
'test mm
yy=cy-by
fcolor 100,240,240 : print 120,262,yy
'emotional curve...
startx = 20 : f = startx: stopx = 620 : fColor 100,240,240
 while f < stopx
   y = 140 + 50*sin(f/(30+yy))
   circle f,y,3
f=f+6
swap
wend

endfn

func showDays()
dx=30 : n=1 : fcolor 100,150,220
while dx < 620
   print dx,240,n
   n=n+1
dx=dx+20
wend

endfn



Offline Aurel

  • Full Member
  • ***
  • Posts: 218
Re: micro(A) Interpreter
« Reply #121 on: February 21, 2021, 03:26:53 PM »
bio rythm in mA

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal