Add files via upload
This commit is contained in:
151
wave_billiard.c
151
wave_billiard.c
@@ -49,7 +49,7 @@
|
||||
#define NO_EXTRA_BUFFER_SWAP 1 /* some OS require one less buffer swap when recording images */
|
||||
|
||||
#define VARIABLE_IOR 0 /* set to 1 for a variable index of refraction */
|
||||
#define IOR 17 /* choice of index of refraction, see list in global_pdes.c */
|
||||
#define IOR 191 /* choice of index of refraction, see list in global_pdes.c */
|
||||
#define IOR_TOTAL_TURNS 1.5 /* total angle of rotation for IOR_PERIODIC_WELLS_ROTATING */
|
||||
#define MANDEL_IOR_SCALE -0.05 /* parameter controlling dependence of IoR on Mandelbrot escape speed */
|
||||
|
||||
@@ -57,23 +57,26 @@
|
||||
|
||||
#define WINWIDTH 1920 /* window width */
|
||||
#define WINHEIGHT 1150 /* window height */
|
||||
// #define NX 1920 /* number of grid points on x axis */
|
||||
// #define NY 1150 /* number of grid points on y axis */
|
||||
#define NX 3840 /* number of grid points on x axis */
|
||||
#define NY 2300 /* number of grid points on y axis */
|
||||
|
||||
#define XMIN -1.6
|
||||
#define XMAX 2.4 /* x interval */
|
||||
#define XMIN -2.0
|
||||
#define XMAX 2.0 /* x interval */
|
||||
#define YMIN -1.197916667
|
||||
#define YMAX 1.197916667 /* y interval for 9/16 aspect ratio */
|
||||
|
||||
#define HIGHRES 1 /* set to 1 if resolution of grid is double that of displayed image */
|
||||
#define HRES 1 /* dummy, only used by rde.c */
|
||||
|
||||
#define JULIA_SCALE 1.0 /* scaling for Julia sets */
|
||||
|
||||
/* Choice of the billiard table */
|
||||
|
||||
#define B_DOMAIN 75 /* choice of domain shape, see list in global_pdes.c */
|
||||
#define B_DOMAIN 20 /* choice of domain shape, see list in global_pdes.c */
|
||||
|
||||
#define CIRCLE_PATTERN 103 /* pattern of circles or polygons, see list in global_pdes.c */
|
||||
#define CIRCLE_PATTERN 1 /* pattern of circles or polygons, see list in global_pdes.c */
|
||||
|
||||
#define COMPARISON 0 /* set to 1 to compare two different patterns (beta) */
|
||||
#define B_DOMAIN_B 20 /* second domain shape, for comparisons */
|
||||
@@ -83,9 +86,9 @@
|
||||
#define NPOISSON 1000 /* number of points for Poisson C_RAND_POISSON arrangement */
|
||||
#define RANDOM_POLY_ANGLE 1 /* set to 1 to randomize angle of polygons */
|
||||
|
||||
#define LAMBDA 3.0 /* parameter controlling the dimensions of domain */
|
||||
#define MU 0.14 /* parameter controlling the dimensions of domain */
|
||||
#define MU_B 0.42 /* parameter controlling the dimensions of domain */
|
||||
#define LAMBDA 0.2 /* parameter controlling the dimensions of domain */
|
||||
#define MU 0.012 /* parameter controlling the dimensions of domain */
|
||||
#define MU_B 1.0 /* parameter controlling the dimensions of domain */
|
||||
#define NPOLY 6 /* number of sides of polygon */
|
||||
#define APOLY -0.666666666666 /* angle by which to turn polygon, in units of Pi/2 */
|
||||
#define MDEPTH 6 /* depth of computation of Menger gasket */
|
||||
@@ -93,8 +96,8 @@
|
||||
#define MANDELLEVEL 1000 /* iteration level for Mandelbrot set */
|
||||
#define MANDELLIMIT 10.0 /* limit value for approximation of Mandelbrot set */
|
||||
#define FOCI 1 /* set to 1 to draw focal points of ellipse */
|
||||
#define NGRIDX 60 /* number of grid point for grid of disks */
|
||||
#define NGRIDY 10 /* number of grid point for grid of disks */
|
||||
#define NGRIDX 24 /* number of grid point for grid of disks */
|
||||
#define NGRIDY 40 /* number of grid point for grid of disks */
|
||||
#define WALL_WIDTH 0.1 /* width of wall separating lenses */
|
||||
|
||||
#define X_SHOOTER -0.2
|
||||
@@ -114,17 +117,19 @@
|
||||
/* Physical parameters of wave equation */
|
||||
|
||||
#define TWOSPEEDS 0 /* set to 1 to replace hardcore boundary by medium with different speed */
|
||||
#define OSCILLATE_LEFT 1 /* set to 1 to add oscilating boundary condition on the left */
|
||||
#define OSCILLATE_LEFT 0 /* set to 1 to add oscilating boundary condition on the left */
|
||||
#define OSCILLATE_TOPBOT 0 /* set to 1 to enforce a planar wave on top and bottom boundary */
|
||||
#define OSCILLATION_SCHEDULE 0 /* oscillation schedule, see list in global_pdes.c */
|
||||
#define OSCILLATION_SCHEDULE 61 /* oscillation schedule, see list in global_pdes.c */
|
||||
#define OSCIL_YMAX 0.35 /* defines oscillation range */
|
||||
#define INITIAL_SHIFT 20.0 /* time shift of initial wave packet (in oscillation periods) */
|
||||
#define WAVE_PACKET_SHIFT 200.0 /* time shift between wave packets (in oscillation periods) */
|
||||
|
||||
#define OMEGA 0.015 /* frequency of periodic excitation */
|
||||
#define AMPLITUDE 1.0 /* amplitude of periodic excitation */
|
||||
#define OMEGA 0.025 /* frequency of periodic excitation */
|
||||
#define AMPLITUDE 0.5 /* amplitude of periodic excitation */
|
||||
#define ACHIRP 0.25 /* acceleration coefficient in chirp */
|
||||
#define DAMPING 0.0 /* damping of periodic excitation */
|
||||
#define COURANT 0.1 /* Courant number */
|
||||
#define COURANTB 0.03 /* Courant number in medium B */
|
||||
#define COURANT 0.2 /* Courant number */
|
||||
#define COURANTB 0.0 /* Courant number in medium B */
|
||||
#define GAMMA 0.0 /* damping factor in wave equation */
|
||||
#define GAMMAB 0.0 /* damping factor in wave equation */
|
||||
#define GAMMA_SIDES 1.0e-4 /* damping factor on boundary */
|
||||
@@ -132,15 +137,16 @@
|
||||
#define KAPPA 0.0 /* "elasticity" term enforcing oscillations */
|
||||
#define KAPPA_SIDES 5.0e-4 /* "elasticity" term on absorbing boundary */
|
||||
#define KAPPA_TOPBOT 0.0 /* "elasticity" term on absorbing boundary */
|
||||
#define OSCIL_LEFT_YSHIFT 0.0 /* y-dependence of left oscillation (for non-horizontal waves) */
|
||||
#define OSCIL_LEFT_YSHIFT 40.0 /* y-dependence of left oscillation (for non-horizontal waves) */
|
||||
/* The Courant number is given by c*DT/DX, where DT is the time step and DX the lattice spacing */
|
||||
/* The physical damping coefficient is given by GAMMA/(DT)^2 */
|
||||
/* Increasing COURANT speeds up the simulation, but decreases accuracy */
|
||||
/* For similar wave forms, COURANT^2*GAMMA should be kept constant */
|
||||
|
||||
#define ADD_OSCILLATING_SOURCE 0 /* set to 1 to add an oscillating wave source */
|
||||
#define OSCILLATING_SOURCE_PERIOD 4 /* period of oscillating source */
|
||||
#define ADD_OSCILLATING_SOURCE 1 /* set to 1 to add an oscillating wave source */
|
||||
#define OSCILLATING_SOURCE_PERIOD 8 /* period of oscillating source */
|
||||
#define ALTERNATE_OSCILLATING_SOURCE 1 /* set to 1 to alternate sign of oscillating source */
|
||||
#define N_SOURCES 2 /* number of sources, for option draw_sources */
|
||||
|
||||
#define ADD_WAVE_PACKET_SOURCES 0 /* set to 1 to add several sources emitting wave packets */
|
||||
#define WAVE_PACKET_SOURCE_TYPE 3 /* type of wave packet sources */
|
||||
@@ -151,14 +157,14 @@
|
||||
|
||||
/* Boundary conditions, see list in global_pdes.c */
|
||||
|
||||
#define B_COND 3
|
||||
#define B_COND 2
|
||||
|
||||
/* Parameters for length and speed of simulation */
|
||||
|
||||
#define NSTEPS 2200 /* number of frames of movie */
|
||||
#define NVID 15 /* number of iterations between images displayed on screen */
|
||||
#define NSTEPS 1600 /* number of frames of movie */
|
||||
#define NVID 8 /* number of iterations between images displayed on screen */
|
||||
#define NSEG 1000 /* number of segments of boundary */
|
||||
#define INITIAL_TIME 50 /* time after which to start saving frames */
|
||||
#define INITIAL_TIME 0 /* time after which to start saving frames */
|
||||
#define BOUNDARY_WIDTH 2 /* width of billiard boundary */
|
||||
#define PRINT_SPEED 0 /* print speed of moving source */
|
||||
#define PRINT_FREQUENCY 0 /* print frequency (for phased array) */
|
||||
@@ -173,9 +179,9 @@
|
||||
|
||||
/* Parameters of initial condition */
|
||||
|
||||
#define INITIAL_AMP 0.75 /* amplitude of initial condition */
|
||||
#define INITIAL_VARIANCE 0.01 /* variance of initial condition */
|
||||
#define INITIAL_WAVELENGTH 0.025 /* wavelength of initial condition */
|
||||
#define INITIAL_AMP 1.5 /* amplitude of initial condition */
|
||||
#define INITIAL_VARIANCE 0.00001 /* variance of initial condition */
|
||||
#define INITIAL_WAVELENGTH 0.025 /* wavelength of initial condition */
|
||||
|
||||
/* Plot type, see list in global_pdes.c */
|
||||
|
||||
@@ -185,8 +191,8 @@
|
||||
|
||||
/* Color schemes */
|
||||
|
||||
#define COLOR_PALETTE 17 /* Color palette, see list in global_pdes.c */
|
||||
#define COLOR_PALETTE_B 13 /* Color palette, see list in global_pdes.c */
|
||||
#define COLOR_PALETTE 11 /* Color palette, see list in global_pdes.c */
|
||||
#define COLOR_PALETTE_B 14 /* Color palette, see list in global_pdes.c */
|
||||
|
||||
#define BLACK 1 /* background */
|
||||
|
||||
@@ -197,12 +203,15 @@
|
||||
#define PHASE_FACTOR 1.0 /* factor in computation of phase in color scheme P_3D_PHASE */
|
||||
#define PHASE_SHIFT 0.0 /* shift of phase in color scheme P_3D_PHASE */
|
||||
#define ATTENUATION 0.0 /* exponential attenuation coefficient of contrast with time */
|
||||
#define E_SCALE 75.0 /* scaling factor for energy representation */
|
||||
#define LOG_SCALE 0.75 /* scaling factor for energy log representation */
|
||||
#define LOG_SHIFT 1.5 /* shift of colors on log scale */
|
||||
#define E_SCALE 55.0 /* scaling factor for energy representation */
|
||||
#define LOG_SCALE 1.0 /* scaling factor for energy log representation */
|
||||
#define LOG_SHIFT 0.5 /* shift of colors on log scale */
|
||||
#define FLUX_SCALE 5.0e3 /* scaling factor for energy flux represtnation */
|
||||
#define AVRG_E_FACTOR 0.95 /* controls time window size in P_AVERAGE_ENERGY scheme */
|
||||
#define RESCALE_COLOR_IN_CENTER 0 /* set to 1 to decrease color intentiy in the center (for wave escaping ring) */
|
||||
#define FADE_IN_OBSTACLE 0 /* set to 1 to fade color inside obstacles */
|
||||
#define SHADE_2D 1 /* set to 1 to add pseudo-3d shading effect */
|
||||
#define SHADE_SCALE_2D 0.05 /* lower value increases sensitivity of shading */
|
||||
|
||||
#define COLORHUE 260 /* initial hue of water color for scheme C_LUM */
|
||||
#define COLORDRIFT 0.0 /* how much the color hue drifts during the whole simulation */
|
||||
@@ -212,23 +221,23 @@
|
||||
#define HUEAMP -180.0 /* amplitude of variation of hue for color scheme C_HUE */
|
||||
|
||||
#define DRAW_COLOR_SCHEME 0 /* set to 1 to plot the color scheme */
|
||||
#define COLORBAR_RANGE 3.0 /* scale of color scheme bar */
|
||||
#define COLORBAR_RANGE_B 1.5 /* scale of color scheme bar for 2nd part */
|
||||
#define ROTATE_COLOR_SCHEME 1 /* set to 1 to draw color scheme horizontally */
|
||||
#define COLORBAR_RANGE 2.0 /* scale of color scheme bar */
|
||||
#define COLORBAR_RANGE_B 0.8 /* scale of color scheme bar for 2nd part */
|
||||
#define ROTATE_COLOR_SCHEME 0 /* set to 1 to draw color scheme horizontally */
|
||||
#define CIRC_COLORBAR 0 /* set to 1 to draw circular color scheme */
|
||||
#define CIRC_COLORBAR_B 0 /* set to 1 to draw circular color scheme */
|
||||
|
||||
#define DRAW_WAVE_PROFILE 1 /* set to 1 to draw a profile of the wave */
|
||||
#define HORIZONTAL_WAVE_PROFILE 0 /* set to 1 to draw wave profile vertically */
|
||||
#define VERTICAL_WAVE_PROFILE 1 /* set to 1 to draw wave profile vertically */
|
||||
#define WAVE_PROFILE_X 2.1 /* value of x to sample wave profile */
|
||||
#define WAVE_PROFILE_Y -1.0 /* value of y to sample wave profile */
|
||||
#define WAVE_PROFILE_X 1.9 /* value of x to sample wave profile */
|
||||
#define WAVE_PROFILE_Y 0.075 /* value of y to sample wave profile */
|
||||
#define PROFILE_AT_BOTTOM 1 /* draw wave profile at bottom instead of top */
|
||||
#define AVERAGE_WAVE_PROFILE 1 /* set to 1 to draw time-average of wave profile squared*/
|
||||
#define DRAW_WAVE_TIMESERIES 0 /* set to 1 to draw a time series of the wave, 2 to also draw it at the top */
|
||||
#define TIMESERIES_NVALUES 400 /* number of values plotted in time series */
|
||||
#define SAVE_TIME_SERIES 0 /* set to 1 to save wave time series at a point */
|
||||
#define DRAW_WAVE_SOURCE 0 /* set to 1 to draw source of wave at (wave_source_x, wave_source_y) */
|
||||
#define DRAW_WAVE_SOURCE 1 /* set to 1 to draw source of wave at (wave_source_x, wave_source_y), set to 2 to also draw focus */
|
||||
|
||||
#define MESSAGE_LDASH 14 /* length of dash for Morse code message */
|
||||
#define MESSAGE_LDOT 8 /* length of dot for Morse code message */
|
||||
@@ -257,6 +266,8 @@
|
||||
#define MEAN_FLUX (PLOT == P_TOTAL_ENERGY_FLUX)||(PLOT_B == P_TOTAL_ENERGY_FLUX)
|
||||
#define REFRESH_IOR ((IOR == IOR_PERIODIC_WELLS_ROTATING)||(IOR == IOR_PERIODIC_WELLS_ROTATING_LARGE))
|
||||
|
||||
double light[2] = {0.40824829, 0.816496581}; /* location of light source for SHADE_2D option*/
|
||||
|
||||
#include "global_pdes.c" /* constants and global variables */
|
||||
#include "sub_maze.c" /* support for generating mazes */
|
||||
#include "sub_wave.c" /* common functions for wave_billiard, heat and schrodinger */
|
||||
@@ -264,8 +275,6 @@
|
||||
|
||||
FILE *time_series_left, *time_series_right;
|
||||
|
||||
double courant2, courantb2; /* Courant parameters squared */
|
||||
|
||||
/*********************/
|
||||
/* animation part */
|
||||
/*********************/
|
||||
@@ -296,22 +305,11 @@ void evolve_wave_half(double *phi_in[NX], double *psi_in[NX], double *phi_out[NX
|
||||
for (j=0; j<NY; j++){
|
||||
if (xy_in[i][j] != 0)
|
||||
{
|
||||
tc[i][j] = COURANT;
|
||||
if (!VARIABLE_IOR)
|
||||
{
|
||||
tcc[i][j] = courant2;
|
||||
if (xy_in[i][j] == 1) tgamma[i][j] = GAMMA;
|
||||
else tgamma[i][j] = GAMMAB;
|
||||
}
|
||||
tc[i][j] = sqrt(tcc[i][j]);
|
||||
}
|
||||
else if (TWOSPEEDS)
|
||||
{
|
||||
tc[i][j] = COURANTB;
|
||||
if (!VARIABLE_IOR)
|
||||
{
|
||||
tcc[i][j] = courantb2;
|
||||
tgamma[i][j] = GAMMAB;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -590,8 +588,8 @@ void draw_color_bar_palette(int plot, double range, int palette, int circular, i
|
||||
|
||||
void animation()
|
||||
{
|
||||
double time, scale, ratio, startleft[2], startright[2], sign = 1.0, r2, xy[2], fade_value, yshift, speed = 0.0, a, b, c, x, y, angle = 0.0, x1, sign1, ior_angle = 0.0, omega, phase_shift, vshift;
|
||||
double *phi[NX], *psi[NX], *tmp[NX], *total_energy[NX], *average_energy[NX], *color_scale[NX], *total_flux, *tcc_table[NX], *tgamma_table[NX];
|
||||
double time, scale, ratio, startleft[2], startright[2], sign = 1.0, r2, xy[2], fade_value, yshift, speed = 0.0, a, b, c, x, y, angle = 0.0, x1, sign1 = 1.0, ior_angle = 0.0, omega, phase_shift, vshift, dsource, finv;
|
||||
double *phi[NX], *psi[NX], *tmp[NX], *total_energy[NX], *average_energy[NX], *color_scale[NX], *total_flux, *tcc_table[NX], *tgamma_table[NX], *fade_table;
|
||||
short int *xy_in[NX];
|
||||
int i, j, k, s, sample_left[2], sample_right[2], period = 0, fade, source_counter = 0, p, q, first_source = 1, imin, imax, ij[2];
|
||||
// static int image_counter = 0;
|
||||
@@ -620,6 +618,8 @@ void animation()
|
||||
tgamma_table[i] = (double *)malloc(NX*sizeof(double));
|
||||
}
|
||||
|
||||
if (FADE_IN_OBSTACLE) fade_table = (double *)malloc(NX*NY*sizeof(double));
|
||||
|
||||
if (MEAN_FLUX) total_flux = (double *)malloc(4*NX*NY*sizeof(double));
|
||||
|
||||
if (ADD_WAVE_PACKET_SOURCES)
|
||||
@@ -706,8 +706,8 @@ void animation()
|
||||
|
||||
init_wave_flat(phi, psi, xy_in);
|
||||
|
||||
// if (VARIABLE_IOR)
|
||||
init_ior_2d(xy_in, tcc_table, tgamma_table, ior_angle);
|
||||
if (FADE_IN_OBSTACLE) init_fade_table(tcc_table, fade_table);
|
||||
|
||||
// init_circular_wave(-1.5, 0.0, phi, psi, xy_in);
|
||||
// x = XMIN + (XMAX - XMIN)*rand()/RAND_MAX;
|
||||
@@ -760,7 +760,7 @@ void animation()
|
||||
blank();
|
||||
glColor3f(0.0, 0.0, 0.0);
|
||||
// draw_wave(phi, psi, xy_in, 1.0, 0, PLOT);
|
||||
if (HIGHRES) draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, total_flux, xy_in, 1.0, 0, PLOT, COLOR_PALETTE, 1, 0, 1.0);
|
||||
if (HIGHRES) draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, fade_table, total_flux, xy_in, 1.0, 0, PLOT, COLOR_PALETTE, 1, 0, 1.0);
|
||||
else draw_wave_epalette(phi, psi, total_energy, average_energy, total_flux, color_scale, xy_in, 1.0, 0, PLOT, COLOR_PALETTE, 0, 1.0);
|
||||
|
||||
// draw_billiard(0, 1.0);
|
||||
@@ -797,7 +797,7 @@ void animation()
|
||||
else scale = 1.0;
|
||||
|
||||
// draw_wave(phi, psi, xy_in, scale, i, PLOT);
|
||||
if (HIGHRES) draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, total_flux, xy_in, scale, i, PLOT, COLOR_PALETTE, 0, 0, 1.0);
|
||||
if (HIGHRES) draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, fade_table, total_flux, xy_in, scale, i, PLOT, COLOR_PALETTE, 0, 0, 1.0);
|
||||
else draw_wave_epalette(phi, psi, total_energy, average_energy, total_flux, color_scale, xy_in, scale, i, PLOT, COLOR_PALETTE, 0, 1.0);
|
||||
for (j=0; j<NVID; j++)
|
||||
{
|
||||
@@ -819,26 +819,19 @@ void animation()
|
||||
if (DRAW_COLOR_SCHEME) draw_color_bar_palette(PLOT, COLORBAR_RANGE, COLOR_PALETTE, CIRC_COLORBAR, fade, fade_value);
|
||||
|
||||
/* add oscillating waves */
|
||||
// if (ADD_OSCILLATING_SOURCE)
|
||||
wave_source_x[0] = -1.6;
|
||||
wave_source_y[0] = 0.5;
|
||||
wave_source_x[1] = -1.6;
|
||||
wave_source_y[1] = -0.5;
|
||||
if ((ADD_OSCILLATING_SOURCE)&&(i%OSCILLATING_SOURCE_PERIOD == 1))
|
||||
{
|
||||
if (ALTERNATE_OSCILLATING_SOURCE) sign = -sign;
|
||||
|
||||
wave_source_x = -1.75;
|
||||
wave_source_y = -0.5 + (YMAX - YMIN)*(double)i/(double)NSTEPS;
|
||||
add_circular_wave(sign, wave_source_x, wave_source_y, phi, psi, xy_in);
|
||||
|
||||
|
||||
// if (input_signal[i])
|
||||
// {
|
||||
// add_vertical_wave(sign, -2.0, 0.5 - y, 0.5 + y, phi, psi, xy_in);
|
||||
// add_vertical_wave(sign, -2.0, -0.5 - y, -0.5 + y, phi, psi, xy_in);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// damp_vertical_wave(0.01, 20, -2.0, 0.5 - y, 0.5 + y, phi, psi);
|
||||
// damp_vertical_wave(0.01, 20, -2.0, -0.5 - y, -0.5 + y, phi, psi);
|
||||
// }
|
||||
add_circular_wave(sign*INITIAL_AMP, wave_source_x[0], wave_source_y[0], phi, psi, xy_in);
|
||||
}
|
||||
if ((ADD_OSCILLATING_SOURCE)&&(i%(OSCILLATING_SOURCE_PERIOD/3) == 1))
|
||||
{
|
||||
if (ALTERNATE_OSCILLATING_SOURCE) sign1 = -sign1;
|
||||
add_circular_wave(sign1*INITIAL_AMP/sqrt(3.0), wave_source_x[1], wave_source_y[1], phi, psi, xy_in);
|
||||
}
|
||||
|
||||
if (ADD_WAVE_PACKET_SOURCES) add_wave_packets(phi, psi, xy_in, packet, i, WAVE_PACKET_RADIUS, 1, 4, 1);
|
||||
@@ -869,7 +862,7 @@ void animation()
|
||||
{
|
||||
// draw_wave(phi, psi, xy_in, scale, i, PLOT_B);
|
||||
if (HIGHRES)
|
||||
draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, total_flux, xy_in, scale, i, PLOT_B, COLOR_PALETTE_B, 1, 0, 1.0);
|
||||
draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, fade_table, total_flux, xy_in, scale, i, PLOT_B, COLOR_PALETTE_B, 1, 0, 1.0);
|
||||
else draw_wave_epalette(phi, psi, total_energy, average_energy, total_flux, color_scale, xy_in, scale, i, PLOT_B, COLOR_PALETTE_B, 0, 1.0);
|
||||
// draw_billiard(0, 1.0);
|
||||
if (DRAW_COLOR_SCHEME) draw_color_bar_palette(PLOT_B, COLORBAR_RANGE_B, COLOR_PALETTE_B, CIRC_COLORBAR_B, 0, 1.0);
|
||||
@@ -900,7 +893,7 @@ void animation()
|
||||
if (DOUBLE_MOVIE)
|
||||
{
|
||||
// draw_wave(phi, psi, xy_in, scale, i, PLOT);
|
||||
if (HIGHRES) draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, total_flux, xy_in, scale, NSTEPS, PLOT, COLOR_PALETTE, 0, 0, 1.0);
|
||||
if (HIGHRES) draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, fade_table, total_flux, xy_in, scale, NSTEPS, PLOT, COLOR_PALETTE, 0, 0, 1.0);
|
||||
else draw_wave_epalette(phi, psi, total_energy, average_energy, total_flux, color_scale, xy_in, scale, NSTEPS, PLOT, COLOR_PALETTE, 0, 1.0);
|
||||
// draw_billiard(0, 1.0);
|
||||
if (DRAW_COLOR_SCHEME) draw_color_bar_palette(PLOT, COLORBAR_RANGE, COLOR_PALETTE, CIRC_COLORBAR, 0, 1.0);
|
||||
@@ -913,7 +906,7 @@ void animation()
|
||||
{
|
||||
fade_value = 1.0 - (double)i/(double)MID_FRAMES;
|
||||
if (HIGHRES)
|
||||
draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, total_flux, xy_in, scale, NSTEPS, PLOT, COLOR_PALETTE, 0, 1, fade_value);
|
||||
draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, fade_table, total_flux, xy_in, scale, NSTEPS, PLOT, COLOR_PALETTE, 0, 1, fade_value);
|
||||
else draw_wave_epalette(phi, psi, total_energy, average_energy, total_flux, color_scale, xy_in, scale, NSTEPS, PLOT, COLOR_PALETTE, 1, fade_value);
|
||||
// draw_billiard(1, fade_value);
|
||||
if (DRAW_COLOR_SCHEME) draw_color_bar_palette(PLOT, COLORBAR_RANGE, COLOR_PALETTE, CIRC_COLORBAR, 1, fade_value);
|
||||
@@ -926,7 +919,7 @@ void animation()
|
||||
{
|
||||
// draw_wave(phi, psi, xy_in, scale, i, PLOT_B);
|
||||
if (HIGHRES)
|
||||
draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, total_flux, xy_in, scale, NSTEPS, PLOT_B, COLOR_PALETTE_B, 1, 0, 1.0);
|
||||
draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, fade_table, total_flux, xy_in, scale, NSTEPS, PLOT_B, COLOR_PALETTE_B, 1, 0, 1.0);
|
||||
else draw_wave_epalette(phi, psi, total_energy, average_energy, total_flux, color_scale, xy_in, scale, NSTEPS, PLOT_B, COLOR_PALETTE_B, 0, 1.0);
|
||||
// draw_billiard(0, 1.0);
|
||||
if (DRAW_COLOR_SCHEME) draw_color_bar_palette(PLOT_B, COLORBAR_RANGE_B, COLOR_PALETTE_B, CIRC_COLORBAR_B, 0, 1.0);
|
||||
@@ -939,7 +932,7 @@ void animation()
|
||||
{
|
||||
fade_value = 1.0 - (double)i/(double)END_FRAMES;
|
||||
if (HIGHRES)
|
||||
draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, total_flux, xy_in, scale, NSTEPS, PLOT_B, COLOR_PALETTE_B, 1, 1, fade_value);
|
||||
draw_wave_highres_palette(2, phi, psi, total_energy, average_energy, fade_table, total_flux, xy_in, scale, NSTEPS, PLOT_B, COLOR_PALETTE_B, 1, 1, fade_value);
|
||||
else draw_wave_epalette(phi, psi, total_energy, average_energy, total_flux, color_scale, xy_in, scale, NSTEPS, PLOT_B, COLOR_PALETTE_B, 1, fade_value);
|
||||
// draw_billiard(1, fade_value);
|
||||
if (DRAW_COLOR_SCHEME) draw_color_bar_palette(PLOT_B, COLORBAR_RANGE_B, COLOR_PALETTE_B, CIRC_COLORBAR_B, 1, fade_value);
|
||||
@@ -965,6 +958,8 @@ void animation()
|
||||
free(tgamma_table[i]);
|
||||
}
|
||||
|
||||
if (FADE_IN_OBSTACLE) free(fade_table);
|
||||
|
||||
if (MEAN_FLUX) free(total_flux);
|
||||
|
||||
if (ADD_WAVE_PACKET_SOURCES) free(packet);
|
||||
|
||||
Reference in New Issue
Block a user