Skip to content

Instantly share code, notes, and snippets.

@peko
Last active June 30, 2016 13:58
Show Gist options
  • Select an option

  • Save peko/848a30a655b942843d693bc6f4f3d972 to your computer and use it in GitHub Desktop.

Select an option

Save peko/848a30a655b942843d693bc6f4f3d972 to your computer and use it in GitHub Desktop.
triangle encoding

triangle write

edges

9 bit

512 variants

      *      
     / \
    /   \
   *-----*
  / \   / \
 /   \ /   \   
*-----*-----* 

   3 7
    4    
 0 2 5 8
  1   6

16 bit

65536 variants

      *-----*-----*      
     / \   / \   /
    /   \ /   \ /
   *-----*-----*
  / \   / \   / 
 /   \ /   \ /   
*-----*-----* 

     9   E
  3 7 A D F 
   4   B
0 2 5 8 C
 1   6

centers

4 bit

8 variants

      *      
     / \
    /   \
   *-----*
  / \   / \
 /   \ /   \   
*-----*-----*   

 1
 2
0 3

8 bit

256 variants

      *-----*-----*      
     / \   / \   /
    /   \ /   \ /
   *-----*-----*
  / \   / \   / 
 /   \ /   \ /   
*-----*-----*

  4 7
 1 5
 2 6
0 3

hex

12 bit

4096

   *-----*     
  / \   / \
 /   \ /   \
*-----*-----*
 \   / \   /
  \ /   \ /  
   *-----*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment