{"id":187,"date":"2015-06-18T05:42:51","date_gmt":"2015-06-18T01:42:51","guid":{"rendered":"http:\/\/courses.haigarmen.com\/creativecoding\/?p=187"},"modified":"2015-06-18T05:42:51","modified_gmt":"2015-06-18T01:42:51","slug":"exercise-36","status":"publish","type":"post","link":"https:\/\/courses.haigarmen.com\/creativecoding\/exercise-36\/","title":{"rendered":"Exercise 36"},"content":{"rendered":"<p>Now let&#8217;s apply the same approach to a circle:<\/p>\n<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\nstroke(0, 30);\r\nnoFill();\r\nellipse(centX, centY, radius*2, radius*2);\r\nstroke(20, 50, 70);\r\nfloat x, y;\r\nfloat lastx = -999;\r\nfloat lasty = -999;\r\n\r\nfor (float ang = 0; ang <= 360; ang += 5) {\r\n  float rad = radians(ang);\r\n  x = centX + (radius * cos(rad));\r\n  y = centY + (radius * sin(rad));\r\n  point(x, y);\r\n}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Now let&#8217;s apply the same approach to a circle: 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); float x, y; float lastx = -999; float lasty = -999; for (float ang = 0; ang<\/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-187","post","type-post","status-publish","format-standard","hentry","category-lessons"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/187","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=187"}],"version-history":[{"count":1,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":188,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/187\/revisions\/188"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}