{"id":543,"date":"2012-11-12T15:30:24","date_gmt":"2012-11-12T15:30:24","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/?p=543"},"modified":"2012-11-12T15:30:24","modified_gmt":"2012-11-12T15:30:24","slug":"abnormal-tomato","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/12\/abnormal-tomato\/","title":{"rendered":"Abnormal Tomato"},"content":{"rendered":"<p>I first tried to create a tomato that shrinks and spins as it reaches the bottom.  Some other ideas were to have the tomato become darker as a fly approached the tomato. <\/p>\n<p><script type=\"application\/processing\">\r\n\r\n\r\nvoid setup () {\r\n  size(600, 600);\r\n  background(87);\r\n  strokeWeight(5);\r\n  smooth();\r\n}\r\n\r\nvoid draw() {\r\n  \/\/if (mouseX < weidth) {\r\n  float radius = 100;\r\n  int centX = 400;\r\n  int centY = 400;\r\n\r\n  stroke(0, 30);\r\n  fill(234, 14, 14);\r\n  ellipse(centX, centY, radius*4, radius*2);\r\n  stroke(20, 50, 70);\r\n  strokeWeight(1);\r\n  float x, y;\r\n  float noiseval = random(60);\r\n\r\n  beginShape();\r\n  fill(13, 108, 17);\r\n  for (float ang = 0; ang <= 360; ang += 1) {\r\n\r\n    noiseval += 0.1;\r\n    float radVariance = 30 * customNoise(noiseval);\r\n\r\n    float thisRadius = radius + radVariance;\r\n    float rad = radians(ang);\r\n    x = centX + (thisRadius * cos(rad));\r\n    y = centY + (thisRadius * sin(rad));\r\n\r\n    curveVertex(x, y);\r\n  }\r\n  endShape();\r\n}\r\n\r\nfloat customNoise(float value) {   \r\n  float retValue = pow(sin(value), 3);\r\n  return retValue;\r\n}\r\n\r\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I first tried to create a tomato that shrinks and spins as it reaches the bottom. Some other ideas were to have the tomato become darker as a fly approached the tomato.<\/p>\n","protected":false},"author":20,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/543"}],"collection":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/users\/20"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/comments?post=543"}],"version-history":[{"count":1,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/543\/revisions"}],"predecessor-version":[{"id":564,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/543\/revisions\/564"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/media?parent=543"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/categories?post=543"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/tags?post=543"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}