Template:Team:UC Davis/MutantWidget

From 2011.igem.org

(Difference between revisions)
Line 450: Line 450:
var bli = kx+(ky+1)*thisdatax.length;
var bli = kx+(ky+1)*thisdatax.length;
var bri = kx+1+(ky+1)*thisdatax.length;
var bri = kx+1+(ky+1)*thisdatax.length;
-
alert(thisdataz.length);
+
if(!thisdataz[bli] || !thisdataz[tli] || thisdataz[tri] || thisdataz[bri])
-
if(!thisdataz[bli])
+
{
{
-
alert("Porblem!\nkx:" + kx + "\nky:" + ky + "\nkx is a "+typeof(kx) + "\nky is a" +typeof(ky) + "\nindex:" + bli+"\nz:"+thisdataz[kx+(ky+1)*thisdatax.length]);
+
alert("Porblem!\nkx:" + kx + "\nky:" + ky + "\nkx is a "+typeof(kx) + "\nky is a" +typeof(ky) + "\nindex:" + bli+"\nz:"+thisdataz[kx+(ky+1)*thisdatax.length] + "\nset:" + index);
}
}
-
alert(thisdataz[bli]);
 
thisz = interp2(thisdatax[kx],  
thisz = interp2(thisdatax[kx],  
thisdatay[ky],  
thisdatay[ky],  
thisdatax[kx+1],  
thisdatax[kx+1],  
thisdatay[ky+1],  
thisdatay[ky+1],  
-
thisdataz[kx+ky*thisdatax.length],
+
thisdataz[tli],
-
thisdataz[kx+ky*thisdatax.length+1],
+
thisdataz[tri],
-
thisdataz[kx+(ky+1)*thisdatax.length],
+
thisdataz[bli],
-
thisdataz[kx+1+(ky+1)*thisdatax.length], thisx, thisy)
+
thisdataz[bri], thisx, thisy)
data_3d[index].vertices[j*numxpoints+i].position.z = thisz/axisdimensions[5]*100;
data_3d[index].vertices[j*numxpoints+i].position.z = thisz/axisdimensions[5]*100;
}
}

Revision as of 04:55, 26 September 2011