{"id":582,"date":"2012-11-12T16:47:45","date_gmt":"2012-11-12T16:47:45","guid":{"rendered":"http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/?p=582"},"modified":"2012-11-12T16:48:09","modified_gmt":"2012-11-12T16:48:09","slug":"jayson-corey-project-1-rain","status":"publish","type":"post","link":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/12\/jayson-corey-project-1-rain\/","title":{"rendered":"Jayson Corey Project 1: Rain"},"content":{"rendered":"<p><script type=\"application\/processing\">\r\nSprite mySprite;\r\nSprite[] sprites = new Sprite [100];\r\nPImage myPicture;\r\n\r\nvoid setup () {\r\n  size (800, 500);\r\n  background (255);\r\n  myPicture = loadImage (\"http:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-content\/uploads\/2012\/11\/Raindrop.png\");\r\n  imageMode ( CENTER );\r\n  \r\n  for (int i = 0; i < sprites.length; i++) {\r\n    sprites[i] = new Sprite (); } }\r\n\r\nvoid draw () {\r\n  background (255);\r\n  for (int z = 0; z < sprites.length; z++) {\r\n    sprites[z].moveSprite();\r\n    sprites[z].drawSprite(); } }\r\n\r\n  \r\nclass Sprite {\r\n  float x = 100;\r\n  float y = 100;\r\n  float imageSize = 12;\r\n  float yMove = 1;\r\n  \r\n  Sprite () {\r\n    x = random (width);\r\n    y = random (width);\r\n    yMove = 3;\r\n    imageSize = 10 + random(50); }\r\n    \r\n  void drawSprite () {\r\n    image (myPicture, x, y, imageSize, imageSize); }\r\n    \r\n  void moveSprite () {\r\n    y += yMove; } }\r\n<\/script><\/p>\n<p>This program makes a quick rainfall when ran once that consists of custom made raindrop graphics. This was inspired quite simply by rain, or more specifically quick drizzles that don&#8217;t last much longer than a minute (Even though this only lasts seconds). <\/p>\n","protected":false},"excerpt":{"rendered":"<p>This program makes a quick rainfall when ran once that consists of custom made raindrop graphics. This was inspired quite simply by rain, or more specifically quick drizzles that don&#8217;t last much longer than a minute (Even though this only &hellip; <a href=\"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/2012\/11\/12\/jayson-corey-project-1-rain\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":15,"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\/582"}],"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\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/comments?post=582"}],"version-history":[{"count":4,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/582\/revisions"}],"predecessor-version":[{"id":591,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/posts\/582\/revisions\/591"}],"wp:attachment":[{"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/media?parent=582"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/categories?post=582"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joshuarosenstock.com\/teaching\/IMGD3x00_B12\/wp-json\/wp\/v2\/tags?post=582"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}