{"id":466,"date":"2012-11-12T05:40:21","date_gmt":"2012-11-12T05:40:21","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/?p=466"},"modified":"2012-11-12T05:50:46","modified_gmt":"2012-11-12T05:50:46","slug":"project-1","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/12\/project-1\/","title":{"rendered":"Nature vs. Machine Sketch 1"},"content":{"rendered":"<p>For the first iteration of my project I went with the theme of a black hole. My original idea was to make a blue earth however I stumbled upon the idea of a black hole when I added some code from the book, that made a matrix of clouds, and made my &#8220;earth&#8221; shape black. The background color is also random because although black is more like space it gets boring.<\/p>\n<p>Click to expand the black hole, and ask yourself: is it actually black?<\/p>\n<p><script type=\"application\/processing\">\r\nint diam =10;\r\nfloat centX, centY;\r\nfloat xstart,xnoise,ynoise;\r\n\r\n\r\nvoid setup() {\r\n  size (500, 300);\r\n  frameRate(24);\r\n  smooth();\r\n  background(random(255),random(255),random(255));\r\n  centX=width\/2;\r\n  centY=height\/2;\r\n  stroke(0);\r\n  strokeWeight(1);\r\n  xstart = random(10);\r\n  xnoise = xstart;\r\n  ynoise = random(10);\r\n  for (int y = 0;y<=height; y+=5){\r\n    ynoise += 0.1;\r\n    xnoise = xstart;\r\n    for (int x = 0; x<= width; x+=5){\r\n      xnoise +=0.1;\r\n      drawPoint(x,y,noise(xnoise,ynoise));\r\n    }\r\n  }\r\n  \r\n}\r\n\r\n\/\/drawing the background\r\n\r\n\r\nvoid drawPoint(float x, float y, float noiseFactor) {\r\n  pushMatrix();\r\n  translate(x, y);\r\n  rotate(noiseFactor * radians(540));\r\n  float edgeSize = noiseFactor * 35;\r\n  float grey = 150 + (noiseFactor *120);\r\n  \/\/float alph = 63 + (noiseFactor *120);\r\n  float alph = 67;\r\n  noStroke();\r\n  fill(grey, alph);\r\n  \/\/fill(random(255),random(255),random(255), alph);\r\n  ellipse(0, 0, edgeSize, edgeSize\/2);\r\n  popMatrix();\r\n}\r\nvoid draw() {\r\n  fill(0, 25);\r\n  \/\/#4470C6\r\n  if (diam <=400) {\r\n    ellipse(centX, centY, diam, diam);\r\n   \/\/ diam +=10;\r\n  }\r\n}\r\n\r\nvoid mouseClicked() {\r\nfor (int i = 0; i < 4; i = i+1) {\r\n    fill(random(255),random(255),random(255), 25);\r\n   \/\/diam = i\r\n  diam +=10;\r\n   ellipse(centX, centY, diam, diam);\r\n  }\r\n}\r\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the first iteration of my project I went with the theme of a black hole. My original idea was to make a blue earth however I stumbled upon the idea of a black hole when I added some code &hellip; <a href=\"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/12\/project-1\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/466"}],"collection":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/comments?post=466"}],"version-history":[{"count":2,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/466\/revisions"}],"predecessor-version":[{"id":468,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/466\/revisions\/468"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/media?parent=466"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/categories?post=466"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/tags?post=466"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}