program PltTest;

  { Demo of Plt unit: draws K_20 }
  { Last edited by J. Stolfi on 93-04-20. }

uses Crt, Plt, Graph;

const
  n = 20;
  radius = 50.0;

var
  i, j: integer;
  t: real;
  x, y: array [1..n] of real;

begin
  plt_begin_drawing('PltTest.ps', 'sensei', 1);
  for i := 1 to n do
    begin
      t := 2.0 * Pi * (i/n);
      x[i] := radius * cos(t);
      y[i] := radius * sin(t);
      plt_draw_point(x[i], y[i], 1.0, 0.0);
    end;
  for i := 1 to n-1 do
    for j := i+1 to n do
      plt_draw_segment(x[i], y[i], x[j], y[j],  0.0, 0.0);

  plt_add_caption('This is a test. Repeat, it''s only a test.');
  plt_end_drawing;
end.
