home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / pascal / library / dos / grafik / gp / graphdmo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-05-23  |  1.3 KB  |  48 lines

  1. Program Graphdmo;
  2. USES GP;
  3. VAR
  4.   Theta : REAL;
  5.   J : INTEGER;
  6. BEGIN
  7.   BeginGraphic(Gdrvr, Gmode);
  8.  
  9.   DefineWindow(1,0,33,50,100);
  10.   MakeWorldAndAxes(1,1,0,12*Pi,-10,10,Green,Green,
  11.              'X',Cyan,'Damped Sin(X)',Cyan,'Window 1',White);
  12.  
  13.   DefineWindow(2,34,66,50,100);
  14.   MakeWorldAndAxes(2,2,0,12*Pi,-20,20,Blue,Blue,
  15.              'X',Cyan,'Damped Sin(X)',Cyan,'Window 2',White);
  16.  
  17.   DefineWindow(3,67,100,50,100);
  18.   MakeWorldAndAxes(3,3,0,12*Pi,-30,30,Red,Red,
  19.              'X',Cyan,'Damped Sin(X)',Cyan,'Window 3',White);
  20.  
  21.   DefineWindow(4,0,33,0,49);
  22.   MakeWorldAndAxes(4,4,0,12*Pi,-40,40,Yellow,Yellow,
  23.              'X',Cyan,'Damped Sin(X)',Cyan,'Window 4',White);
  24.  
  25.   DefineWindow(5,34,66,0,49);
  26.   MakeWorldAndAxes(5,5,0,12*Pi,-50,50,LightGray,DarkGray,
  27.              'X',Cyan,'Damped Sin(X)',Cyan,'Window 5',White);
  28.  
  29.   DefineWindow(6,67,100,0,49);
  30.   MakeWorldAndAxes(6,6,0,12*Pi,-60,60,White,White,
  31.              'X',Yellow,'Damped Sin(X)',Green,'Window 6',Magenta);
  32.  
  33.   Theta := 0.0;
  34.  
  35.   WHILE Theta <= 12*Pi DO
  36.   BEGIN
  37.     For J := 1 to 6 DO
  38.     BEGIN
  39.       SelectWindow(J);
  40.       SelectWorld(J);
  41.       PlotPoint(Theta, j*10*Exp(-J*Theta/40)*Sin(J*Theta),J);
  42.     END;
  43.     Theta := Theta + 0.01;
  44.   END;
  45.   ReadLn;
  46.   EndGraphic;
  47. END.
  48.