{"id":2947,"date":"2016-09-10T12:41:00","date_gmt":"2016-09-10T11:41:00","guid":{"rendered":"http:\/\/www.lyceelecorbusier.eu\/p5js\/?p=2947"},"modified":"2016-09-10T14:54:40","modified_gmt":"2016-09-10T13:54:40","slug":"p5-re-code-10","status":"publish","type":"post","link":"https:\/\/www.lyceelecorbusier.eu\/p5js\/?p=2947","title":{"rendered":"\/ p5 \/ re-code 10"},"content":{"rendered":"<p>De\u00a0<a href=\"http:\/\/lyceelecorbusier.eu\/p5\/recode\/COMPUTER_GRAPHICS_AND_ART_May1978.pdf\" target=\"_blank\">Computer Graphics and Art vol3 n\u00b02<\/a>\u00a0page 20, par Reiner Schneeberger and students<\/p>\n\n<!-- iframe plugin v.5.1 wordpress.org\/plugins\/iframe\/ -->\n<iframe src=\"http:\/\/lyceelecorbusier.eu\/p5\/recode\/010-recode\" width=\"780\" height=\"780\" style=\"border: 1px solid #ddd;\" scrolling=\"yes\" class=\"iframe-class\" frameborder=\"0\"><\/iframe>\n\n<pre>\/\/ This sketch is part of the ReCode Project - http:\/\/recodeproject.com\r\n\/\/ From Computer Graphics and Art vol3 no2 pg 22\r\n\/\/ by Reiner Schneeberger\r\n\/\/ \r\n\/\/ Untitled #5 is part of a 10 piece series, intended to test viewers\r\n\/\/ perception of art and composition. The section is titled \"Experimental\r\n\/\/ Esthetics with Computer Graphics -- Analyses of Viewers Impressions \r\n\/\/ of Computer Graphics.\"\r\n\/\/ \r\n\/\/ Jonathan Bobrow\r\n\/\/ 2012\r\n\/\/ Creative Commons license CC BY-SA 3.0\r\n\/\/\r\n\/\/ note: .f enforces float division, dividing by an int would automatically round down\r\n\/\/ i.e. 1\/2 = 0 , 1\/2.f = .5\r\n\r\nvar gridSize = 40;\r\nvar density = 10;\r\n\r\nfunction setup(){\r\n createCanvas(780, 780);\r\n background(255);\r\n \r\n stroke(0);\r\n strokeWeight(1);\r\n var padding = gridSize\/density; \/\/ even spacing for lines\r\n \r\n var rows = height\/gridSize;\r\n var cols = width\/gridSize;\r\n \r\n for(var i = 0; i &lt; rows; i++){ \/\/ iterate over the # of rows (top to bottom)\r\n for(var j = 0; j &lt; cols; j++){ \/\/ iterate over the # of columns (left to right)\r\n \r\n push();\r\n translate(j*gridSize, i*gridSize); \/\/ move to grid location\r\n translate(gridSize\/2, gridSize\/2); \/\/ move to rotate around center\r\n if(random(1) &lt; .5) \r\n rotate(PI\/2); \/\/ rotate vertical or horizontal\r\n else \r\n rotate(PI);\r\n \r\n for(var k = 0; k &lt; density; k++){ \/\/ draw # of lines based on density with even spacing\r\n var _x = (k - density\/2) * padding; \r\n line(_x, -gridSize\/2, _x, gridSize\/2);\r\n }\r\n pop();\r\n }\r\n }\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>De\u00a0Computer Graphics and Art vol3 n\u00b02\u00a0page 20, par Reiner Schneeberger and students \/\/ This sketch is part of the ReCode Project &#8211; http:\/\/recodeproject.com \/\/ From Computer Graphics and Art vol3 no2 pg 22 \/\/ by Reiner Schneeberger \/\/&#8230; <a class=\"read-more\" href=\"https:\/\/www.lyceelecorbusier.eu\/p5js\/?p=2947\">Lire la suite&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":2949,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9,6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/posts\/2947"}],"collection":[{"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2947"}],"version-history":[{"count":3,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/posts\/2947\/revisions"}],"predecessor-version":[{"id":2956,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/posts\/2947\/revisions\/2956"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/media\/2949"}],"wp:attachment":[{"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2947"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2947"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2947"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}