<br />
<b>Warning</b>:  Declaration of Jetpack_IXR_Client::query() should be compatible with IXR_Client::query(...$args) in <b>/home/clients/7267bc096562fcdb78c0ab60d3ac51fb/web/blog/wp-content/plugins/jetpack/class.jetpack-ixr-client.php</b> on line <b>91</b><br />
{"id":486,"date":"2015-06-06T17:13:20","date_gmt":"2015-06-06T17:13:20","guid":{"rendered":"http:\/\/barradeau.com\/blog\/?p=486"},"modified":"2015-12-08T14:42:01","modified_gmt":"2015-12-08T14:42:01","slug":"citadels","status":"publish","type":"post","link":"http:\/\/barradeau.com\/blog\/?p=486","title":{"rendered":"citadels"},"content":{"rendered":"<p><a href=\"https:\/\/twitter.com\/soulwire\" target=\"_blank\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-491\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/atlantis.png\" alt=\"atlantis\" width=\"709\" height=\"1016\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/atlantis.png 709w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/atlantis-209x300.png 209w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/atlantis-697x999.png 697w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/twitter.com\/soulwire\" target=\"_blank\">Justin Windle<\/a> is a very talented creative developer and I&#8217;ve been following his work for years, <a href=\"http:\/\/t.co\/zVJyANpDMm\" target=\"_blank\">check his website<\/a> if you&#8217;re not convinced.<\/p>\n<p>he started an enterprise called <a href=\"http:\/\/stuv.io\/\" target=\"_blank\">stuvio<\/a> ; the goal is to allow generative artists to exhibit and sell prints of their works. he gathered a selection of creative coders \/ generative artists and I was part of the list (an honor).<\/p>\n<p>the Stuvio website might take some time to be released yet I started working on a couple of pieces. one of which is called &#8220;citadels&#8221;, when I got good enough results, <a href=\"https:\/\/twitter.com\/nicoptere\/status\/585078472839692289\" target=\"_blank\">I posted some screenshots on twitter<\/a> and got very enthusiastic feedbacks (thanks to all!).<\/p>\n<p>some people were curious as to\u00a0how it was done and tweets only allow for replies like this:<\/p>\n<blockquote><p>canvas + PRNG distribution + a series of Scale2x\/3X + some down\/upscaled redraws w != blendmodes (&gt;glows) + a gradient map.<\/p><\/blockquote>\n<p>which is a bit dry :)<\/p>\n<p>so I&#8217;ll try to get more into details in this post.<br \/>\nhere\u00a0are\u00a0two more variations:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-492\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/blackcurrant.png\" alt=\"blackcurrant\" width=\"709\" height=\"1016\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/blackcurrant.png 709w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/blackcurrant-209x300.png 209w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/blackcurrant-697x999.png 697w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-493\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/dusk.png\" alt=\"dusk\" width=\"709\" height=\"1016\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/dusk.png 709w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/dusk-209x300.png 209w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/dusk-697x999.png 697w\" sizes=\"(max-width: 709px) 100vw, 709px\" \/><\/p>\n<p>a word about the &#8220;creative process&#8221;, I don&#8217;t really know when or why or how I got this idea. the sure thing is that I watched -approximately- every science fiction movie released after 1902\u00a0and after all, who wouldn&#8217;t want to create generative a retro futuristic city skyline?<\/p>\n<p>graphically it&#8217;s easier to isolate at least 2 major inspirations:<br \/>\nNicolas De Sta\u00ebl and his abstract minimal compositions, I liked the clumsiness of the paint patches, the limited set of colors.<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.muma-lehavre.fr\/sites\/default\/files\/thumbnails\/image\/bd_stael_mats.jpg\" alt=\"les mats\" \/><br \/>\n<a href=\"http:\/\/www.muma-lehavre.fr\/fr\/expositions\/nicolas-de-stael-lumieres-du-nord-lumieres-du-sud\/en-images\" target=\"_blank\">source<\/a><\/p>\n<p>and Olly Moss&#8217;\u00a0<a href=\"http:\/\/ollymoss.com\/#\/star-wars-trilogy\/\" target=\"_blank\">mesmerizing Star Wars trilogy posters<\/a><br \/>\n<img decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/static1.squarespace.com\/static\/52127948e4b06d5f9d345a0f\/5212b162e4b09a53f34942f0\/5212b185e4b0e1ee796111bf\/1376956806408\/empire.jpg?format=800w\" alt=\"Olly Moss Star wars trilogy\" \/><br \/>\nI liked the mix of vector shapes, something that looked like handmade textures &amp; the flat colors.<\/p>\n<p>the city is essentially\u00a0a series\u00a0of rectangles with a\u00a0fixed width and variable height. I used a cosine function to soften the heights on both sides.\u00a0if you&#8217;re interested in distribution functions I&#8217;d recommend <a href=\"https:\/\/pixelero.wordpress.com\/\" target=\"_blank\">Petri Leskinen&#8217;s blog<\/a>, he provides\u00a0great explanations about distribution.<br \/>\nI obtained something like this:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-499\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/rects_0.png\" alt=\"rects_0\" width=\"576\" height=\"687\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/rects_0.png 576w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/rects_0-252x300.png 252w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/p>\n<p>then I drew some &#8220;bridges&#8221; : at random heights, if a &#8220;pixel&#8221; is empty, I check if the pixels on both sides are filled, if so, we have e bridge. this gives us the red dots:<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-500\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/rects_1.png\" alt=\"rects_1\" width=\"576\" height=\"687\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/rects_1.png 576w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/rects_1-252x300.png 252w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/p>\n<p>building on the previous, there are longer bridges: if a pixel is empty and has a filled pixel on its left, loop while it finds a filled pixel on its right. the pink lines below.<br \/>\n<img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-498\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/rects_2.png\" alt=\"rects_2\" width=\"576\" height=\"687\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/rects_2.png 576w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/rects_2-252x300.png 252w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/><\/p>\n<p>this was a good start,\u00a0note that it uses a PRNG: Pseudo Random Number Generator instead of Math.random() ; this allows us to reproduce seemingly random series and it is very helpful to test differents settings or\u00a0algorithms.\u00a0if you&#8217;re interested I use a\u00a0<a href=\"https:\/\/gist.github.com\/nicoptere\/fa5165d37a2902736eeb\" target=\"_blank\">Mersenne Twister<\/a>, it works fine :)<\/p>\n<p>I said I used a fixed width and variable heights, this was for a good reason called <em>layers<\/em>.<br \/>\nI use differents ranges of widths and composite them using\u00a0opacity and blend\u00a0modes. here&#8217;s a series of layers building up the skyline.<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-502\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_0.png\" alt=\"layers_0\" width=\"477\" height=\"669\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_0.png 477w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_0-214x300.png 214w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/> <a href=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_1.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-503\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_1.png\" alt=\"layers_1\" width=\"477\" height=\"669\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_1.png 477w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_1-214x300.png 214w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/a> <a href=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_2.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-504\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_2.png\" alt=\"layers_2\" width=\"477\" height=\"669\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_2.png 477w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_2-214x300.png 214w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/a> <a href=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_3.png\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-505\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_3.png\" alt=\"layers_3\" width=\"477\" height=\"669\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_3.png 477w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_3-214x300.png 214w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/a><\/p>\n<p>you see that after the third iteration, we get a\u00a0complex object with lots of details at various scales\u00a0and\u00a0a feeling\u00a0of depth.\u00a0now if you go too far, it will also stop working, for instance after the sixth iteration, it\u00a0represents only the clusterfuck it became.<\/p>\n<p><a href=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_4.png\" data-rel=\"lightbox-image-3\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-506\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_4.png\" alt=\"layers_4\" width=\"477\" height=\"669\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_4.png 477w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/layers_4-214x300.png 214w\" sizes=\"(max-width: 477px) 100vw, 477px\" \/><\/a>good start, but I mentioned the clumsiness of De Sta\u00ebl, I wanted to make it less blocky so I unleashed the power of\u00a0<a href=\"http:\/\/scale2x.sourceforge.net\/algorithm.html\" target=\"_blank\">Scale2D, Scale3D<\/a>\u00a0and VOILA !<\/p>\n<p><strong>\/!\\ update \/!\\<\/strong>\u00a0here&#8217;s the\u00a0<a title=\"ScaleX JavaScript\" href=\"https:\/\/gist.github.com\/nicoptere\/18c2dc4bc05ed9d5b36a\" target=\"_blank\">GIST of\u00a0JS version of\u00a0the scaleX<\/a>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-508\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_0.png\" alt=\"compo_0\" width=\"798\" height=\"1074\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_0.png 798w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_0-223x300.png 223w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_0-761x1024.png 761w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_0-700x942.png 700w\" sizes=\"(max-width: 798px) 100vw, 798px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_1.png\" data-rel=\"lightbox-image-4\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-509\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_1.png\" alt=\"compo_1\" width=\"798\" height=\"1074\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_1.png 798w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_1-223x300.png 223w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_1-761x1024.png 761w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_1-700x942.png 700w\" sizes=\"(max-width: 798px) 100vw, 798px\" \/><\/a><\/p>\n<p>I won&#8217;t go into the details of the algorithm, it&#8217;s quite simple and extends on morphological operators. the important bit is that it gave a good looking result and\u00a0created more accidents in the structure of the buildings. I added a foreground and blending between different layers (alternating lighter\/darker)<\/p>\n<p><a href=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_2.png\" data-rel=\"lightbox-image-5\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-510\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_2.png\" alt=\"compo_2\" width=\"798\" height=\"1074\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_2.png 798w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_2-223x300.png 223w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_2-761x1024.png 761w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_2-700x942.png 700w\" sizes=\"(max-width: 798px) 100vw, 798px\" \/><\/a><\/p>\n<p>still a bit too flat so I added a gradient to reinforce the horizon and\u00a0some particles in the air.<\/p>\n<p><a href=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_3.png\" data-rel=\"lightbox-image-6\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-511\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_3.png\" alt=\"compo_3\" width=\"798\" height=\"1074\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_3.png 798w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_3-223x300.png 223w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_3-761x1024.png 761w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_3-700x942.png 700w\" sizes=\"(max-width: 798px) 100vw, 798px\" \/><\/a> <a href=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_4.png\" data-rel=\"lightbox-image-7\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-512\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_4.png\" alt=\"compo_4\" width=\"798\" height=\"1074\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_4.png 798w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_4-223x300.png 223w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_4-761x1024.png 761w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/compo_4-700x942.png 700w\" sizes=\"(max-width: 798px) 100vw, 798px\" \/><\/a><\/p>\n<p>and\u00a0this is\u00a0the result, I\u00a0was happy with what happened to the particles (it was an accident), also the &#8220;glowing&#8221; effect\u00a0works well and\u00a0this was intentional :)<\/p>\n<p>the last step was to colorize the citadel, I used one of the oldest tricks in the book: palette mapping. use the greyscale value of each pixel to sample a\u00a0gradient of\u00a00xFF values. this might give funny (and not necessarily ugly) results if\u00a0the gradient&#8217;s colors are not sorted. for instance, the image below uses the first line of the smaller picture on top as a gradient.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-514\" src=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/palette.png\" alt=\"palette\" width=\"689\" height=\"983\" srcset=\"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/palette.png 689w, http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/palette-210x300.png 210w\" sizes=\"(max-width: 689px) 100vw, 689px\" \/><\/p>\n<p>as if\u00a0Klimt and\u00a0Hundertwasser had\u00a0painted together ^^<\/p>\n<p>in addition I &#8216;ve\u00a0used some patterns to draw windows here and there, also added a representation of the citadel&#8217;s &#8220;DNA&#8221;, the seed used to initialize the PRNG (it&#8217;s the little diamond at the bottom of the final pictures).<\/p>\n<p>and that was it!<br \/>\nenjoy.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Justin Windle is a very talented creative developer and I&#8217;ve been following his work for years, check his website if you&#8217;re not convinced. he started an enterprise called stuvio ; the goal is to allow generative artists to exhibit and sell prints of their works. he gathered a selection of creative coders \/ generative artists &#8230; <span class=\"more\"><a class=\"more-link\" href=\"http:\/\/barradeau.com\/blog\/?p=486\">[Read more&#8230;]<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":492,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sharing_disabled":false,"spay_email":"","jetpack_publicize_message":""},"categories":[3],"tags":[],"jetpack_featured_media_url":"http:\/\/barradeau.com\/blog\/wp-content\/uploads\/2015\/06\/blackcurrant.png","jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/s4oXhx-citadels","_links":{"self":[{"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/486"}],"collection":[{"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=486"}],"version-history":[{"count":18,"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/486\/revisions"}],"predecessor-version":[{"id":574,"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/486\/revisions\/574"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/492"}],"wp:attachment":[{"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/barradeau.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}