Plofu.cin
Jump to navigation
Jump to search
// plofu.cin , set of calls of routine "conto" that makes the complex map. // ado.cin may be required to make the header // conto.cin is necessary to draw the contours // FILE *o should be the output file, and the header should be already there // double g is array of length (M+1)*(N+1) of values of the real part of the function // double f is array of length (M+1)*(N+1) of values of the imaginary part of the function // double w is working array of length (M+1)*(N+1) // char v is working array of length (M+1)*(N+1) // double X is array of abscissas of the grid used // double Y is array of ordinates of the grid used // double p is maximal variation allowed per step // double q is maximal variation allowed per step // stronger variation is interpreted as singularity of the function // // Warning: this set of calls does not close the file. After to plot the complex map, // You may add something to the same graphic, then do not forget to close it. // // Copyleft 2010-2011 by Dmitrii Kouznetsov: //The free use is allowed; at the redistribution, //indicate this license and attribute the source, // http://tori.ils.uec.ac.jp/TORI/index.php/Plofu.cin
p=2;q=1; for(m=-19;m<19;m++)for(n=2;n<10;n+=2)conto(o,f,w,v,X,Y,M,N, (m+.1*n),-q,q); fprintf(o,".01 W 0 .6 0 RGB S\n"); for(m=0;m<29;m++) for(n=2;n<10;n+=2)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q,q); fprintf(o,".01 W .9 0 0 RGB S\n"); for(m=0;m<29;m++) for(n=2;n<10;n+=2)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q,q); fprintf(o,".01 W 0 0 .9 RGB S\n"); for(m= 1;m<20;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p);fprintf(o,".03 W .8 0 0 RGB S\n"); for(m= 1;m<20;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p);fprintf(o,".03 W 0 0 .8 RGB S\n"); conto(o,f,w,v,X,Y,M,N, (0. ),-p,p); fprintf(o,".03 W .5 0 .5 RGB S\n"); for(m=-31;m<32;m++)conto(o,g,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".03 W 0 0 0 RGB S\n");
// end of plofu.cin
/* */