File:Besselh0mapT090.png: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Dmitrii Kouznetsov
(add generator of curves)
imported>Dmitrii Kouznetsov
Line 13: Line 13:
Files  
Files  
[[besselj0.cin]],
[[besselj0.cin]],
[[besselj1.cin]],
[[bessely0.cin]],
[[ado.cin]],
[[ado.cin]],
[[conto.cin]]
[[conto.cin]]

Revision as of 08:39, 30 July 2012

Summary

Title / Description


Complex map of the Hankel function of zero order,
Citizendium author
& Copyright holder


Copyright © Dmitrii Kouznetsov.
See below for licence/re-use information.
Date created


2012.07.30.
Country of first publication


Japan
Notes


This is copy from http://tori.ils.uec.ac.jp/TORI/index.php/File:Besselh0mapT100.png
Other versions


http://tori.ils.uec.ac.jp/TORI/images/0/08/Besselh0mapT100.png
Using this image on CZ


Please click here to add the credit line, then copy the code below to add this image to a Citizendium article, changing the size, alignment, and caption as necessary.

{{Image|Besselh0mapT090.png|right|350px|Add image caption here.}}

Image issue? Contact us via the email below.

Please send email to manager A T citizendium.org .

Licensing

This media, Besselh0mapT090.png, is licenced under the Creative Commons Attribution 3.0 Unported License

You are free: To Share — To copy, distribute and transmit the work; To Remix — To adapt the work.
Under the following conditions: Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
For any reuse or distribution, you must make clear to others the licence terms of this work (the best way to do this is with a link to this licence's web page). Any of the above conditions can be waived if you get permission from the copyright holder. Nothing in this licence impairs or restricts the author's moral rights.
Read the full licence.

C++ generator of curves

Files besselj0.cin, bessely0.cin, ado.cin, conto.cin should be loaded to the working directory in order to compile the C++ code below.

#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 "besselj0.cin"
#include "bessely0.cin"
main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
int M=801,M1=M+1;
int N=401,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("besselh0map.eps","w");ado(o,162,82);
fprintf(o,"81 41 translate\n 10 10 scale\n"); 
DO(m,400) X[m]=-8.+.02*m;
     X[400]=-.004;
     X[401]= .004;
for(m=402;m<M1;m++) X[m]=-8.+.02*(m-1.);
DO(n,200)Y[n]=-4.+.02*n;
      Y[200]=-.001;
      Y[201]= .001;
for(n=202;n<N1;n++) Y[n]=-4.+.02*(n-1.);
//DO(m,M1)X[m]=Y[m];
for(m=-8;m<9;m++){if(m==0){M(m,-4.1)L(m,4.1)} else{M(m,-4)L(m,4)}}
for(n=-4;n<5;n++){     M(  -8,n)L(8,n)}
fprintf(o,".01 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(x,y);
      c=BesselJ0(z)+ I*BesselY0(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;
}
                     }}
//#include "plodi.cin"
fprintf(o,"1 setlinejoin 1 setlinecap\n"); p=1.5;q=.5;
for(m=-5;m<5;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<5;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<5;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<25;m++)  conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p); fprintf(o,".02 W .9 0 0 RGB S\n");
for(m=1;m<25;m++)  conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 .9 RGB S\n");
                conto(o,f,w,v,X,Y,M,N, (0.  ),-2*p,2*p); fprintf(o,".02 W .6 0 .6 RGB S\n");
for(m=-24;m<0;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
    m=0;          conto(o,g,w,v,X,Y,M,N, (0.+m),-2*p,2*p); fprintf(o,".02 W 0 0 0 RGB S\n");
for(m=1;m<25;m++) conto(o,g,w,v,X,Y,M,N, (0.+m),-p,p); fprintf(o,".02 W 0 0 0 RGB S\n");
//#include "plofu.cin"
M(0,0)L(-8,0) fprintf(o,"0 setlinecap 0.023 W 1 1 1 RGB S\n"); 
DO(m,32) { x=-.25*m; M(x-.1,0)L(x-.2,0) } fprintf(o,"0 setlinecap 0.03 W 0 0 0 RGB S\n"); 
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
     system("epstopdf besselh0map.eps");
     system(    "open besselh0map.pdf");            
     getchar(); system("killall Preview");//for mac
}

// Copyleft 2012 by Dmitrii Kouznetsov

File history

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

Date/TimeThumbnailDimensionsUserComment
current19:53, 11 March 2022Thumbnail for version as of 19:53, 11 March 20222,056 × 1,048 (1.42 MB)Maintenance script (talk | contribs)== Summary == Importing file

There are no pages that use this file.

Metadata