Team:Peking/drawingcurvetest

From 2013.igem.org

(Difference between revisions)
Line 58: Line 58:
document.getElementById("KphiPlus").onclick=function()        //increase Kphi
document.getElementById("KphiPlus").onclick=function()        //increase Kphi
{
{
-
   if(Kphi<1000)                                           
+
   if(Kphi<100)                                           
   {
   {
-
   Kphi=Kphi*2;
+
   Kphi=Kphi*1.2;
ctx.clearRect(0,0,c.width,c.height);
ctx.clearRect(0,0,c.width,c.height);
DrawCurve(ctx,convasheight,CorXmin,CorXmax,300,0.01,1000,Kphi,ncI);
DrawCurve(ctx,convasheight,CorXmin,CorXmax,300,0.01,1000,Kphi,ncI);
Line 70: Line 70:
document.getElementById("KphiMinus").onclick=function()  //decrease Kphi
document.getElementById("KphiMinus").onclick=function()  //decrease Kphi
{
{
-
   if(Kphi>0.1)
+
   if(Kphi>10)
   {
   {
-
   Kphi=Kphi/2;
+
   Kphi=Kphi/1.2;
ctx.clearRect(0,0,c.width,c.height);
ctx.clearRect(0,0,c.width,c.height);
DrawCurve(ctx,convasheight,CorXmin,CorXmax,300,0.01,1000,Kphi,ncI);
DrawCurve(ctx,convasheight,CorXmin,CorXmax,300,0.01,1000,Kphi,ncI);
Line 131: Line 131:
{
{
var A=1,
var A=1,
-
    nphi=0.71,
+
    nphi=1,
    KcI=10,
    KcI=10,
    y=0;
    y=0;

Revision as of 12:40, 24 September 2013

Your browser does not support the HTML5 canvas tag.

Kphi=

-

+

ncI=

-