{"id":578,"date":"2012-11-12T15:42:54","date_gmt":"2012-11-12T15:42:54","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/?p=578"},"modified":"2012-11-12T15:42:54","modified_gmt":"2012-11-12T15:42:54","slug":"nature-amoeba-tree","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/12\/nature-amoeba-tree\/","title":{"rendered":"Nature? Amoeba Tree!"},"content":{"rendered":"<p><script type=\"application\/processing\">\r\n\/\/Info: http:\/\/processingjs.org\/reference\r\nint baseAngle = 40;\r\nint maxAngle = 720;\r\n\r\nvoid setup()\r\n{\r\n  size(800, 800);\r\n  \r\n  strokeWeight(.25);\r\n  makeLines(width\/1.5, height\/1.65, height\/5, baseAngle);\r\n}\r\n\r\n\r\nvoid makeLines(float x1, float y1, float leng, int angle)\r\n{\r\n  if ((angle < -maxAngle) || (angle > maxAngle)) return;\r\n  \r\n  float x2 = x1 + (cos(radians(angle+90))*leng);\r\n  float y2 = y1 - (sin(radians(angle+90))*leng);\r\n  line(x1, y1, x2, y2);\r\n  \r\n  makeLines(x2, y2, leng\/1.2, angle+baseAngle);\r\n  \r\n  x2 = x1 + (cos(radians(angle))*leng);\r\n  y2 = y1 - (sin(radians(angle))*leng);\r\n  line(x1, y1, x2, y2);\r\n  \r\n  makeLines(x2, y2, leng\/1.2, angle+baseAngle);\r\n}\r\n<\/script><\/p>\n<p>This uses recursion! It was a pain to make, and it&#8217;s still not exactly what I wanted, but it looks neat. Some numbers can be changed in the code to completely change the look, density, and shape of the blob.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This uses recursion! It was a pain to make, and it&#8217;s still not exactly what I wanted, but it looks neat. Some numbers can be changed in the code to completely change the look, density, and shape of the blob.<\/p>\n","protected":false},"author":11,"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\/578"}],"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\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/comments?post=578"}],"version-history":[{"count":1,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/578\/revisions"}],"predecessor-version":[{"id":580,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/578\/revisions\/580"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/media?parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/categories?post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/tags?post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}