home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / GRAPHICS / PLOT / SURFUTI3.ZIP / FUNC3D.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1986-09-06  |  538 b   |  26 lines

  1. program FUNC3D;
  2.  
  3. { Create a 3-D function file for display via SOLMODL }
  4.  
  5. var Filout: text;
  6.     i, j: integer;
  7.     x, y, z: real;
  8.  
  9. begin
  10.   assign (Filout, 'PARABOLA.DAT');
  11.   rewrite (Filout);
  12.   writeln (Filout, 21, ',', 21);          { grid size }
  13.  
  14.   x := -1.0;
  15.   for i := 1 to 21 do begin
  16.     y := -1.0;
  17.     for j := 1 to 21 do begin
  18.       z := x * x + y * y;
  19.       writeln (Filout, x:7:3, ',', y:7:3, ',', z:7:3);
  20.       y := y + 0.1;
  21.     end;
  22.     x := x + 0.1;
  23.   end;
  24.   close (Filout);
  25. end.  { program FUNC3D }
  26.