Popular recipes tagged "bits" but not "bytes"http://code.activestate.com/recipes/tags/bits-bytes/2011-02-02T12:50:58-08:00ActiveState Code Recipesinterleave bits (aka morton-ize aka z-order curve) (Python) 2011-02-02T12:50:58-08:00Romain Dartigueshttp://code.activestate.com/recipes/users/4167472/http://code.activestate.com/recipes/577558-interleave-bits-aka-morton-ize-aka-z-order-curve/ <p style="color: grey"> Python recipe 577558 by <a href="/recipes/users/4167472/">Romain Dartigues</a> (<a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/bits/">bits</a>, <a href="/recipes/tags/manipulation/">manipulation</a>, <a href="/recipes/tags/mathematical/">mathematical</a>, <a href="/recipes/tags/mathematics/">mathematics</a>). </p> <p>This recipe let you encode in a single number two or three numbers.</p> <p>Note: this is only an adaptation of the recipes from <strong>Sean Eron Anderson</strong> and <strong>Fabian “ryg” Giesen</strong>; all credits goes to the respective authors.</p> <ul> <li><a href="http://graphics.stanford.edu/%7Eseander/bithacks.html#InterleaveBMN" rel="nofollow">http://graphics.stanford.edu/~seander/bithacks.html#InterleaveBMN</a></li> <li><a href="http://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/" rel="nofollow">http://fgiesen.wordpress.com/2009/12/13/decoding-morton-codes/</a></li> </ul>