File:Hades500.png

From TORI
Revision as of 09:39, 21 June 2013 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hades500.png(153 × 237 pixels, file size: 55 KB, MIME type: image/png)

Complex map of the Doya function, rotated counter-clock vice for 90o.

$f=\mathrm{Doya}_1(y\!+\! \mathrm i x)$ is shown in the $x,y$ plane with lines $u\!=\!\Re(f)\!=\!\mathrm{const}$ and lines $v\!=\!\Im(f)\!=\!\mathrm{const}$.

Levels $v\!=\!\pm 1.2$, $v\!=\!\pm 1.4$, $u\!=\!-0.4$ are shown with thick lines.

C++ generator of the image

The files ado.cin, conto.cin and doya.cin should be loaded to the working directory for the compillation of the code below.


#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define DB double
#define DO(x,y) for(x=0;x<y;x++)
using namespace std;
#include <complex>
typedef complex<double> z_type;
#define Re(x) x.real()
#define Im(x) x.imag()
#define I z_type(0.,1.)
#include "conto.cin"
#include "doya.cin"
main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
 int M=230,M1=M+1;
 int N=330,N1=N+1;
DB X[M1],Y[N1], g[M1*N1],f[M1*N1], w[M1*N1]; // w is working array.
char v[M1*N1]; // v is working array
FILE *o;o=fopen("hades2.eps","w");ado(o,22,34);
fprintf(o,"11 30.5 translate\n 10 10 scale\n");
DO(m,M1) X[m]=-1.1+.01*(m-.5);
DO(n,N1) Y[n]=-3.+.01*(n-.5);
// for(m=-4;m<5;m++){if(m==0){M(m,-4.2)L(m,4.2)} else{M(m,-4)L(m,4)}}
// for(n=-4;n<5;n++){  M(  -4,n)L(4,n)}
fprintf(o,".008 W 0 0 0 RGB S\n");
DO(m,M1)DO(n,N1){g[m*N1+n]=9999; f[m*N1+n]=9999;}
DO(m,M1){x=X[m]; //printf("%5.2f\n",x);
DO(n,N1){y=Y[n]; z=z_type(y,x);        
 c=Doya(1.,z); 
 p=Re(c);q=Im(c);      
 if(p>-99. && p<99. &&  q>-99. && q<99. ){ g[m*N1+n]=p;f[m*N1+n]=q;}
        }}
fprintf(o,"1 setlinejoin 1 setlinecap\n");  p=1.;q=.9;
conto(o,f,w,v,X,Y,M,N,1.2,-q, q); fprintf(o,".1 W 0 .3 0 RGB S\n");
conto(o,f,w,v,X,Y,M,N,-1.2,-q, q); fprintf(o,".1 W 0 .3 0 RGB S\n");
conto(o,f,w,v,X,Y,M,N,1.4,-q, q); fprintf(o,".1 W 0 .3 0 RGB S\n");
conto(o,f,w,v,X,Y,M,N,-1.4,-q, q); fprintf(o,".1 W 0 .3 0 RGB S\n");
conto(o,g,w,v,X,Y,M,N,-.4,-q, q); fprintf(o,".1 W .3 0 0 RGB S\n");
for(m=-6;m<5;m++)for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,(m+.1*n),-q, q); fprintf(o,".003 W 0 .9 0 RGB S\n");
for(m=0;m<6;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q, q); fprintf(o,".003 W 1 0 0 RGB S\n");
for(m=0;m<6;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q, q); fprintf(o,".003 W 0 0 1 RGB S\n");
for(m=1;m<5;m++)  conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".006 W .9 0 0 RGB S\n");
for(m=1;m<5;m++)  conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".006 W 0 0 .9 RGB S\n");
                   conto(o,f,w,v,X,Y,M,N, (0. ),-p,p); fprintf(o,".006 W .6 0 .6 RGB S\n");
for(m=-1;m<2;m++)  conto(o,g,w,v,X,Y,M,N, (0.+m ),-p,p); fprintf(o,".003 W 0 0 0 RGB S\n");
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
       system("epstopdf hades2.eps");  
       system(    "open hades2.pdf");
       getchar(); system("killall Preview");
}

Copyleft status

Copyleft 2011 by Dmitrii Kouznetsov. The image and the generator may be used for free, but the source should be attributed. (The attribution helps to trace errors if any.)

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current17:50, 20 June 2013Thumbnail for version as of 17:50, 20 June 2013153 × 237 (55 KB)Maintenance script (talk | contribs)Importing image file

The following file is a duplicate of this file (more details):

The following page uses this file:

Metadata