{"id":185,"date":"2015-06-18T05:40:30","date_gmt":"2015-06-18T01:40:30","guid":{"rendered":"http:\/\/courses.haigarmen.com\/creativecoding\/?p=185"},"modified":"2015-06-18T05:40:30","modified_gmt":"2015-06-18T01:40:30","slug":"exercise-35","status":"publish","type":"post","link":"https:\/\/courses.haigarmen.com\/creativecoding\/exercise-35\/","title":{"rendered":"Exercise 35"},"content":{"rendered":"<p>Now let&#8217;s add noise instead of randomizing. the new point will have some reference to the point before it.<\/p>\n<pre><code>\r\nsize(500, 100);\r\nbackground(255);\r\nstrokeWeight(5);\r\nsmooth();\r\n\r\nstroke(0, 30);\r\nline(20, 50, 480, 50);\r\nstroke(20, 50, 70);\r\nint step = 10;\r\nfloat lastx = -999;\r\nfloat lasty = -999;\r\nfloat ynoise = random(10);\r\nfloat y;\r\nfor (int x=20; x<=480; x+=step) {\r\n  y = 10 + noise(ynoise) * 80;\r\n  if (lastx > -999) {\r\n    line(x, y, lastx, lasty);\r\n  }\r\n  lastx = x;\r\n  lasty = y;\r\n  ynoise += 0.1;\r\n}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Now let&#8217;s add noise instead of randomizing. the new point will have some reference to the point before it. size(500, 100); background(255); strokeWeight(5); smooth(); stroke(0, 30); line(20, 50, 480, 50); stroke(20, 50, 70); int step = 10; float lastx = -999; float lasty = -999; float ynoise = random(10); float y; for (int x=20; x [&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-185","post","type-post","status-publish","format-standard","hentry","category-lessons"],"_links":{"self":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/185","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=185"}],"version-history":[{"count":1,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/185\/revisions"}],"predecessor-version":[{"id":186,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/posts\/185\/revisions\/186"}],"wp:attachment":[{"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/media?parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/categories?post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.haigarmen.com\/creativecoding\/wp-json\/wp\/v2\/tags?post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}