Template:Team:Paris Saclay/simbox

From 2013.igem.org

(Difference between revisions)
Line 387: Line 387:
function simbox_draw_graph(simid)
function simbox_draw_graph(simid)
{
{
-
var sim= simulations[simid];
 
-
var canv= sim.canv;
 
-
var ctx= sim.ctx;
 
-
for(var i= 0 ; i < sim.molecules.length ; ++i)
 
-
{
 
-
  if(sim.mulecules[i].curve_show)
 
-
  {
 
-
  var dta= sim.mulecules[i].history;
 
-
  if(dta.length < 2) continue;
 
-
  ctx.moveTo( simbox_drawXcoord(simid, 0), simbox_drawYcoord(simid, dta[0]) );
 
-
  for(var ti= 1 ; ti < dta.length ; ++ti)
 
-
    ctx.lineTo( simbox_drawXcoord(simid, ti*sim.timestep), simbox_drawYcoord(simid, dta[ti]) );
 
-
  ctx.stroke();
 
-
  }
 
-
}
 
}
}

Revision as of 01:03, 3 August 2013