Example for drawing or plotting lines

You see a line, driven by calculated data:
function grafiek()
{
 y1 = 0.0;
 y2 = 0.0;
 t = 0.0;

 for (i=1; i<100; i++)
 {
      document.graph3.setGrafiek1XY1(Math.round(t),Math.round(y1));
      document.graph3.setGrafiek2XY1(Math.round(t),Math.round(y2));
      t = t + 1;
      y1 = y1 + 1.0;        
      y2 = y2 - 1.0;        
      document.graph3.setGrafiek1XY2(Math.round(t),Math.round(y1));
      document.graph3.setGrafiek2XY2(Math.round(t),Math.round(y2));
 }
}


Enschede, 2000; updated: nov. 2004