Add files via upload

This commit is contained in:
nilsberglund-orleans
2022-02-05 18:44:39 +01:00
committed by GitHub
parent 8c1b829612
commit aba47ae0cc
17 changed files with 2566 additions and 373 deletions

View File

@@ -30,7 +30,7 @@
#include <sys/types.h>
#include <tiffio.h> /* Sam Leffler's libtiff library. */
#define MOVIE 1 /* set to 1 to generate movie */
#define MOVIE 0 /* set to 1 to generate movie */
#define WINWIDTH 1280 /* window width */
#define WINHEIGHT 720 /* window height */
@@ -62,7 +62,7 @@
#define SDEPTH 1 /* Sierpinski gastket depth */
#define LAMBDA 0.8 /* parameter controlling shape of domain */
#define MU 0.0025 /* second parameter controlling shape of billiard */
#define MU 0.015 /* second parameter controlling shape of billiard */
#define FOCI 1 /* set to 1 to draw focal points of ellipse */
#define NPOLY 6 /* number of sides of polygon */
#define APOLY 0.0 /* angle by which to turn polygon, in units of Pi/2 */
@@ -75,21 +75,21 @@
/* Simulation parameters */
#define NPART 1 /* number of particles */
#define NPART 5000 /* number of particles */
#define NPARTMAX 100000 /* 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 SHOWTRAILS 1 /* set to 1 to keep trails of the particles */
#define SHOWZOOM 1 /* set to 1 to show zoom on specific area */
#define PRINT_PARTICLE_NUMBER 0 /* set to 1 to print number of particles */
#define PRINT_COLLISION_NUMBER 1 /* set to 1 to print number of collisions */
#define PRINT_PARTICLE_NUMBER 1 /* set to 1 to print number of particles */
#define PRINT_COLLISION_NUMBER 0 /* set to 1 to print number of collisions */
#define TEST_ACTIVE 1 /* set to 1 to test whether particle is in billiard */
#define NSTEPS 9000 /* number of frames of movie */
#define NSTEPS 5000 /* number of frames of movie */
#define TIME 1500 /* time between movie frames, for fluidity of real-time simulation */
#define DPHI 0.00001 /* integration step */
#define NVID 300 /* number of iterations between images displayed on screen */
#define NVID 150 /* number of iterations between images displayed on screen */
/* Decreasing TIME accelerates the animation and the movie */
/* For constant speed of movie, TIME*DPHI should be kept constant */
@@ -99,14 +99,14 @@
/* Colors and other graphical parameters */
#define COLOR_PALETTE 16 /* Color palette, see list in global_pdes.c */
#define COLOR_PALETTE 11 /* Color palette, see list in global_pdes.c */
#define NCOLORS 32 /* number of colors */
#define COLORSHIFT 0 /* hue of initial color */
#define RAINBOW_COLOR 0 /* set to 1 to use different colors for all particles */
#define RAINBOW_COLOR 1 /* set to 1 to use different colors for all particles */
#define FLOWER_COLOR 0 /* set to 1 to adapt initial colors to flower billiard (tracks vs core) */
#define NSEG 100 /* number of segments of boundary */
#define LENGTH 0.015 /* length of velocity vectors */
#define LENGTH 0.05 /* length of velocity vectors */
#define BILLIARD_WIDTH 2 /* width of billiard */
#define PARTICLE_WIDTH 3 /* width of particles */
#define FRONT_WIDTH 3 /* width of wave front */
@@ -117,8 +117,8 @@
#define PAINT_INT 0 /* set to 1 to paint interior in other color (for polygon/Reuleaux) */
#define PAINT_EXT 1 /* set to 1 to paint exterior */
#define PAUSE 1000 /* number of frames after which to pause */
#define PSLEEP 1 /* sleep time during pause */
#define PAUSE 200 /* number of frames after which to pause */
#define PSLEEP 2 /* sleep time during pause */
#define SLEEP1 1 /* initial sleeping time */
#define SLEEP2 1000 /* final sleeping time */
@@ -668,7 +668,7 @@ void animation()
// init_drop_config(-1.0 + 0.3*sqrt(2.0), -1.0 + 0.5*sqrt(2.0), 0.0, DPI, configs);
// init_line_config(-1.25, -0.5, -1.25, 0.5, 0.0, configs);
init_line_config(0.0, 0.3, 0.0, 0.9, 0.0, configs);
// init_drop_config(-0.95, 0.0, -0.103 + DPI/15.0, -0.1 + DPI/15.0, configs);
/* find long trajectory */
@@ -693,8 +693,8 @@ void animation()
// }
// printf("Angle %.6lg, max length %i\n", alphamax, lengthmax);
alphamax = 2.50949;
init_drop_config(x_shooter, y_shooter, alphamax, alphamax + DPI, configs);
// alphamax = 2.50949;
// init_drop_config(x_shooter, y_shooter, alphamax, alphamax + DPI, configs);
// init_drop_config(-0.95, 0.0, 1.0, 1.0 + DPI, configs);
@@ -793,6 +793,7 @@ void animation()
s = system("mv part*.tif tif_part/");
}
}
else printf("Frame %i\n", i);
}
if (MOVIE)