Modeling2.html

From 2013.igem.org

(Difference between revisions)
Line 428: Line 428:
     mouseOverSlider = false;  
     mouseOverSlider = false;  
};
};
 +
 +
 +
//Setting up arrows to be in Vector field
 +
    /*Vector Field */
 +
    var arrows =  [];
 +
    var funcX = xMin + dx/2; /* Start X */
 +
    var funcY = yMin + dy/2;
 +
    var graphX = graphxMin + boxWidth/2;
 +
    var graphY = graphyMin - boxHeight/2;
 +
    var maxLength = 0;
 +
    var count = 0;
 +
 +
    /*This is for finding the actual values in the x and y direction*/
 +
    for (var k = 0; k < arrowsinRow; k++) {
 +
        for (var l = 0; l < arrowsinCol; l++){
 +
            arrows.push(new arrow(funcX, funcY, graphX, graphY));
 +
            arrows[count].calculate();
 +
            funcX += dx;
 +
            graphX+= boxWidth;
 +
 +
            /* Find Max Length to scale arrow lengths */
 +
            if (maxLength < arrows[count].length) {
 +
                maxLength = arrows[count].length;
 +
            }
 +
            count++;
 +
        }
 +
          funcY += dy;
 +
          funcX = xMin + dx;
 +
          graphX = graphxMin + boxWidth/2;
 +
          graphY -= boxHeight;
 +
    }
 +
 +
 +
    var nullClines = [];
 +
    nullClines.push(new odeSolution(1.001, 1.001));
 +
    nullClines.push(new odeSolution(0.999, 0.999));
 +
    nullClines[0].calculate();
 +
    nullClines[1].calculate();
var draw = function(){
var draw = function(){

Revision as of 00:03, 28 September 2013

iGEM