import std.math;
import Dislin;

void main (string[] args)
{ int i, n = 100;
  float [100] xray, y1ray, y2ray;
  double step, fpi;

  step = 360.f / (n-1);
  fpi = 3.1415926/180;

  for (i = 0; i < 100; i++)
  { xray[i] = i * step;
    y1ray[i] = sin (xray[i] * fpi);
    y2ray[i] = cos (xray[i] * fpi);
  }
    
  metafl ("xwin");
  disini ();
  hwfont ();
  pagera ();

  axspos (450, 1800);
  axslen (2200, 1200);

  name ("X-axis", "x");
  name ("Y-axis", "y");

  labdig (-1, "x");
  ticks (10, "xy");

  titlin ("Demonstration of CURVE", 1);
  titlin ("SIN(X), COS(X)", 3);

  graf (0.f, 360.f, 0.f, 90.f, -1.f, 1.f, -1.f, 0.5f);
  title ();

  color ("red");
  curve (cast (float *) xray, cast (float *) y1ray, n);
  color ("green");
  curve (cast (float *) xray, cast (float *) y2ray, n);

  color ("fore");
  dash ();
  xaxgit ();
  disfin ();
}
