home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
library
/
pb
/
library1
/
rmex290.bas
< prev
next >
Wrap
BASIC Source File
|
1990-04-03
|
519b
|
18 lines
SCREEN 1 'set med-res graghics mode
pi = ATN(1) * 4 'calculate pi
VAL1 = 5
VAL2 = 6
steps = 400
WINDOW (-1,1) - (1,-1) 'orgin at middle
' go around the circle once
FOR theta = 0 TO 2 * pi STEP 2 * pi/steps
'circles with unity radius
radius = COS(2 * theta)
'translate to Cartesian
x = radius * COS(VAL1 * theta)
'coordinates with a twist
y = radius * SIN(VAL2 * theta)
PSET(x,y) 'set a pixel
NEXT theta
WHILE NOT INSTAT : WEND
END