{"id":3789,"date":"2017-07-03T19:43:59","date_gmt":"2017-07-04T03:43:59","guid":{"rendered":"https:\/\/bendwavy.org\/wp\/?p=3789"},"modified":"2020-05-25T21:44:47","modified_gmt":"2020-05-26T05:44:47","slug":"mutant-dragons","status":"publish","type":"post","link":"https:\/\/bendwavy.org\/wp\/?p=3789","title":{"rendered":"mutant dragons"},"content":{"rendered":"<p>In 2007 I thought of a pretty way to paint a square so that all pixels are different, but similar colors are clustered.  For each pixel, set x,y to its coordinates; if their sum is odd, set the low bit of one of the color channels to 1.  Replace x,y with (-x+y)>>1, (-x-y)>>1; this has the effect of rotating the grid by 3\/8 turn and shrinking it by a factor of &radic;2, so that the former even points, which formed a larger oblique grid, now fall on the original grid, and the odd points have their new half-coordinates truncated away.  Repeat until a bit has been assigned to each bit of the three color channels.<\/p>\n<p>(More concisely: considering the pixel&#8217;s coordinates as a complex number, express it as a bit string in base (-1+i).)<\/p>\n<p>Colors that match in their higher bits form twindragon fractals, thus:<br \/>\n<img decoding=\"async\" src=\"\/doodle\/17-0000-0efce5f3a-rc.png\" align=center\/><\/p>\n<p>In 2012, I thought: what if the rotation alternates clockwise and counterclockwise?<br \/>\n<img decoding=\"async\" src=\"\/doodle\/17-1_3-0efce5f3a-dragon.png\" align=center\/><br \/>\nA bit on the boring side.<\/p>\n<p>But in 2017, I thought: what about less trivial sequences? <!--more--><br \/>\n<img decoding=\"async\" src=\"\/doodle\/17-1_5-1ed369552-dragon.png\"\/> <img decoding=\"async\" src=\"\/doodle\/17-1_7-14461cc4e-dragon.png\"\/> <img decoding=\"async\" src=\"\/doodle\/17-1_9-144602b6c-dragon.png\"\/> <img decoding=\"async\" src=\"\/doodle\/17-1_11-13b476f98-dragon.png\"\/> <img decoding=\"async\" src=\"\/doodle\/17-1_13-0dfeb1802-dragon.png\"\/> <img decoding=\"async\" src=\"\/doodle\/17-1_15-0efce5f3a-dragon.png\"\/> <img decoding=\"async\" src=\"\/doodle\/17-1_17-0efce5f3a-dragon.png\"\/> <img decoding=\"async\" src=\"\/doodle\/17-1_19-0dff2707e-dragon.png\"\/><br \/>\nSome of these have a Deco flavor.<\/p>\n<p>These pictures use only 17 bits; the three low bits of blue, and the two low bits of green and red, are all zero here.  The repeat unit is a tilted square whose edge length is 2**(17\/2) pixels; I did that so that the neighborhood of the corner is repeated in the middle.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In 2007 I thought of a pretty way to paint a square so that all pixels are different, but similar colors are clustered. For each pixel, set x,y to its coordinates; if their sum is odd, set the low bit &hellip; <a href=\"https:\/\/bendwavy.org\/wp\/?p=3789\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,12],"tags":[],"class_list":["post-3789","post","type-post","status-publish","format-standard","hentry","category-eye-candy","category-mathematics"],"_links":{"self":[{"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3789"}],"version-history":[{"count":12,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3789\/revisions"}],"predecessor-version":[{"id":4098,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=\/wp\/v2\/posts\/3789\/revisions\/4098"}],"wp:attachment":[{"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bendwavy.org\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}