You are not logged in or registered. Please login or register to use the full functionality of this board...
SIGN IN Join Our Community For FREE


Biorythm
05-04-2017, 02:20 AM
Post: #1
 (Print Post)
Biorythm
This is simple biorythm program written in ABasic:

Code Snippet: [Select]
' test biorythm...
DEFNUM a[30] i x index v
DEFNUM lx1 ly1 lx2 ly2
DEFNUM dd mm yy cd cm cy bd bm by
DEFNUM f y startx stopx
'open window
WIN 0 0 640 360 WS_CAPTION "Test Biorythm"
'set maincolor
MainColor 100 60 0
FrontColor 220 200 130
'current date 23 09 2010

FOR index = 0 TO 29
v=v+1
SETNUMDIM a.index = v
NEXT index

x=0
'print 30 elements
FOR i = 0 TO 29
x=x+20
PRINT x 242 a.i
NEXT i

Gosub raster
'--------------
cd=20
cm=11
cy=2011
'--------------
bd=8
bm=5
by=1969
'--------------
NoSleep 1
Gosub test
NoSleep 0

' wait for event
WAIT

SUB raster
FrontColor 100 140 110
RECT 20 40 601 240
lx1=20
lx2=620
'horizontal lines
FOR ly1 = 60 TO 260 STEP 20
    ly2=ly1
    LINE lx1 ly1 lx2 ly2
NEXT ly1

ly1=40
ly2=240
'vertical lines
FOR lx1 = 40 TO 620 STEP 20
    lx2=lx1
    LINE lx1 ly1 lx2 ly2
NEXT lx1
FrontColor 100 180 110
LINE 20 140 620 140
RETURN

SUB test
'test dd
dd=cd-bd
PRINT 40 262 dd
'phisical
startx = 20
stopx = 620
FrontColor 255 100 100
FOR f = startx TO stopx
    y =140 + 50*SIN((f/30+dd))
    PSET f y
NEXT f

'test mm
mm=cm-bm
PRINT 80 262 mm
'phisical
startx = 20
stopx = 620
FrontColor 100 240 100
FOR f = startx TO stopx
    y =140 + 50*SIN(f/(30+mm))
    PSET f y
NEXT f

'test yy
yy=cy-by
PRINT 120 262 yy
'phisical
startx = 20
stopx = 620
FrontColor 100 240 240
FOR f = startx TO stopx
    y =140 + 50*SIN(f/(30+yy))
    PSET f y
NEXT f

RETURN


Attached File(s) Image(s)
   

basicPro forum:
http://basicpro.mipropia.com/smf/index.php
EU Radioboard forum:
http://euradioboard.createmybb3.com/index.php
AurelSoft main site:
http://aurelsoft.ucoz.com
Find all posts by this user
Like Post
05-04-2017, 08:59 AM
Post: #2
 (Print Post)
RE: Biorythm
I always wondered what raster means. Here it is setting up the grid?

So would grid lines be equivalent expression to a raster

Well let's look it up: (see attached)

hmm...


Attached File(s) Image(s)
   
Find all posts by this user
Like Post



Forum Jump:


User(s) browsing this thread: 1 Guest(s)




QB64 Member Project - Isolation
QB64 Member Project - Qubic
QB64 Member Project - Line Thickness
QB64 Member Project - Swirl
QB64 Member Project - Dakapo
QB64 Member Project - Blokus
QB64 Member Project - Red Scrolling LED Sign
QB64 Member Project - Martin Fractals version four
QB64 Member Project - Point Blank
QB64 Member Project - Amazon
QB64 Member Project - Splatter
QB64 Member Project - Spiro Roses
QB64 Member Project - Overboard
QB64 Member Project - 9 Board
QB64 Member Project - Kobolts Monopoly
QB64 Member Project - Domain
QB64 Member Project - Rotating Background
QB64 Member Project - Basic Dithering
QB64 Member Project - Martin Fractals version one
QB64 Member Project - Spinning Color Wheel
QB64 Member Project - Kings Valley verion one
QB64 Member Project - Inside Moves
QB64 Member Project - Foursight
QB64 Member Project - Touche
QB64 Member Project - Score 4
QB64 Member Project - Bowditch curve
QB64 Member Project - Input
QB64 Member Project - Color Rotating Text
QB64 Member Project - Rubix's Magic
QB64 Member Project - OpenGL Triangles
QB64 Member Project - Sabotage
QB64 Member Project - Pivet version one
QB64 Member Project - Martin Fractals version three
QB64 Member Project - Connect Four
QB64 Member Project - Othello
QB64 Member Project - STxAxTIC 3D World
QB64 Member Project - Kings Vallery version two
QB64 Member Project - Color Triangles
QB64 Member Project - ARB Checkers
QB64 Member Project - Dreamy Clock
QB64 Member Project - Martin Fractals version two
QB64 Member Project - Quarto
QB64 Member Project - Algeria Weather
QB64 Member Project - RGB Color Wheel
QB64 Member Project - Exit
QB64 Member Project - Pivot version two
QB64 Member Project - Kings Court
QB64 Member Project - MAPTRIANGLE
QB64 Member Project - Full Color LED Sign