home *** CD-ROM | disk | FTP | other *** search
- sys(36)=0
- SYS(29)=1
-
- x1=10
- y1=10
- >PRESETPOINT 1
- SETPOINT "SET STARTING POSITION: " 1
- POINTVAL X1 Y1 1
-
- ' Begin at Cursor Position
- REGEN
- SYS(1)=0
-
- INPUT "Wavelength: ", WAVELEN
- INPUT "Amplitude: ", AMP
- INPUT "Number of Waves: ", NWAVES
-
- DX =(WAVELEN * 15/360)
- X = X1-DX
-
- NPTS = 0 ' Number of points so far
- >PRESETPOINT 200
- FOR J = 0 TO NWAVES - 1
- FOR K = 0 TO 359 STEP 15
- ' Set a point every 15 degrees
- X = X + DX
- Y = Y1 + SIN(K) * AMP / 2
- >POINTXY 1,[X,Y]
- NPTS = NPTS + 1
-
- ' If there are too many points, draw and set more points
- IF NPTS >= 200 THEN
- >CURVE
- >PRESETPOINT 200
- NPTS = 1
- >POINTXY 1,[X, Y]
- ENDIF
-
- NEXT
- NEXT
-
- ' Set the last point and draw
- X = X + DX
- Y = Y1
- >POINTXY 1,[X, Y]
- >CURVE
-