{"id":68,"date":"2015-06-16T03:47:47","date_gmt":"2015-06-15T23:47:47","guid":{"rendered":"http:\/\/courses.haigarmen.com\/creativecoding\/?p=68"},"modified":"2015-06-16T05:12:57","modified_gmt":"2015-06-16T01:12:57","slug":"exercise-11","status":"publish","type":"post","link":"https:\/\/courses.haigarmen.com\/creativecoding\/exercise-11\/","title":{"rendered":"Exercise 11"},"content":{"rendered":"<p>using random in a different way&#8230;<\/p>\n<pre><code>\r\nfloat slow_circle_x = 0;\r\nfloat fast_circle_x = 0;\r\n\r\nvoid setup() {\r\n  size(400,400); \r\n  noStroke();\r\n}\r\n\r\nvoid draw() {\r\n  background(#1BB1F5);\r\n  \r\n  float slow_circle_size = 50;\r\n  \r\n\/\/ what do you think this next line does?\r\n  if(random(10) > 9) {\r\n    slow_circle_size = 60;\r\n  }\r\n  \r\n  fill(#C1FF3E);\r\n  ellipse(slow_circle_x,50, slow_circle_size, slow_circle_size);\r\n  slow_circle_x = slow_circle_x + 1;\r\n\r\n  fill(#FF4800);\r\n  ellipse(fast_circle_x,50, 50, 50);\r\n  fast_circle_x = fast_circle_x + 5;\r\n\r\n  \r\n  if(slow_circle_x > 400) {\r\n    slow_circle_x = 0;\r\n  }\r\n  if(fast_circle_x > 400) {\r\n    fast_circle_x = 0;\r\n  }\r\n}\r\n<\/code>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>using random in a different way&#8230; float slow_circle_x = 0; float fast_circle_x = 0; void setup() { size(400,400); noStroke(); } void draw() { background(#1BB1F5); float slow_circle_size = 50; \/\/ what do you think this next line does? if(random(10) > 9) { slow_circle_size = 60; } fill(#C1FF3E); ellipse(slow_circle_x,50, slow_circle_size, slow_circle_size); slow_circle_x = slow_circle_x + 1; fill(#FF4800); [&hellip;]<\/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-68","post","type-post","status-publish","format-standard","hentry","category-lessons"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/68","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=68"}],"version-history":[{"count":3,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":71,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/68\/revisions\/71"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}