{"id":2915,"date":"2016-09-10T09:04:10","date_gmt":"2016-09-10T08:04:10","guid":{"rendered":"http:\/\/www.lyceelecorbusier.eu\/p5js\/?p=2915"},"modified":"2016-09-11T18:01:15","modified_gmt":"2016-09-11T17:01:15","slug":"p5-re-code-02","status":"publish","type":"post","link":"https:\/\/www.lyceelecorbusier.eu\/p5js\/?p=2915","title":{"rendered":"\/ p5 \/ re-code 02"},"content":{"rendered":"<p>Inspir\u00e9 par\u00a0&#8220;From the Square Series&#8221; de <a href=\"http:\/\/dada.compart-bremen.de\/item\/agent\/633\" target=\"_blank\">Roger Coqart<\/a><\/p>\n\n<!-- iframe plugin v.5.1 wordpress.org\/plugins\/iframe\/ -->\n<iframe src=\"http:\/\/lyceelecorbusier.eu\/p5\/recode\/02-recode\" width=\"780\" height=\"780\" style=\"border: 1px solid #ddd;\" scrolling=\"yes\" class=\"iframe-class\" frameborder=\"0\"><\/iframe>\n\n<pre>\/* \r\nPart of the ReCode Project (http:\/\/recodeproject.com)\r\nBased on \"From the Square Series\" by Roger Coqart\r\nOriginally published in \"Computer Graphics and Art\" v3n2, 1978\r\nCopyright (c) 2015 Haydn Edgvaron-King - OSI\/MIT license (http:\/\/recodeproject\/license).\r\n*\/\r\n\r\n\/* @pjs pauseOnBlur=\"true\"; *\/\r\n\r\nvar lin = 0;\r\nvar col = 0;\r\nvar taille = 12;\r\nvar lin2 = 0;\r\nvar col2 = 0;\r\nvar taille2 = 36;\r\n \r\nfunction setup() {\r\ncreateCanvas(780, 780);\r\nbackground(0);\r\nstroke(255);\r\nstrokeWeight(3.2);\r\nstrokeCap(ROUND);\r\n}\r\n \r\nfunction draw() {\r\n var sorte = round(random(0,5));\r\n \/\/println(#5ea19a + sorte);\r\n if (sorte == 0) {\r\n line(lin * taille, col * taille, taille + (lin * taille), taille + (col * taille));\r\n }\r\n if (sorte == 1) {\r\n line(lin * taille + taille, col * taille, lin * taille, col * taille + taille);\r\n }\r\n if (sorte == 2) {\r\n line(lin * taille, col * taille, taille + (lin * taille), taille + (col * taille));\r\n }\r\n if (sorte == 3) {\r\n line(lin * taille + taille, col * taille, lin * taille, col * taille + taille);\r\n }\r\n if (sorte == 4) {\r\n }\r\nlin++;\r\nif (lin * 12 &gt; width) {\r\ncol++;\r\nlin = 0;\r\n}\r\nif (col * 12 &gt; height) {\r\n noLoop();\r\n}\r\n var sorte2 = round(random(0,5));\r\n\/\/ println(#5ea19a + sorte2);\r\n strokeCap(ROUND);\r\n if (sorte2 == 0) {\r\n line(lin2 * taille2, col2 * taille2, lin2 * taille2 + taille2, col2 * taille2);\r\n }\r\n if (sorte2 == 1) {\r\n line(lin2 * taille2, col2 * taille2, lin2 * taille2, col2 * taille2 + taille2);\r\n }\r\n if (sorte2 == 2) {\r\n line(lin2 * taille2, col2 * taille2, lin2 * taille2 + taille2, col2 * taille2);\r\n }\r\n if (sorte2 == 3) {\r\n line(lin2 * taille2, col2 * taille2, lin2 * taille2, col2 * taille2 + taille2);\r\n }\r\n if (sorte2 == 4) {\r\n }\r\nlin2++;\r\nif (lin2 * 36 &gt; width) {\r\ncol2++;\r\nlin2 = 0;\r\n}\r\nif (col2 * 36 &gt; height) {\r\n}\r\n}<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Inspir\u00e9 par\u00a0&#8220;From the Square Series&#8221; de Roger Coqart \/* Part of the ReCode Project (http:\/\/recodeproject.com) Based on &#8220;From the Square Series&#8221; by Roger Coqart Originally published in &#8220;Computer Graphics and Art&#8221; v3n2, 1978 Copyright (c) 2015 Haydn Edgvaron-King&#8230; <a class=\"read-more\" href=\"https:\/\/www.lyceelecorbusier.eu\/p5js\/?p=2915\">Lire la suite&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":2916,"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\/2915"}],"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=2915"}],"version-history":[{"count":1,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/posts\/2915\/revisions"}],"predecessor-version":[{"id":2917,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/posts\/2915\/revisions\/2917"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=\/wp\/v2\/media\/2916"}],"wp:attachment":[{"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lyceelecorbusier.eu\/p5js\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}