Add files via upload
This commit is contained in:
parent
e57c4b8f30
commit
9716df4078
@ -245,11 +245,64 @@ updated gradually. Some constants have been moved to global files in later versi
|
||||
|
||||
### 26 April 21 - Is the billiard in a stadium reversible? ###
|
||||
|
||||
**Program:** `xxx.c`
|
||||
**Program:** Variant of `vid_part_billiard.c`
|
||||
|
||||
**Initial condition in function `animation()`:** `xxx`
|
||||
**Initial condition in function `animation()`:** `init_drop_config(0.5, -1.0, 1.8, 2.0, configs);`
|
||||
|
||||
```
|
||||
#define WINWIDTH 1280 /* window width */
|
||||
#define WINHEIGHT 720 /* window height */
|
||||
|
||||
/* Choice of the billiard table */
|
||||
|
||||
#define B_DOMAIN 2 /* choice of domain shape */
|
||||
|
||||
#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 LAMBDA 1.0 /* aspect ratio of ellipse */
|
||||
#define FOCI 1 /* set to 1 to draw focal points of ellipse */
|
||||
|
||||
#define MOVIE 1 /* set to 1 to generate movie */
|
||||
#define RESAMPLE 0 /* set to 1 if particles should be added when dispersion too large */
|
||||
|
||||
#define XMIN -2.0
|
||||
#define XMAX 2.0 /* x interval */
|
||||
#define YMIN -1.125
|
||||
#define YMAX 1.125 /* y interval for 9/16 aspect ratio */
|
||||
|
||||
#define NPART 200 /* number of particles */
|
||||
#define NPARTMAX 50000 /* maximal number of particles after resampling */
|
||||
#define LMAX 0.01 /* minimal segment length triggering resampling */
|
||||
#define DMIN 0.02 /* minimal distance to boundary for triggering resampling */
|
||||
#define CYCLE 1 /* set to 1 for closed curve (start in all directions) */
|
||||
|
||||
#define NSTEPS 3000 /* number of frames of movie */
|
||||
#define TIME 1000 /* time between movie frames, for fluidity of real-time simulation */
|
||||
#define DPHI 0.00001 /* integration step */
|
||||
#define NVID 100 /* number of iterations between images displayed on screen */
|
||||
#define NCOLORS 20 /* number of colors */
|
||||
#define COLORSHIFT 220 /* hue of initial color */
|
||||
#define NSEG 100 /* number of segments of boundary */
|
||||
#define LENGTH 0.05 /* length of velocity vectors */
|
||||
|
||||
/* Decreasing TIME accelerates the animation and the movie */
|
||||
/* For constant speed of movie, TIME*DPHI should be kept constant */
|
||||
/* However, increasing DPHI too much deterioriates quality of simulation */
|
||||
/* NVID tells how often a picture is drawn in the animation, increase it for faster anim */
|
||||
/* For a good quality movie, take for instance TIME = 400, DPHI = 0.00005, NVID = 100 */
|
||||
|
||||
#define PAUSE 10 /* number of frames after which to pause */
|
||||
#define PSLEEP 1 /* sleep time during pause */
|
||||
#define SLEEP1 1 /* initial sleeping time */
|
||||
#define SLEEP2 100 /* final sleeping time */
|
||||
|
||||
#define PI 3.141592654
|
||||
#define DPI 6.283185307
|
||||
#define PID 1.570796327
|
||||
|
||||
```
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user