Difference between revisions of "File:Besselj0j1plotT.png"
(Importing image file) |
|||
Line 1: | Line 1: | ||
+ | Plot of the [[BesselJ0]] and [[BesselJ1]] versus real argument. |
||
− | Importing image file |
||
+ | |||
+ | ==Generator of curves== |
||
+ | Files [[besselj0.cin]], [[besselj1.cin]], [[ado.cin]], [[conto.cin]] should be loaded in the working directory in order to compile the [[C++]] code below: |
||
+ | |||
+ | #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 "besselj1.cin" |
||
+ | |||
+ | main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; |
||
+ | FILE *o;o=fopen("besselj0j1plot.eps","w");ado(o,162,22); |
||
+ | fprintf(o,"1 11 translate\n 10 10 scale\n"); |
||
+ | fprintf(o,"2 setlinecap\n"); |
||
+ | DO(m,17) {M(m,-1)L(m,1)} |
||
+ | M(0,-1)L(16,-1) |
||
+ | M(0,0)L(16,0) |
||
+ | M(0,1)L(16,1) |
||
+ | fprintf(o,"0 0 0 RGB .01 W S\n"); |
||
+ | fprintf(o,"1 setlinejoin 1 setlinecap .03 W\n"); |
||
+ | M(0,1) DO(m,161){ x=.1*m; y=Re(BesselJ0(x)); L(x,y) } fprintf(o,"0 0 1 RGB S\n"); |
||
+ | M(0,0) DO(m,161){ x=.1*m; y=Re(BesselJ1(x)); L(x,y) } fprintf(o,"1 0 0 RGB S\n"); |
||
+ | fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); |
||
+ | system("epstopdf besselj0j1plot.eps"); |
||
+ | system( "open besselj0j1plot.pdf"); |
||
+ | getchar(); system("killall Preview");//for mac |
||
+ | } |
||
+ | |||
+ | ==Latex generator of labels== |
||
+ | |||
+ | <nowiki> |
||
+ | \documentclass[12pt]{article} %<br> |
||
+ | \paperheight 232px %%<br> |
||
+ | \paperwidth 1634px %%<br> |
||
+ | \textwidth 1290px %%<br> |
||
+ | \textheight 1200px %%<br> |
||
+ | \topmargin -100px %%<br> |
||
+ | \oddsidemargin -80px %%<br> |
||
+ | \usepackage{graphics} %%<br> |
||
+ | \usepackage{rotating} %%<br> |
||
+ | \usepackage{color}%%<br> |
||
+ | \newcommand \sx {\scalebox} %%<br> |
||
+ | \newcommand \rot {\begin{rotate}} %<br> |
||
+ | \newcommand \ero {\end{rotate}} %<br> |
||
+ | \newcommand \ing {\includegraphics} %<br> |
||
+ | \newcommand \rmi {\mathrm{i}} %<br> |
||
+ | \begin{document} %<br> |
||
+ | \begin{picture}(1840,220) %<br> |
||
+ | \put(12,12){\sx{10}{\includegraphics{besselj0j1plot}}} %<br> |
||
+ | \put( 0,210){\sx{2.4}{$1$}} %<br> |
||
+ | \put( 0,112){\sx{2.4}{$0$}} %<br> |
||
+ | \put(-15,12){\sx{2.4}{$-\!1$}} %<br> |
||
+ | \put( 15,-1){\sx{2.5}{$0$}} %<br> |
||
+ | \put(115,-1){\sx{2.5}{$1$}} %<br> |
||
+ | \put(215,-1){\sx{2.5}{$2$}} %<br> |
||
+ | \put(315,-1){\sx{2.5}{$3$}} %<br> |
||
+ | \put(415,-1){\sx{2.5}{$4$}} %<br> |
||
+ | \put(515,-1){\sx{2.5}{$5$}} %<br> |
||
+ | \put(615,-1){\sx{2.5}{$6$}} %<br> |
||
+ | \put(715,-1){\sx{2.5}{$7$}} %<br> |
||
+ | \put(815,-1){\sx{2.5}{$8$}} %<br> |
||
+ | \put(915,-1){\sx{2.5}{$9$}} %<br> |
||
+ | \put(1010,-1){\sx{2.5}{$10$}} %<br> |
||
+ | \put(1110,-1){\sx{2.5}{$11$}} %<br> |
||
+ | \put(1210,-1){\sx{2.5}{$12$}} %<br> |
||
+ | \put(1310,-1){\sx{2.5}{$13$}} %<br> |
||
+ | \put(1410,-1){\sx{2.5}{$14$}} %<br> |
||
+ | \put(1510,-1){\sx{2.5}{$15$}} %<br> |
||
+ | \put(1612,-1){\sx{2.5}{$x$}} %<br> |
||
+ | \put(330,154){\sx{3}{$J_1(x)$}} %<br> |
||
+ | \put(330,54){\sx{3}{$J_0(x)$}} %<br> |
||
+ | \end{picture} %<br> |
||
+ | \end{document} |
||
+ | %</nowiki> |
||
+ | |||
+ | [[Category:Bessel function]] |
||
+ | [[Category:BesselJ0]] |
||
+ | [[Category:BesselJ1]] |
||
+ | [[Category:Cylindric function]] |
||
+ | [[Category:Explicit plot]] |
Latest revision as of 09:42, 21 June 2013
Plot of the BesselJ0 and BesselJ1 versus real argument.
Generator of curves
Files besselj0.cin, besselj1.cin, ado.cin, conto.cin should be loaded in the working directory in order to compile the C++ code below:
#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 "besselj1.cin"
main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d; FILE *o;o=fopen("besselj0j1plot.eps","w");ado(o,162,22); fprintf(o,"1 11 translate\n 10 10 scale\n"); fprintf(o,"2 setlinecap\n"); DO(m,17) {M(m,-1)L(m,1)} M(0,-1)L(16,-1) M(0,0)L(16,0) M(0,1)L(16,1) fprintf(o,"0 0 0 RGB .01 W S\n"); fprintf(o,"1 setlinejoin 1 setlinecap .03 W\n"); M(0,1) DO(m,161){ x=.1*m; y=Re(BesselJ0(x)); L(x,y) } fprintf(o,"0 0 1 RGB S\n"); M(0,0) DO(m,161){ x=.1*m; y=Re(BesselJ1(x)); L(x,y) } fprintf(o,"1 0 0 RGB S\n"); fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o); system("epstopdf besselj0j1plot.eps"); system( "open besselj0j1plot.pdf"); getchar(); system("killall Preview");//for mac }
Latex generator of labels
\documentclass[12pt]{article} %<br> \paperheight 232px %%<br> \paperwidth 1634px %%<br> \textwidth 1290px %%<br> \textheight 1200px %%<br> \topmargin -100px %%<br> \oddsidemargin -80px %%<br> \usepackage{graphics} %%<br> \usepackage{rotating} %%<br> \usepackage{color}%%<br> \newcommand \sx {\scalebox} %%<br> \newcommand \rot {\begin{rotate}} %<br> \newcommand \ero {\end{rotate}} %<br> \newcommand \ing {\includegraphics} %<br> \newcommand \rmi {\mathrm{i}} %<br> \begin{document} %<br> \begin{picture}(1840,220) %<br> \put(12,12){\sx{10}{\includegraphics{besselj0j1plot}}} %<br> \put( 0,210){\sx{2.4}{$1$}} %<br> \put( 0,112){\sx{2.4}{$0$}} %<br> \put(-15,12){\sx{2.4}{$-\!1$}} %<br> \put( 15,-1){\sx{2.5}{$0$}} %<br> \put(115,-1){\sx{2.5}{$1$}} %<br> \put(215,-1){\sx{2.5}{$2$}} %<br> \put(315,-1){\sx{2.5}{$3$}} %<br> \put(415,-1){\sx{2.5}{$4$}} %<br> \put(515,-1){\sx{2.5}{$5$}} %<br> \put(615,-1){\sx{2.5}{$6$}} %<br> \put(715,-1){\sx{2.5}{$7$}} %<br> \put(815,-1){\sx{2.5}{$8$}} %<br> \put(915,-1){\sx{2.5}{$9$}} %<br> \put(1010,-1){\sx{2.5}{$10$}} %<br> \put(1110,-1){\sx{2.5}{$11$}} %<br> \put(1210,-1){\sx{2.5}{$12$}} %<br> \put(1310,-1){\sx{2.5}{$13$}} %<br> \put(1410,-1){\sx{2.5}{$14$}} %<br> \put(1510,-1){\sx{2.5}{$15$}} %<br> \put(1612,-1){\sx{2.5}{$x$}} %<br> \put(330,154){\sx{3}{$J_1(x)$}} %<br> \put(330,54){\sx{3}{$J_0(x)$}} %<br> \end{picture} %<br> \end{document} %
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 17:50, 20 June 2013 | 3,405 × 484 (112 KB) | Maintenance script (talk | contribs) | Importing image file |
You cannot overwrite this file.
File usage
There are no pages that use this file.