/*************************************************************************************************************************************/ /* */ /* A I D E A L A C O M P R E H E N S I O N D U P R O B L E M E 'v $xiii/quad_image$FON 20120618103427' : */ /* */ /* */ /* Author of '$xtc/GenDeform.01$c' : */ /* */ /* Jean-Francois COLONNA (LACTAMME, 20120618120052). */ /* */ /*************************************************************************************************************************************/ #include "INCLUDES.01.I" extern double cos(); extern double sin(); extern double drand48(); #define RANDOM(amplitude) \ (0.4*((1.0*(drand48()-0.5))*((amplitude)/((double)(N-N0))))) #define N0 1 #define N 30 #define RHO0 459.097442 #define RHON 416.097159 #define THETA0 3.778463 #define THETAN 3.857411 #define PHASE (-PI/2) main() { int n; double XG1=390.545621,YG1=288.045621; for (n=N0 ; n<=N ; n++) { double rho=(((RHON*(n-N0))+(RHO0*(N-n)))/(N-N0)); double theta=(((THETAN*(n-N0))+(THETA0*(N-n)))/(N-N0))+PHASE; double x,y; if ((n>N0) && (n<N)) { rho = rho+RANDOM(ABSO(RHON-RHO0)); theta = theta+RANDOM(ABSO(THETAN-THETA0)); } else { } x = XG1+(rho*cos(theta)); y = YG1+(rho*sin(theta)); printf("{%f,%f} = {%f,%f}\n",rho,theta,x,y); /* On notera que : */ /* */ /* PHASE=0 ==> {x} monotone et {y} chaotique, */ /* PHASE=-PI/2 ==> {x} chaotique et {y} monotone, */ /* */ /* (avec les bornes de 'rho' et 'theta' ci-dessus). Ainsi, la "chaoticite" change d'axe */ /* lors d'un dephasage de pi/2). */ } }