home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sibdemo3.zip / SAMPLES.DAT / SAMPLES / PLOT2D / PLOT2D.PAS < prev    next >
Pascal/Delphi Source File  |  1997-08-07  |  898b  |  43 lines

  1. Program plot2d;
  2.  
  3. {
  4. Speedsoft Sibyl for OS/2
  5.  
  6.                 DEMO PROGRAM
  7.                   July 1997
  8.  
  9. Author:  Alex T. Vermeulen (atverm@xs4all.nl)
  10.  
  11. This program demonstrates some features of Sibyl:
  12.  
  13.         -Printing
  14.         -Selecting Printers and setting parameters
  15.         -Graphing
  16.         -Timers
  17.         -Instantaneous screen updates after user selections
  18. }
  19.  
  20. Uses
  21.   Forms, Graphics, XY, about;
  22.  
  23. {$r plot2d.scu}
  24.  
  25. var
  26.   t : longint;
  27. Begin
  28.   Application.Create;
  29.   Application.CreateForm (TXYplot, XYPlot);
  30.   Application.CreateForm (TAboutForm, AboutForm);
  31.   getmem(xyplot.xdata,sizeof(double)*1000);
  32.   getmem(xyplot.ydata,sizeof(double)*1000);
  33.   xyplot.nrp:=1000;
  34.   for t:=1 to 1000 do
  35.   begin
  36.     xyplot.xdata^[t]:=t/5.0-100;
  37.     xyplot.ydata^[t]:=10.0*sin(t/1000.0*2*pi);
  38.   end;
  39.   AboutForm.ShowModal;
  40.   Application.Run;
  41.   Application.Destroy;
  42. End.
  43.