X-Git-Url: https://pd.if.org/git/?p=hexagon;a=blobdiff_plain;f=hexagon.c;h=123e5cfa2539928b357a178f3bef9402c685df0f;hp=61bb47b0fd80429ddd49e57df1e72ebb450cfc12;hb=b23bb67f8c88ba23499d1c6e7b444b6561aeb49a;hpb=8e2913bfbd2ae3cd8a2d07b879f0e78e455fed6f diff --git a/hexagon.c b/hexagon.c index 61bb47b..123e5cf 100644 --- a/hexagon.c +++ b/hexagon.c @@ -12,7 +12,7 @@ static int inversecantor(int cantor, int *x, int *y); * domain */ -double HL_vertexv[] = { +double HL_vertexv[12] = { .577350269189625764509148780502, 0.0, .288675134594812882254574390251, 0.5, -.288675134594812882254574390251, 0.5, @@ -20,6 +20,28 @@ double HL_vertexv[] = { -.288675134594812882254574390251, -0.5, .288675134594812882254574390251, -0.5}; +double HL_fand[16] = { + 0.0, 0.0, + .577350269189625764509148780502, 0.0, + .288675134594812882254574390251, 0.5, + -.288675134594812882254574390251, 0.5, + -.577350269189625764509148780502, 0.0, + -.288675134594812882254574390251, -0.5, + .288675134594812882254574390251, -0.5, + .577350269189625764509148780502, 0.0 +}; + +float HL_fanf[16] = { + 0.0f, 0.0f, + .577350269189625764509148780502f, 0.0f, + .288675134594812882254574390251f, 0.5f, + -.288675134594812882254574390251f, 0.5f, + -.577350269189625764509148780502f, 0.0f, + -.288675134594812882254574390251f, -0.5f, + .288675134594812882254574390251f, -0.5f, + .577350269189625764509148780502f, 0.0f +}; + /* these all are for a hex one unit across */ static double hexptvd[6][2] = { {.577350269189625764509148780502, 0.0}, /* 1.0/sqrt3 */