{"id":119,"date":"2015-06-17T03:54:21","date_gmt":"2015-06-16T23:54:21","guid":{"rendered":"http:\/\/courses.haigarmen.com\/creativecoding\/?p=119"},"modified":"2015-06-17T07:05:08","modified_gmt":"2015-06-17T03:05:08","slug":"exercise-24","status":"publish","type":"post","link":"https:\/\/courses.haigarmen.com\/creativecoding\/exercise-24\/","title":{"rendered":"Exercise 24"},"content":{"rendered":"<p>Now let&#8217;s rotate but change the center point of our rotation.<br \/>\nWe do that using the translate() function.<\/p>\n<pre><code>\r\nfloat r = 0;\r\n\r\nvoid setup() {\r\n  size(400,400);\r\n  background(10);\r\n  smooth();\r\n  noStroke();\r\n}\r\nvoid draw() {\r\n  translate(width\/2, height\/2);\r\n  fill(255);\r\n  rotate(r);\r\n  float circle_size = random(5, 15);\r\n  ellipse(100 + r, 10, circle_size, circle_size);\r\n  r = r + 0.2;\r\n  println(r);\r\n}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Now let&#8217;s rotate but change the center point of our rotation. We do that using the translate() function. float r = 0; void setup() { size(400,400); background(10); smooth(); noStroke(); } void draw() { translate(width\/2, height\/2); fill(255); rotate(r); float circle_size = random(5, 15); ellipse(100 + r, 10, circle_size, circle_size); r = r + 0.2; println(r); }<\/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-119","post","type-post","status-publish","format-standard","hentry","category-lessons"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/119","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=119"}],"version-history":[{"count":2,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/119\/revisions"}],"predecessor-version":[{"id":132,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/119\/revisions\/132"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/media?parent=119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/categories?post=119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/tags?post=119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}