12 #ifndef __CER_SH_PDL_H__
13 #define __CER_SH_PDL_H__
19 CER_SH_PDL(
double cx,
double cy,
double th,
double gain=1.0,
int layoutNum=0,
int lrMirror=0)
23 const double CST=cos(
DEG2RAD*th);
24 const double SNT=sin(
DEG2RAD*th);
33 for (
int i = 0; i<
nTaxels; ++i)
dX[0] =
dY[0] = 0.0;
93 for (
int i=0; i<
nVerts; ++i)
98 dXv[i]=cx+CST*
x-SNT*
y;
99 dYv[i]=cy+SNT*
x+CST*
y;
106 for (
int i=0; i<
nVerts; ++i)
117 void draw(
unsigned char *image)
119 for (
int i = 0; i<
nVerts; ++i)
124 for (
int i = 0; i <= 28; ++i)
if (
connected[i])
135 CER_SH_PDR(
double cx,
double cy,
double th,
double gain = 1.0,
int layoutNum = 0,
int lrMirror = 0)
139 const double CST = cos(
DEG2RAD*th);
140 const double SNT = sin(
DEG2RAD*th);
149 for (
int i = 0; i<
nTaxels; ++i)
dX[0] =
dY[0] = 0.0;
190 for (
int i = 0; i<
nTaxels; ++i)
195 if (lrMirror)
x = -
x;
197 dX[i] = cx + CST*
x - SNT*
y;
198 dY[i] = cy + SNT*
x + CST*
y;
201 dXv[0] = 49-2;
dYv[0] = 0;
202 dXv[1] = 49-2;
dYv[1] = 28;
203 dXv[2] = 49-7;
dYv[2] = 33;
204 dXv[3] = 49-22;
dYv[3] = 33;
205 dXv[4] = 49-38;
dYv[4] = 24;
206 dXv[5] = 49-49;
dYv[5] = 12;
207 dXv[6] = 49-49;
dYv[6] = 0;
209 for (
int i = 0; i<
nVerts; ++i)
213 if (lrMirror)
x = -
x;
214 dXv[i] = cx + CST*
x - SNT*
y;
215 dYv[i] = cy + SNT*
x + CST*
y;
222 for (
int i = 0; i<
nVerts; ++i)
233 void draw(
unsigned char *image)
235 for (
int i = 0; i<
nVerts; ++i)
240 for (
int i = 0; i<=28; ++i)
if (
connected[i])
251 CER_SH_PP(
double cx,
double cy,
double th,
double gain = 1.0,
int layoutNum = 0,
int lrMirror = 0)
255 const double CST = cos(
DEG2RAD*th);
256 const double SNT = sin(
DEG2RAD*th);
265 for (
int i = 0; i<
nTaxels; ++i)
dX[0] =
dY[0] = 0.0;
269 dX[
n] = 10;
dY[
n++] = 3.5;
270 dX[
n] = 16;
dY[
n++] = 3.5;
273 dX[
n] = 4;
dY[
n++] = 21.5;
274 dX[
n] = 4;
dY[
n++] = 15.5;
275 dX[
n] = 10;
dY[
n++] = 9.5;
276 dX[
n] = 10;
dY[
n++] = 15.5;
277 dX[
n] = 10;
dY[
n++] = 21.5;
278 dX[
n] = 16;
dY[
n++] = 15.5;
279 dX[
n] = 16;
dY[
n++] = 9.5;
281 dX[
n] = 16;
dY[
n++] = 33.5;
282 dX[
n] = 16;
dY[
n++] = 39.5;
283 dX[
n] = 10;
dY[
n++] = 33.5;
284 dX[
n] = 16;
dY[
n++] = 27.5;
285 dX[
n] = 10;
dY[
n++] = 39.5;
286 dX[
n] = 16;
dY[
n++] = 21.5;
287 dX[
n] = 10;
dY[
n++] = 27.5;
288 dX[
n] = 4;
dY[
n++] = 27.5;
289 dX[
n] = 4;
dY[
n++] = 33.5;
290 dX[
n] = 4;
dY[
n++] = 39.5;
294 for (
int i = 0; i<
nTaxels; ++i)
299 if (lrMirror)
x = -
x;
301 dX[i] = cx + CST*
x - SNT*
y;
302 dY[i] = cy + SNT*
x + CST*
y;
310 for (
int i = 0; i<
nVerts; ++i)
314 if (lrMirror)
x = -
x;
315 dXv[i] = cx + CST*
x - SNT*
y;
316 dYv[i] = cy + SNT*
x + CST*
y;
323 for (
int i = 0; i<
nVerts; ++i)
334 void draw(
unsigned char *image)
336 for (
int i = 0; i<
nVerts; ++i)
341 for (
int i = 0; i <= 21; ++i)
if (
connected[i])
352 CER_SH_TD(
double cx,
double cy,
double th,
double gain = 1.0,
int layoutNum = 0,
int lrMirror = 0)
356 const double CST = cos(
DEG2RAD*th);
357 const double SNT = sin(
DEG2RAD*th);
366 for (
int i = 0; i <
nTaxels; ++i)
dX[0] =
dY[0] = 0.0;
370 dX[
n] = 30.0;
dY[
n++] = 10.5;
371 dX[
n] = 30.0;
dY[
n++] = 4.5;
372 dX[
n] = 18.0;
dY[
n++] = 4.5;
373 dX[
n] = 6.1;
dY[
n++] = 4.5;
374 dX[
n] = 12.0;
dY[
n++] = 4.5;
375 dX[
n] = 24.0;
dY[
n++] = 4.5;
376 dX[
n] = 12.0;
dY[
n++] = 16.4;
377 dX[
n] = 18.0;
dY[
n++] = 10.5;
378 dX[
n] = 18.0;
dY[
n++] = 16.5;
379 dX[
n] = 24.0;
dY[
n++] = 16.5;
380 dX[
n] = 24.0;
dY[
n++] = 10.5;
382 dX[
n] = 12.0;
dY[
n++] = 10.5;
383 dX[
n] = 6.0;
dY[
n++] = 10.5;
395 for (
int i = 0; i <
nTaxels; ++i)
400 if (lrMirror)
x = -
x;
402 dX[i] = cx + CST*
x - SNT*
y;
403 dY[i] = cy + SNT*
x + CST*
y;
413 for (
int i = 0; i <
nVerts; ++i)
417 if (lrMirror)
x = -
x;
418 dXv[i] = cx + CST*
x - SNT*
y;
419 dYv[i] = cy + SNT*
x + CST*
y;
426 for (
int i = 0; i <
nVerts; ++i)
437 void draw(
unsigned char *image)
439 for (
int i = 0; i <
nVerts; ++i)
444 for (
int i = 0; i <= 13; ++i)
if (
connected[i])
455 CER_SH_TP(
double cx,
double cy,
double th,
double gain = 1.0,
int layoutNum = 0,
int lrMirror = 0)
459 const double CST = cos(
DEG2RAD*th);
460 const double SNT = sin(
DEG2RAD*th);
469 for (
int i = 0; i <
nTaxels; ++i)
dX[0] =
dY[0] = 0.0;
473 dX[
n] = 3.0;
dY[
n++] = 17;
475 dX[
n] = 3.0;
dY[
n++] = 11;
476 dX[
n] = 10.0;
dY[
n++] = 5;
477 dX[
n] = 10.0;
dY[
n++] = 29;
478 dX[
n] = 3.0;
dY[
n++] = 23;
479 dX[
n] = 3.0;
dY[
n++] = 29;
480 dX[
n] = 10.0;
dY[
n++] = 23;
481 dX[
n] = 10.0;
dY[
n++] = 17;
482 dX[
n] = 10.0;
dY[
n++] = 11;
487 for (
int i = 0; i <
nTaxels; ++i)
492 if (lrMirror)
x = -
x;
494 dX[i] = cx + CST*
x - SNT*
y;
495 dY[i] = cy + SNT*
x + CST*
y;
503 for (
int i = 0; i <
nVerts; ++i)
507 if (lrMirror)
x = -
x;
508 dXv[i] = cx + CST*
x - SNT*
y;
509 dYv[i] = cy + SNT*
x + CST*
y;
516 for (
int i = 0; i <
nVerts; ++i)
527 void draw(
unsigned char *image)
529 for (
int i = 0; i <
nVerts; ++i)
534 for (
int i = 0; i <= 9; ++i)
if (
connected[i])
CER_SH_PDL(double cx, double cy, double th, double gain=1.0, int layoutNum=0, int lrMirror=0)
void draw(unsigned char *image)
void draw(unsigned char *image)
CER_SH_PDR(double cx, double cy, double th, double gain=1.0, int layoutNum=0, int lrMirror=0)
void draw(unsigned char *image)
CER_SH_PP(double cx, double cy, double th, double gain=1.0, int layoutNum=0, int lrMirror=0)
CER_SH_TD(double cx, double cy, double th, double gain=1.0, int layoutNum=0, int lrMirror=0)
void draw(unsigned char *image)
void draw(unsigned char *image)
CER_SH_TP(double cx, double cy, double th, double gain=1.0, int layoutNum=0, int lrMirror=0)
bool connected[MAX_TAXELS]
void drawLine(unsigned char *image, int x0, int y0, int x1, int y1)
void drawCircle(unsigned char *image, int cx, int cy, double radius)