home *** CD-ROM | disk | FTP | other *** search
- 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