35 lines
1.6 KiB
C
35 lines
1.6 KiB
C
double circlex[NMAXCIRCLES], circley[NMAXCIRCLES], circlerad[NMAXCIRCLES]; /* position and radius of circular scatters */
|
|
short int circleactive[NMAXCIRCLES]; /* tells which circular scatters are active */
|
|
int ncircles = NMAXCIRCLES; /* actual number of circles, can be decreased e.g. for random patterns */
|
|
|
|
|
|
/* some basic math */
|
|
|
|
#define PI 3.141592654
|
|
#define DPI 6.283185307
|
|
#define PID 1.570796327
|
|
|
|
/* Choice of the billiard table */
|
|
|
|
#define D_RECTANGLE 0 /* rectangular domain */
|
|
#define D_ELLIPSE 1 /* elliptical domain */
|
|
#define D_STADIUM 2 /* stadium-shaped domain */
|
|
#define D_SINAI 3 /* Sinai billiard */
|
|
#define D_DIAMOND 4 /* diamond-shaped billiard */
|
|
#define D_TRIANGLE 5 /* triangular billiard */
|
|
#define D_ANNULUS 7 /* annulus */
|
|
#define D_POLYGON 8 /* polygon */
|
|
#define D_REULEAUX 9 /* Reuleaux and star shapes */
|
|
#define D_FLOWER 10 /* Bunimovich flower */
|
|
#define D_ALT_REU 11 /* alternating between star and Reuleaux */
|
|
#define D_ANGLE 12 /* angular sector */
|
|
#define D_LSHAPE 13 /* L-shaped billiard for conical singularity */
|
|
#define D_GENUSN 14 /* polygon with identifies opposite sides */
|
|
|
|
#define D_CIRCLES 20 /* several circles */
|
|
#define D_CIRCLES_IN_RECT 21 /* several circles inside a rectangle */
|
|
|
|
#define C_FOUR_CIRCLES 0 /* four circles almost touching each other */
|
|
#define C_SQUARE 1 /* square grid of circles */
|
|
#define C_HEX 2 /* hexagonal/triangular grid of circles */
|
|
#define C_LASER 3 /* laser fight in a room of mirrors */ |