{"id":935,"date":"2015-09-06T01:00:15","date_gmt":"2015-09-06T01:00:15","guid":{"rendered":"http:\/\/blogs.discovery.wisc.edu\/projects\/?p=935"},"modified":"2015-09-06T01:07:34","modified_gmt":"2015-09-06T01:07:34","slug":"week-1-beginning-with-processing","status":"publish","type":"post","link":"https:\/\/blogs.discovery.wisc.edu\/projects\/2015\/09\/06\/week-1-beginning-with-processing\/","title":{"rendered":"Week 1 &#8211; Beginning with Processing"},"content":{"rendered":"<p>I am using the book called &#8216;Learning Processing&#8217; by Daniel Shiffman. There are a lot of books out there on Processing but I chose this one because every chapter almost feels like a lecture and it is organized for a semester course. It is the same book he uses to teach at NYU. And he knows his audience very well, that is, people who have NEVER programmed before. This will be the one of the three books I&#8217;ll be referencing during the semester. The other two will gain their mention later in the semester when the subject matter becomes relevant.<\/p>\n<p>On to this week&#8217;s lesson&#8230;<\/p>\n<p>We start by getting familiarized with Processing&#8217;s interface.<a href=\"http:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/Processing-Environment.jpg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-937\" src=\"http:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/Processing-Environment-300x217.jpg\" alt=\"Processing Environment\" width=\"300\" height=\"217\" srcset=\"https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/Processing-Environment-300x217.jpg 300w, https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/Processing-Environment-1024x741.jpg 1024w, https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/Processing-Environment-415x300.jpg 415w, https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/Processing-Environment.jpg 1236w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The fun thing about Processing is that the development environment is so straight foward and visual that applications are simply called sketches. Special functions for drawing geometrical shapes are readily available. One key idea is that with Processing, you are creating visual forms drawn by pixels. So a point drawn is simply the position of a pixel in the screen.<\/p>\n<p>The syntax to create an animation simply consists of calling the function <strong><em>draw()<\/em><\/strong>. Whenever you want to have a sketch interactive with the user, mouse input data can be accessed from any function by simply using <em><strong>mouseX<\/strong> <\/em>and <em><strong>mouseY<\/strong><\/em>.<\/p>\n<p>Color can be modified easily by RGB or HSB standard. Every single pixel can be colored and fun gradients of color can be programmed by playing with transparencies.<\/p>\n<p>A lot of the examples in the book will have to do with this creature, Prof. Shiffman called Zoog. He likes his &#8216;creatures&#8217; and a lot of the projects will have to do with creating creatures whose algorithms implement specific programming techniques. I have taken my creative license so I will probably stick with more abstract forms.<\/p>\n<div id=\"attachment_938\" style=\"width: 235px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/05921091-13DD-490E-90C5-68E41A1E6932AB0D1EB8-3072-43DB-92EE-C82711A30647-e1441500507720.jpg\"><img aria-describedby=\"caption-attachment-938\" loading=\"lazy\" class=\"wp-image-938 size-medium\" src=\"http:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/05921091-13DD-490E-90C5-68E41A1E6932AB0D1EB8-3072-43DB-92EE-C82711A30647-e1441500507720-225x300.jpg\" alt=\"My preliminary sketch for my week's composition\" width=\"225\" height=\"300\" srcset=\"https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/05921091-13DD-490E-90C5-68E41A1E6932AB0D1EB8-3072-43DB-92EE-C82711A30647-e1441500507720-225x300.jpg 225w, https:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/05921091-13DD-490E-90C5-68E41A1E6932AB0D1EB8-3072-43DB-92EE-C82711A30647-e1441500507720-768x1024.jpg 768w\" sizes=\"(max-width: 225px) 100vw, 225px\" \/><\/a><p id=\"caption-attachment-938\" class=\"wp-caption-text\">My preliminary sketch for my week&#8217;s composition<\/p><\/div>\n<p>Each week, I&#8217;ll be creating at least one composition to reinforce the concepts learned. This week was all about drawing shapes and making those shapes dynamic by using <strong>mouseX<\/strong> and <em><strong>mouseY<\/strong> <\/em>inputs. I immediately thought of cone lights so decided to create a colored composition with an array of triangles whose color changed and vertices moved according to the mouse<a href=\"http:\/\/blogs.discovery.wisc.edu\/projects\/files\/2015\/09\/05921091-13DD-490E-90C5-68E41A1E6932AB0D1EB8-3072-43DB-92EE-C82711A30647-e1441500507720.jpg\"><br \/>\n<\/a><\/p>\n<p>You may play with my sketch by visiting the following link:<\/p>\n<p><a href=\"http:\/\/www.openprocessing.org\/sketch\/213101\" target=\"_blank\">http:\/\/www.openprocessing.org\/sketch\/213101<\/a><\/p>\n<p>See you next week.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am using the book called &#8216;Learning Processing&#8217; by Daniel Shiffman. There are a lot of books out there on Processing but I chose this one because every chapter almost feels like a lecture and it is organized for a &hellip; <a href=\"https:\/\/blogs.discovery.wisc.edu\/projects\/2015\/09\/06\/week-1-beginning-with-processing\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":105,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts\/935"}],"collection":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/users\/105"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/comments?post=935"}],"version-history":[{"count":4,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts\/935\/revisions"}],"predecessor-version":[{"id":941,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/posts\/935\/revisions\/941"}],"wp:attachment":[{"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/media?parent=935"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/categories?post=935"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.discovery.wisc.edu\/projects\/wp-json\/wp\/v2\/tags?post=935"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}