REM This program will generate a macro
REM to draw a sign wave in GFA DRAFT plus 3
REM
REM This demo was written in GFA BASIC
REM
REM Try values of x=100, y=200, a=100, w=100
REM Remember that the scale of the drawing can not be controlled
REM by macro,and will be as set.
REM
REM LCP 25.4.90
REM
OPEN "O",#1,"WAVEFORM.MAC"
INPUT "Start point X :";x
INPUT "Start point Y :";y
INPUT "Amplitude     :";a
INPUT "Wavelength    :";w
w=w/360
PRINT w
PRINT #1,"MA ";x;",";y
FOR i=0 TO 6.28 STEP 0.01745
  x=x+w
  z=y+(a*SIN(i))
  x=ROUND(x,2)
  z=ROUND(z,2)
  PRINT #1,"DA";x;
  PRINT #1,",";
  PRINT #1,z
NEXT i
CLOSE #1
