This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
// Each character encodes an angle of a plane we are checking | |
const char plane_angles[] = "O:85!fI,wfO8!yZfO8!f*hXK3&fO;:O;#hP;\"i["; | |
// and these encode an offset from the origin s.t. (x, y) dot (cos(a), sin(a)) < offset | |
const char plane_offsets[] = "<[\\]O=IKNAL;KNRbF8EbGEROQ@BSXXtG!#t3!^"; | |
// this table encodes the offsets within the above tables of each polygon |