Example with a model-driven graph

Here you see a model-driven graph. The model simulates the dynamical behaviour of the aorta.

A solution in programming is:

<SCRIPT>
function run()
{
 t = 0.0;
 time = 0.0;
 dt = 0.02;
 f = 1.0;
 vao = 80.0;
 pao = 80.0;
 qao = 80.0;
 qp = 70.0;
 plv = 0.0;
 rp = 1.25;
 cao = 1.1;
 plvmax = 120.0;
 time = Math.round(0);
 y1 = Math.round(plv);
 y2 = Math.round(pao);

 for (i=1; i<400; i++)
   {
      document.kaderA.setGrafiek1YT1(time,y1);
      document.kaderA.setGrafiek2YT1(time,y2);

      t = t + dt;
      plv = plvmax*Math.sin(3.14*f*t);  
      if (plv <= 0.0) {plv = 0};
      qao = 33.0 * (plv-pao);
      if ((plv-pao) <= 0.0) {qao = 0.0};
      vao = vao + (qao-qp)*dt;
      qp = pao/rp;
      pao = vao/cao;

      time = Math.round(i);
      y1 = Math.round(plv);  
      y2 = Math.round(pao);  

      document.kaderA.setGrafiek1YT2(time,y1);
      document.kaderA.setGrafiek2YT2(time,y2);
   }
}
</SCRIPT>
In html you need:
<APPLET
    CODE=grafiekYT.class
    NAME=kaderA
    WIDTH=460
    HEIGHT=185 >
    <param name="BackColor" value="255,255,255">
    <param name="GridColor" value="0,0,0">
    <param name="Graph1Color" value="255,0,0">
    <param name="Graph2Color" value="0,0,255">
    <param name="GridT"  value="4">
    <param name="GridY"  value="3">

    <param name="Y1min"  Value="0">
    <param name="Y1max"   Value="150">
    <param name="Y1text"  Value="Pao(t) rood van 0 tot +150">

    <param name="Y2min"  Value="0">
    <param name="Y2max"  Value="150">
    <param name="Y2text"  Value="Plv(t) blauw van 0 tot +150">
   
    <param name="Tmin"  Value="0">
    <param name="Tmax"  Value="400">
</APPLET>

Enschede, 1 dec. 2000; update: nov. 2003.