{"id":189,"date":"2015-06-18T05:48:12","date_gmt":"2015-06-18T01:48:12","guid":{"rendered":"http:\/\/courses.haigarmen.com\/creativecoding\/?p=189"},"modified":"2015-06-18T05:54:47","modified_gmt":"2015-06-18T01:54:47","slug":"exercise-37","status":"publish","type":"post","link":"https:\/\/courses.haigarmen.com\/creativecoding\/exercise-37\/","title":{"rendered":"Exercise 37"},"content":{"rendered":"<pre><code>\r\nsize(500,300);\r\nbackground(255);\r\nstrokeWeight(5);\r\nsmooth();\r\n\r\nfloat radius = 100;\r\nint centX = 250;\r\nint centY = 150;\r\n\r\nstroke(0, 30);\r\nnoFill();\r\nellipse(centX,centY,radius*2,radius*2);\r\n\r\nstroke(20, 50, 70);\r\nradius = 10;    \r\nfloat x, y;\r\nfloat lastx = -999;\r\nfloat lasty = -999;\r\nfor (float ang = 0; ang <= 1440; ang += 5) {  \r\n  radius += 0.5;\r\n  float rad = radians(ang);\r\n  x = centX + (radius * cos(rad));\r\n  y = centY + (radius * sin(rad));\r\n  if (lastx > -999) {\r\n    line(x,y,lastx,lasty);\r\n  }\r\n  lastx = x;\r\n  lasty = y;  \r\n}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>size(500,300); background(255); strokeWeight(5); smooth(); float radius = 100; int centX = 250; int centY = 150; stroke(0, 30); noFill(); ellipse(centX,centY,radius*2,radius*2); stroke(20, 50, 70); radius = 10; float x, y; float lastx = -999; float lasty = -999; for (float ang = 0; ang -999) { line(x,y,lastx,lasty); } lastx = x; lasty = y; }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-189","post","type-post","status-publish","format-standard","hentry","category-lessons"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/189","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/comments?post=189"}],"version-history":[{"count":2,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/189\/revisions"}],"predecessor-version":[{"id":191,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/189\/revisions\/191"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/media?parent=189"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/categories?post=189"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/tags?post=189"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}