{"id":300,"date":"2017-05-10T12:32:02","date_gmt":"2017-05-10T12:32:02","guid":{"rendered":"http:\/\/ifdesignelseart.com\/?p=300"},"modified":"2017-05-10T12:32:08","modified_gmt":"2017-05-10T12:32:08","slug":"creer-un-kaleidoscope","status":"publish","type":"post","link":"https:\/\/ifdesignelseart.com\/?p=300","title":{"rendered":"Cr\u00e9er un kal\u00e9idoscope"},"content":{"rendered":"<p>La fonction qui suit r\u00e9p\u00e8te une image quatre fois sur l&rsquo;\u00e9cran, avec un effet d&rsquo;inversion qui permet donc de cr\u00e9er un kal\u00e9idoscope.<br \/>\nL&rsquo;image d&rsquo;origine est celle-ci :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-302\" src=\"http:\/\/ifdesignelseart.com\/wp-content\/uploads\/2017\/05\/image_origine.png\" alt=\"\" width=\"200\" height=\"200\" srcset=\"https:\/\/ifdesignelseart.com\/wp-content\/uploads\/2017\/05\/image_origine.png 200w, https:\/\/ifdesignelseart.com\/wp-content\/uploads\/2017\/05\/image_origine-150x150.png 150w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/p>\n<pre class=\"brush:java\">void repeteLimage(PImage g){ \r\n  image(g,0,0); \r\n  pushMatrix();\r\n  translate(width,0);\r\n  scale(-1,1);\r\n  image(g,0,0);\r\n  popMatrix();\r\n  pushMatrix();\r\n  translate(width,height);\r\n  scale(-1,-1);\r\n  image(g,0,0);\r\n  popMatrix();\r\n  pushMatrix();\r\n  translate(0,height);\r\n  scale(1,-1);\r\n  image(g,0,0);\r\n  popMatrix(); \r\n\r\n}<\/pre>\n<p>L&rsquo;image finalement obtenue \u00e0 l&rsquo;\u00e9cran est celle-ci :<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-303\" src=\"http:\/\/ifdesignelseart.com\/wp-content\/uploads\/2017\/05\/kaleidoscope-300x300.png\" alt=\"\" width=\"300\" height=\"300\" srcset=\"https:\/\/ifdesignelseart.com\/wp-content\/uploads\/2017\/05\/kaleidoscope-300x300.png 300w, https:\/\/ifdesignelseart.com\/wp-content\/uploads\/2017\/05\/kaleidoscope-150x150.png 150w, https:\/\/ifdesignelseart.com\/wp-content\/uploads\/2017\/05\/kaleidoscope.png 400w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>La fonction qui suit r\u00e9p\u00e8te une image quatre fois sur l&rsquo;\u00e9cran, avec un effet d&rsquo;inversion qui permet donc de cr\u00e9er un kal\u00e9idoscope. L&rsquo;image d&rsquo;origine est celle-ci : void repeteLimage(PImage g){ image(g,0,0); pushMatrix(); translate(width,0); scale(-1,1); image(g,0,0); popMatrix(); pushMatrix(); translate(width,height); scale(-1,-1); image(g,0,0); popMatrix(); pushMatrix(); translate(0,height); scale(1,-1); image(g,0,0); popMatrix(); } L&rsquo;image finalement obtenue \u00e0 l&rsquo;\u00e9cran est celle-ci :<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-300","post","type-post","status-publish","format-standard","hentry","category-tips"],"_links":{"self":[{"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=\/wp\/v2\/posts\/300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=300"}],"version-history":[{"count":2,"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ifdesignelseart.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}