{"id":318,"date":"2012-11-06T04:24:55","date_gmt":"2012-11-06T04:24:55","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/?p=318"},"modified":"2012-11-06T04:33:00","modified_gmt":"2012-11-06T04:33:00","slug":"moving-design","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/06\/moving-design\/","title":{"rendered":"Assignment 2 &#8211; Moving Design"},"content":{"rendered":"<p>For this assignment I started over, but tried a similar approach. I tried to create something in which interesting patterns and shapes would emerge by just clicking and moving the mouse.<br \/>\n<script type=\"application\/processing\">\r\n\/\/Info: http:\/\/processingjs.org\/reference\r\n\/\/ ellipse Clicker vars\r\nint eLen = 0;\r\nint eWid = 0;\r\nint eOpac = 255;\r\n\/\/ Red Bar vars\r\nint bOpac;\r\nint rLen = 0;\r\nint rWid = 0;\r\nint reached = 0;\r\n\r\n\/\/ Other\r\nint pressed = 0;\r\ncolor myColor;\r\n\r\nvoid setup() {\r\n  size(500, 500);\r\n  background(0, 0, 0);\r\n}\r\n\r\nvoid draw() {\r\n  \/\/background(0, 0, 0);\r\n\r\n  \/\/Bar maker\r\n  \/\/noStroke();\r\n  \/\/rectMode(CENTER);\r\n  stroke(0);\r\n\r\n  fill(255, 255, 255, bOpac);\r\n  rect(0, 50, rWid, mouseY\/5);\r\n  fill(255, 230, 230, bOpac*.80);\r\n  rect(0, 150, rWid\/.75, mouseY\/5);\r\n  fill(255, 200, 200, bOpac*.60);\r\n  rect(0, 250, rWid\/.5, mouseY\/5);\r\n  fill(255, 170, 170, bOpac*.40);\r\n  rect(0, 350, rWid\/.25, mouseY\/5);\r\n  fill(255, 30, 30, bOpac*.20);\r\n  rect(0, 450, rWid\/.1, mouseY\/5);\r\n\r\n  fill(255, 255, 255, bOpac);\r\n  rect(0, 500, mouseY\/5, -rWid);\r\n  fill(255, 230, 230, bOpac*.8);\r\n  rect(100, 500, mouseY\/5, -rWid\/1.5);\r\n  fill(255, 200, 200, bOpac*.6);\r\n  rect(200, 500, mouseY\/5, -rWid\/2);\r\n  fill(255, 170, 170, bOpac*.4);\r\n  rect(300, 500, mouseY\/5, -rWid\/2.5);\r\n  fill(255, 30, 30, bOpac*.2);\r\n  rect(400, 500, mouseY\/5, -rWid\/3);\r\n\r\n  if (reached == 0) {  \r\n    if (rWid <= 500) {\r\n      rLen += mouseY\/20;\r\n      rWid += mouseY\/20;\r\n      bOpac = rWid\/2;\r\n    } \r\n    else { \r\n      reached = 1;\r\n      myColor = color(random(255), random(255), random(255));\r\n    }\r\n  }\r\n  else {\r\n    if (rWid > 0) {\r\n      rLen += -30;\r\n      rWid += -30;\r\n      bOpac += -25;\r\n    }\r\n    else {\r\n      reached = 0;\r\n    }\r\n  }\r\n  \/\/ Ellipse Clicker\r\n  noStroke();\r\n  fill(myColor, eOpac);\r\n  ellipse(mouseX, mouseY, eWid, eLen);\r\n  if (pressed == 1 && eLen <=700) {\r\n    eLen += 30;\r\n    eWid += 30;\r\n    eOpac += -8;\r\n  } \r\n  else {\r\n    pressed = 0;\r\n    eLen = 0;\r\n    eWid = 0;\r\n    eOpac = 255;\r\n  }\r\n  fill(0, 0, 0, rWid*.1);\r\n  rect(0, 0, 500, 500);\r\n}\r\nvoid mousePressed() {\r\n  eLen = 0;\r\n  eWid = 0;\r\n  eOpac = 255;\r\n  pressed = 1;\r\n}<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For this assignment I started over, but tried a similar approach. I tried to create something in which interesting patterns and shapes would emerge by just clicking and moving the mouse.<\/p>\n","protected":false},"author":16,"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\/318"}],"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\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/comments?post=318"}],"version-history":[{"count":4,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/318\/revisions"}],"predecessor-version":[{"id":324,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/318\/revisions\/324"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/media?parent=318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/categories?post=318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/tags?post=318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}