File:SazaeconT.png

From TORI
Jump to navigation Jump to search

Original file(2,118 × 1,682 pixels, file size: 216 KB, MIME type: image/png)

Graphics of functions Cohc and Cosc. Meanings of constants Sazae, Tarao, Fune, Wakame.

$ \displaystyle \mathrm{cosc}(z)=\frac{\cos(z)}{z} ~,$ $~ ~ \displaystyle \mathrm{cohc}(z)=\frac{\cosh(z)}{z} ~,$

C++ generator of curves

File ado.cin should be stored in the working directory for compilation of the C++ 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 "ado.cin"
#define M(x,y) fprintf(o,"%6.4f %6.4f M\n",0.+x,0.+y);
#define L(x,y) fprintf(o,"%6.4f %6.4f L\n",0.+x,0.+y);
#define S(x,y) fprintf(o,"S\n",);
main(){ int j,k,m,n; DB x,y, p,q, t; z_type z,c,d;
//DB y1 = 1.1996786402577337;
DB Sazae= 2.798386045783887;
DB Tarao=-0.33650841691839534;
DB Ho    =1.199678640257734;
DB Fune  =1.199678640257734;
DB Jo    =1.50887956153832;
DB Wakame=1.50887956153832;
FILE *o;o=fopen("sazaecon.eps","w");ado(o,520,430);
fprintf(o,"10 110 translate\n 100 100 scale\n");
for(m=0;m<6;m++){M(m,-1)L(m,3)}
for(n=-1;n<4;n++){M(0,n)L(5,n)}
fprintf(o,"2 setlinecap .006 W 0 0 0 RGB S\n");
DO(m,291){ x=.336+.01*m; y=cosh(x)/x;
       if(m==0)M(x,y) else L(x,y) }
fprintf(o,"1 setlinejoin 1 setlinecap .02 W 0 .8 0 RGB S\n");
M(Fune,0)L(Fune,Wakame)L(0,Wakame) fprintf(o,"2 setlinecap .003 W 0 0 0 RGB S\n");
DO(m,476){ x=.31+.01*m;  y=cos(x)/x;
       if(m==0)M(x,y) else L(x,y) }
fprintf(o,"1 setlinejoin 1 setlinecap .02 W .9 0 0 RGB S\n"); p=1.8;q=.7;
M(Sazae,0)L(Sazae,Tarao)L(0,Tarao) 
M( .5*M_PI,-.1)L( .5*M_PI,.1) M(1.5*M_PI,-.1)L(1.5*M_PI,.1)
fprintf(o,"2 setlinecap .003 W 0 0 0 RGB S\n");
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
     system("epstopdf sazaecon.eps");
     system(    "open sazaecon.pdf");
     getchar(); system("killall Preview");//for mac

}

Latex generator of labels

File sazaecon.pdf should be generated with the code above (and stored in the working directory) in order to compile the Latex dovument below.

%<br> % Copyleft 2012 by Dmitrii Kouznetsov %<br> \documentclass[12pt]{article} %<br> \usepackage{geometry} %<br> \usepackage{graphicx} %<br> \usepackage{rotating} %<br> \paperwidth 1020pt %<br> \paperheight 810pt %<br> \topmargin -90pt %<br> \oddsidemargin -106pt %<br> \textwidth 900pt %<br> \textheight 900pt %<br> \pagestyle {empty} %<br> \newcommand \sx {\scalebox} %<br> \newcommand \rot {\begin{rotate}} %<br> \newcommand \ero {\end{rotate}} %<br> \newcommand \ing {\includegraphics} %<br> \begin{document} %<br> \parindent 0pt \sx{2}{ \begin{picture}(540,410) %<br> %\put(4,6){\ing{acosplot}} %<br> % \put(4,6){\ing{aciplot}} %<br> % \put(4,6){\ing{cohcplot}} %<br> \put(4,6){\ing{sazaecon}} %<br> \put(16,402){\sx{2.5}{$y$}} %<br> \put(16,309){\sx{2.2}{\bf 2}} %<br> \put(16,209){\sx{2.2}{\bf 1}} %<br> %\put(16,160){\sx{1.8}{\bf 2.5}} %<br> \put(16, 262){\sx{2.2}{Wakame}} %<br> \put(16,109){\sx{2.2}{\bf 0}} %<br> \put(16, 75){\sx{2.4}{Tarao}} %<br> \put(107, 120){\sx{2.2}{\bf 1}} %<br> \put(142,120){\sx{2.4}{\rot{90}Fune\ero}} %<br> \put(207, 120){\sx{2.2}{\bf 2}} %<br> \put(302,118){\sx{2.5}{\rot{90}Sazae\ero}} %<br> \put(307, 120){\sx{2.2}{\bf 3}} %<br> \put(407, 120){\sx{2.2}{\bf 4}} %<br> \put(161, 132){\sx{2.8}{$\frac{\pi}{2}$}} %<br> \put(471, 130){\sx{2.6}{$\frac{3\pi}{2}$}} %<br> \put(508, 126){\sx{2.4}{$x$}} %<br> \put(224,282){\sx{2.5}{\rot{48}$y\!=\!\mathrm{cohc}(x)$\ero}} %<br> \put(317, 66){\sx{2.6}{\rot{7}$y\!=\!\mathrm{cosc}(x)$\ero}} %<br> \end{picture} %<br> } %<br> \end{document} %

Keywords

Cohc, ArcCohc, Cosc, ArcCosc, Sazae, Tarao, Fune, Wakame

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 20132,118 × 1,682 (216 KB)Maintenance script (talk | contribs)Importing image file

The following 2 pages use this file:

Metadata