{"id":514,"date":"2012-11-12T15:01:54","date_gmt":"2012-11-12T15:01:54","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/?p=514"},"modified":"2012-11-12T15:01:54","modified_gmt":"2012-11-12T15:01:54","slug":"project-1-part-2","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/12\/project-1-part-2\/","title":{"rendered":"Project 1 &#8211; Part 2"},"content":{"rendered":"<p>This one is just a simple little flower. I know it\u2019s out of character with the others, but I couldn\u2019t really think of a good sky scene that would be interactive. So instead you get a little flower that will be centered around the mouse and will change colors when you click the mouse. Be sure to click three times.<\/p>\n<p><script type=\"application\/processing\">\r\ncolor one = color(124,252,0);\r\ncolor two = color(255,255,0);\r\ncolor three = color(255,105,180);\r\ncolor four = color(255,165,0);\r\ncolor five = color(0,191,255);\r\ncolor six = color(160,32,240);\r\nint counter = 1;\r\n\r\nvoid setup(){\r\n  size(400,400);\r\n\r\n}\r\n\r\nvoid draw(){\r\n  noStroke();\r\n  background(255);\r\n  smooth();\r\n  translate(mouseX,mouseY);\r\n  for (int i = 0; i < 5; i++){\r\n    if(counter == 1){\r\n       fill(one);\r\n    }\r\n    else if(counter == 2){\r\n      fill(three);\r\n    }\r\n    else if(counter == 3){\r\n      fill(five);\r\n    }\r\n    ellipse(0,-40,50,50);\r\n    rotate(radians(72));\r\n  }\r\n  if(counter == 1){\r\n       fill(two);\r\n    }\r\n    else if(counter == 2){\r\n      fill(four);\r\n    }\r\n    else if(counter == 3){\r\n      fill(six);\r\n    }\r\n  ellipse(0,0,50,50);\r\n}\r\n\r\nvoid mousePressed(){\r\n  counter++;\r\n  if(counter ==4){\r\n    counter = 1;\r\n}\r\n}\r\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This one is just a simple little flower. I know it\u2019s out of character with the others, but I couldn\u2019t really think of a good sky scene that would be interactive. So instead you get a little flower that will &hellip; <a href=\"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/12\/project-1-part-2\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"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\/514"}],"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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/comments?post=514"}],"version-history":[{"count":1,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/514\/revisions"}],"predecessor-version":[{"id":515,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/514\/revisions\/515"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/media?parent=514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/categories?post=514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/tags?post=514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}