File:PowPloT.jpg

From TORI
Jump to navigation Jump to search

Original file(2,097 × 2,097 pixels, file size: 697 KB, MIME type: image/jpeg)

Explicit plot of function Pow$_a$ for various real values of parameter $a$.

$y=\mathrm{Pow}_a(x)=\exp_x(a)=x^a$ versus $x$

C++ generator of curves

#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"
//DB B=2.;
//DB F(DB z) { return exp( exp( log(B)*z));}
//DB G(DB z) { return log( log(z) )/log(B);}
main(){ int m,n; double z,x,y,t; FILE *o;
o=fopen("PowPlo.eps","w"); ado(o,1010,1010);
fprintf(o,"1 1 translate 100 100 scale\n");
#define M(x,y) fprintf(o,"%6.3f %6.3f M\n",0.+x,0.+y);
#define L(x,y) fprintf(o,"%6.3f %6.3f L\n",0.+x,0.+y);
for(m=0;m<11;m++) {M(m,0)L(m,10)}
for(m=0;m<11;m++) {M(0,m)L(10,m)}
fprintf(o,"2 setlinecap 1 setlinejoin .01 W S\n");
// DO(m,42){x=0.001+.1*m; y=exp(2.*log(x)); if(m==0)M(x,y) else L(x,y);} fprintf(o,"1 setlinecap 1  setlinejoin .04 W 0 1 0 RGB S\n");
// DO(m,1002){x=0.001+.01*m; y=exp(.5*log(x)); if(m==0)M(x,y) else L(x,y);} fprintf(o,"1 setlinecap 1 setlinejoin .04 W 1 0 1 RGB S\n");
// for(n=-31;n<31;n+=2){t=.1*n; DO(m,1002){x=.1+.02*m; y=exp(t*log(x)); if(m==0) M(x,y) else L(x,y); if(y>10.1)break;} }
// fprintf(o,"1 setlinecap 1 setlinejoin\n");
// t=-3.; z=exp(log(10.05)/t); DO(m,1002){x=z+.02*m; y=exp(t*log(x)); if(m==0) M(x,y) else L(x,y); if(y>10.1)break;} fprintf(o,".02 W 1 0 0 RGB S\n");
t=-2.; z=exp(log(10.05)/t); DO(m,1002){x=z+.02*m; y=exp(t*log(x)); if(m==0) M(x,y) else L(x,y); if(y>10.1)break;} fprintf(o,".02 W 1 0 0 RGB S\n");
t=-1.; z=exp(log(10.05)/t); DO(m,1002){x=z+.02*m; y=exp(t*log(x)); if(m==0) M(x,y) else L(x,y); if(y>10.1)break;} fprintf(o,".02 W 1 0 0 RGB S\n");
t=1.; z=0; DO(m,1002){x=z+.02*m; y=exp(t*log(x)); if(m==0) M(x,y) else L(x,y); if(y>10.1)break;} fprintf(o,".02 W 0 0 1 RGB S\n");
t=2.; z=0; DO(m,1002){x=z+.02*m; y=exp(t*log(x)); if(m==0) M(x,y) else L(x,y); if(y>10.1)break;} fprintf(o,".02 W 0 0 1 RGB S\n");
t=3.; z=0; DO(m,1002){x=z+.02*m; y=exp(t*log(x)); if(m==0) M(x,y) else L(x,y); if(y>10.1)break;} fprintf(o,".02 W 0 0 1 RGB S\n");
for(n=-20;n<0;n+=2){t=.1*n; z=exp(log(10.05)/t); DO(m,1002){x=z+.01*m; y=exp(t*log(x)); if(m==0) M(x,y) else L(x,y); if(y>10.1)break;}}
for(n=0;n<21;n+=2){t=.1*n; z=.005; DO(m,1002){x=z+.01*m; y=exp(t*log(x)); if(m==0) M(x,y) else L(x,y); if(y>10.1)break;}}
fprintf(o,".01 W 0 0 0 RGB S\n");
fprintf(o,"showpage\n%c%cTrailer",'%','%'); fclose(o);
      system("epstopdf PowPlo.eps");    
      system(    "open PowPlo.pdf");
      getchar(); system("killall Preview");
}

Latex Generator of labels

% %<br> % file PowPlo.pdf should be generated with the code above in order to compile the Latex document below. %<br> % Copyleft 2012 by Dmitrii Kouznetsov <br> % \documentclass[12pt]{article} % <br> \usepackage{geometry} % <br> \usepackage{graphicx} % <br> \usepackage{rotating} % <br> \paperwidth 1010pt % <br> \paperheight 1010pt % <br> \topmargin -94pt % <br> \oddsidemargin -81pt % <br> \textwidth 1100pt % <br> \textheight 1100pt % <br> \pagestyle {empty} % <br> \newcommand \sx {\scalebox} % <br> \newcommand \rot {\begin{rotate}} % <br> \newcommand \ero {\end{rotate}} % <br> \newcommand \ing {\includegraphics} % <br> \parindent 0pt% <br> \pagestyle{empty} % <br> \begin{document} % <br> \begin{picture}(1002,1002) % <br> \put(10,10){\ing{PowPlo}} % <br> \put(11,966){\sx{6}{$y\!=\!x^a$}} % <br> \put(11,898){\sx{4}{$9$}} % <br> \put(11,798){\sx{4}{$8$}} % <br> \put(11,698){\sx{4}{$7$}} % <br> \put(11,598){\sx{4}{$6$}} % <br> \put(11,498){\sx{4}{$5$}} % <br> \put(11,398){\sx{4}{$4$}} % <br> \put(11,298){\sx{4}{$3$}} % <br> \put(11,198){\sx{4}{$2$}} % <br> \put(11,098){\sx{4}{$1$}} % <br> % <br> \put(100,16){\sx{4}{$1$}} % <br> \put(200,16){\sx{4}{$2$}} % <br> \put(301,16){\sx{4}{$3$}} % <br> \put(401,16){\sx{4}{$4$}} % <br> \put(502,16){\sx{4}{$5$}} % <br> \put(602,16){\sx{4}{$6$}} % <br> \put(703,16){\sx{4}{$7$}} % <br> \put(803,16){\sx{4}{$8$}} % <br> \put(903,16){\sx{4}{$9$}} % <br> \put(990,16){\sx{4}{$x$}} % <br> % <br> \put(50,881){\sx{4}{\rot{-88}$a\!=\!-2$\ero}} % <br> \put(204,774){\sx{4}{\rot{86}$a\!=\!3$\ero}} % <br> \put(288,776){\sx{4}{\rot{81}$a\!=\!2$\ero}} % <br> \put(423,838){\sx{4}{\rot{73}$a\!=\!1.6$\ero}} % <br> \put(498,836){\sx{4}{\rot{68}$a\!=\!1.4$\ero}} % <br> \put(636,851){\sx{4}{\rot{58}$a\!=\!1.2$\ero}} % <br> % <br> \put(826,831){\sx{4}{\rot{45}$a\!=\!1$\ero}} % <br> % <br> \put(880,580){\sx{4}{\rot{27}$a\!=\!0.8$\ero}} % <br> \put(870,378){\sx{4}{\rot{14}$a\!=\!0.6$\ero}} % <br> \put(864,250){\sx{4}{\rot{5}$a\!=\!0.4$\ero}} % <br> \put(864,168){\sx{4}{\rot{2}$a\!=\!0.2$\ero}} % <br> \put(864,114){\sx{4}{\rot{0}$a\!=\!0$\ero}} % <br> \put(844,68){\sx{4}{\rot{-1}$a\!=\!-0.2$\ero}} % <br> \end{picture} % <br> \end{document} % <br> %

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,097 × 2,097 (697 KB)Maintenance script (talk | contribs)Importing image file

The following page uses this file:

Metadata