{"id":109,"date":"2011-09-16T23:06:43","date_gmt":"2011-09-17T06:06:43","guid":{"rendered":"http:\/\/courses.haigarmen.com\/isma303\/?p=109"},"modified":"2011-09-16T23:06:43","modified_gmt":"2011-09-17T06:06:43","slug":"random-circles","status":"publish","type":"post","link":"https:\/\/courses.haigarmen.com\/isma303\/random-circles\/","title":{"rendered":"Random Circles"},"content":{"rendered":"<p>This is a small sketch that helps us understand the potential of the <strong>random() <\/strong>function and one can start using randomness in their work quickly.<\/p>\n<pre>\nsize(600,600);\nsmooth();\n\nint circleNum = 50;\nnoStroke();\n\nfor (int i = 0; i&lt;= circleNum; i += 1) {\n  fill(random(255), random(255), random(255), random(255));\n  ellipse(random(width), random(height), random(width), random(width);\n}\n<\/pre>\n<p>Next is an challenge for your home:<br \/>\nAlter the above screen to include only circular ellipse and the random colours are all required to be within the same colour range.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a small sketch that helps us understand the potential of the random() function and one can start using randomness in their work quickly. size(600,600); smooth(); int circleNum = 50; noStroke(); for (int i = 0; i&lt;= circleNum; i += 1) { fill(random(255), random(255), random(255), random(255)); ellipse(random(width), random(height), random(width), random(width); } Next is an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-exercises"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/isma303\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.haigarmen.com\/isma303\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.haigarmen.com\/isma303\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/isma303\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.haigarmen.com\/isma303\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":0,"href":"https:\/\/courses.haigarmen.com\/isma303\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/isma303\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/isma303\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/isma303\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}