PROGRAM gdemo;   { Graf-Demo }

VAR i, j : integer;

{$I GRAPHICS.INC }

BEGIN { gdemo }
  clrgbs;
  clrtbs;

  printat (2, 2, 'Demo 1');
  penup;
  moveto (10, 105);
  turnto (90);
  pendown;
  i := 2;
  REPEAT
    FOR j := 1 TO 8 DO
      BEGIN
        move (i);
        turnright (45)
      END;
    i := i+1;
    move (7);
  UNTIL i > 35;

  printat (42, 14, 'Demo 2');
  printat (42, 15, 'f(x)=x*sin(x)*sin(10*x)');
  quad (0, 0, 639, 199);
  line (0, 100, 639, 100);
  line (320, 0, 320, 199);
  line (320, 50, 639, 50);
  penup;
  FOR i := 0 TO 319 DO
    BEGIN
      moveto (i+320, round (50+i/8*sin (i/50)*sin (i/5)));
      pendown
    END;

  printat (42, 2, 'Demo 3');
  FOR i := 0 TO 5 DO
    kasten (330+i*50, 120, 25, random (60));
  printat (42, 12, '  80    81    82    83    84    85');

  printat (2, 14, 'Demo 4');
  FOR i := 0 TO 30 DO
    line (300-i, 2+3*i, 20+5*i, 85-2*i);

  hardcopy2

END.  { gdemo }