Modeling2.html
From 2013.igem.org
(Difference between revisions)
Line 291: | Line 291: | ||
}; | }; | ||
+ | |||
+ | |||
+ | var s = 9; | ||
+ | |||
+ | var drawYeast = function(xx, yy){ | ||
+ | fill(194, 85, 72); | ||
+ | noStroke(); | ||
+ | ellipse(xx + 5 , yy + 5 , 20, 20); | ||
+ | ellipse(xx, yy, 20, 20); | ||
+ | }; | ||
+ | |||
+ | var drawBacteria = function(xx, yy){ | ||
+ | translate(xx, yy); | ||
+ | rotate(3.14*4/3); | ||
+ | // | ||
+ | strokeWeight(2); | ||
+ | fill(124, 159, 139); | ||
+ | stroke(111, 96, 86); | ||
+ | rect(-s, -s/2, s*2, s, s); | ||
+ | |||
+ | strokeWeight(1); | ||
+ | noFill(); | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | flagellum(-s, 0, 0, 0.25 * frameCount % 360); | ||
+ | flagellum(-s, -1, -3, 30 + 0.25 * frameCount % 360); | ||
+ | flagellum(-s, 1, 3, 60 + 0.25 * frameCount % 360); | ||
+ | flagellum(-s, 0, 2, 90 + 0.25 * frameCount % 360); | ||
+ | flagellum(-s, 0, -2, 90 + 0.25 * frameCount % 360); | ||
+ | resetMatrix(); | ||
+ | // if (!dead){ | ||
+ | // lastF++; | ||
+ | // } | ||
+ | }; | ||
+ | |||
+ | |||
}; | }; |
Revision as of 23:37, 27 September 2013