Difference between revisions of "File:DurationVer53edited.png"
(→i.txt) |
|||
Line 18: | Line 18: | ||
The first three numbers in each row are year, month and day of documented negation of the [[Separation of power]] in the federal law of the country. |
The first three numbers in each row are year, month and day of documented negation of the [[Separation of power]] in the federal law of the country. |
||
− | The next three numbers refers to the first historic |
+ | The next three numbers refers to the first historic document found that establishes the collapse of the empire (that previously had abandoned the [[Separation of power]] is the explicit way). |
The last column shows the first three letters of the name of the country, where these dramatic events had happened. |
The last column shows the first three letters of the name of the country, where these dramatic events had happened. |
Latest revision as of 11:45, 12 May 2024
Summary
Density of likelihood of Logduration of an empire estimated by the historic events for the Napoleon's France, Mussolini's Italy, Hiter's Germany and the communist's Soviet Union (USSR).
The two vertical green lines represent the two estimates from the sci-fi by Semen Skreetsky Россия2028 and by Vladimir Voinovich Москва2042 (Noscow2042), taking into account that the Nullification of Constitution of RF happens in year 2020 (Putin is declared to rule forever, giving no way to reelect another president).
At the moment of generation of the picture, the precise date of the collapse of RF is not yet known; so, the data for the RF are not taken into account in construction of the curve.
Description
i.txt
The following table is used as the input file:1802 08 04 1815 11 20 Fra 1928 05 17 1947 12 27 Ita 1933 03 24 1945 05 08 Ger 1977 10 07 1991 08 20 Sov
The first three numbers in each row are year, month and day of documented negation of the Separation of power in the federal law of the country.
The next three numbers refers to the first historic document found that establishes the collapse of the empire (that previously had abandoned the Separation of power is the explicit way).
The last column shows the first three letters of the name of the country, where these dramatic events had happened.
These data are used for the primitive statistical analysis with code below.
C++ generator of picture
// Historically, 53 attempts to plot the figure had neen performed, looking for the best colors, thickness of lines, aspect ratio, etc.; most of the previous versions are ugly, but the 53th looks better.
// It is used to generate the figure and the code loaded below.
//For the compillation of the code below, files ju24da.cin and Student.cin should be loaded.
#include <stdio.h> #include <math.h> #include <stdlib.h> #include "ju24da.cin" //float Gau(float x){ return 1./sqrt(2*M_PI) * exp(-x*x/2); } //float Se(float x){ return 0.5/cosh(M_PI_2*x); } #include "Student.cin" int main(){ int n,N=4; FILE *i,*o; int Y1,M1,D1; int Y2,M2,D2; char s[4][4]; int D[4]; float d[4]; float L[N],t; i=fopen("i.txt","r"); for(n=0;n<N;n++) { fscanf(i,"%4d %2d %2d %4d %2d %2d %3s", &Y1,&M1,&D1, &Y2,&M2,&D2, s[n]); D[n]=daju24(Y2,M2,D2) - daju24(Y1,M1,D1) ; t=D[n]/365.2422; L[n]=log2(t); printf("%4d %02d %02d %04d %02d %02d %3s %04d %6.4f\n", Y1,M1,D1, Y2,M2,D2, s[n], D[n], L[n]); } fclose(i); float p=0.; for(n=0;n<N;n++) p+=L[n]; p/=N; printf("p=%5.2f\n",p); float q=0.; float r; for(n=0;n<N;n++) {r=L[n]-p; q+=r*r;} float T=sqrt(q/(N-1.)); printf("T=%5.2f\n",T); float U=sqrt(q/(N*(N-1.))); printf("U=%5.2f\n",U); float W=sqrt(q/(N*(N-3.))); printf("W=%5.2f\n",W); o=fopen("o.tex","w"); fprintf(o,"\\documentclass{standalone}\n"); fprintf(o,"\\usepackage{graphicx}\n"); fprintf(o,"\\newcommand \\sx {\\scalebox}\n"); fprintf(o,"\\usepackage{tikz}\n"); fprintf(o,"\\begin{document}\n"); fprintf(o,"\\sx{3}{\\begin{tikzpicture}\n"); fprintf(o,"\\draw [help lines] (0,0) grid (6,2);\n"); fprintf(o,"\\draw(-.1,0) -- (6.2,0) ;\n"); fprintf(o,"\\draw(0,0) -- (0,2.2) ;\n"); float x,y; fprintf(o,"\\draw[line width=1.2, green] (3,0) -- (3,2) ;\n"); x=log(22.)/log(2.); fprintf(o,"\\draw[line width=1.2, green] (%5.3f,0) -- (%5.3f,2) ;\n",x,x); for(n=1;n<3;n++) fprintf(o,"\\draw (0,%d) node[left] {%d};\n",n,n); for(n=0;n<6;n++) fprintf(o,"\\draw (%d,0) node[below] {%d};\n",n,n); fprintf(o,"\\draw (%d,0) node[below] {$L$};\n",n); for(n=0;n<6;n++) fprintf(o,"\\draw (%d,-.3) node[below] {%2.0f};\n",n,pow(2.,n)); fprintf(o,"\\draw (%d,-.3) node[below] {years};\n",n); for(n=0;n<N;n++) { fprintf(o,"\\draw[line width=1.2, blue] (%5.3f,0.3) -- (%5.3f,0.7) ;\n",L[n],L[n]); fprintf(o,"\\draw (%5.3f,0) node[above] {%c};\n",L[n],s[n][0]); } for(n=0;n<151;n++) { x=2.5+.02*n; y=Student(3,(x-p)/U)/U; if(n==0) fprintf(o,"\\draw[line width=1, red] (%6.3f,%5.3f)",x,y); else fprintf(o," -- (%6.3f,%5.3f)",x,y); } fprintf(o,";\n"); fprintf(o,"\\end{tikzpicture}}\n"); fprintf(o,"\\end{document}\n"); fclose(o); system("pdflatex o.tex"); system("open o.pdf"); } //
Conversion
%The output o.tex is copied to p.tex
%There is no limit to perfection; so, more labels are added manually, giving the file below:
%\documentclass{standalone} \usepackage{graphicx} \newcommand \sx {\scalebox} \usepackage{tikz} \begin{document} \sx{5}{\begin{tikzpicture} \draw [help lines] (0,0) grid (6,2); \draw(-.1,0) -- (6.2,0) ; \draw(0,0) -- (0,2.2) ; \draw[line width=1.2, green] (3,0) -- (3,2) ; \draw[line width=1.2, green] (4.459,0) -- (4.459,2) ; \draw (-.08,2.16) node[right] {\footnotesize likelihood density}; \draw (0,1) node[left] {\footnotesize1}; \draw (0,2) node[left] {\footnotesize 2}; \draw (0,0) node[below] {\footnotesize 0}; \draw (1,0) node[below] {\footnotesize 1}; \draw (2,0) node[below] {\footnotesize 2}; \draw (3,0) node[below] {\footnotesize 3}; \draw (4,0) node[below] {\footnotesize 4}; \draw (5,0) node[below] {\footnotesize 5}; \draw (6,0) node[below] {\footnotesize $L$}; \draw (0,-.3) node[below] {\footnotesize 1}; \draw (1,-.3) node[below] {\footnotesize 2}; \draw (2,-.3) node[below] {\footnotesize 4}; \draw (3,-.3) node[below] {\footnotesize 8}; \draw (4,-.3) node[below] {\footnotesize 16}; \draw (5,-.3) node[below] {\footnotesize 32}; \draw (6,-.32) node[below] {\footnotesize years}; \draw[line width=1.2, blue] (3.733,0.3) -- (3.733,0.7) ; \draw (3.733,0) node[above] {\tiny F}; \draw[line width=1.2, blue] (4.294,0.3) -- (4.294,0.7) ; \draw (4.294,0) node[above] {\tiny I}; \draw[line width=1.2, blue] (3.600,0.3) -- (3.600,0.7) ; \draw (3.600,0) node[above] {\tiny G}; \draw[line width=1.2, blue] (3.794,0.3) -- (3.794,0.7) ; \draw (3.794,0) node[above] {\tiny S}; \draw[line width=1, red] ( 2.500,0.003) -- ( 2.520,0.003) -- ( 2.540,0.004) -- ( 2.560,0.004) -- ( 2.580,0.004) -- ( 2.600,0.004) -- ( 2.620,0.005) -- ( 2.640,0.005) -- ( 2.660,0.005) -- ( 2.680,0.005) -- ( 2.700,0.006) -- ( 2.720,0.006) -- ( 2.740,0.007) -- ( 2.760,0.007) -- ( 2.780,0.008) -- ( 2.800,0.008) -- ( 2.820,0.009) -- ( 2.840,0.010) -- ( 2.860,0.010) -- ( 2.880,0.011) -- ( 2.900,0.012) -- ( 2.920,0.013) -- ( 2.940,0.014) -- ( 2.960,0.015) -- ( 2.980,0.017) -- ( 3.000,0.018) -- ( 3.020,0.020) -- ( 3.040,0.021) -- ( 3.060,0.024) -- ( 3.080,0.026) -- ( 3.100,0.028) -- ( 3.120,0.031) -- ( 3.140,0.034) -- ( 3.160,0.038) -- ( 3.180,0.042) -- ( 3.200,0.047) -- ( 3.220,0.052) -- ( 3.240,0.058) -- ( 3.260,0.065) -- ( 3.280,0.072) -- ( 3.300,0.081) -- ( 3.320,0.092) -- ( 3.340,0.103) -- ( 3.360,0.117) -- ( 3.380,0.133) -- ( 3.400,0.152) -- ( 3.420,0.173) -- ( 3.440,0.199) -- ( 3.460,0.228) -- ( 3.480,0.263) -- ( 3.500,0.304) -- ( 3.520,0.352) -- ( 3.540,0.408) -- ( 3.560,0.474) -- ( 3.580,0.552) -- ( 3.600,0.643) -- ( 3.620,0.748) -- ( 3.640,0.870) -- ( 3.660,1.008) -- ( 3.680,1.163) -- ( 3.700,1.334) -- ( 3.720,1.517) -- ( 3.740,1.707) -- ( 3.760,1.895) -- ( 3.780,2.072) -- ( 3.800,2.224) -- ( 3.820,2.339) -- ( 3.840,2.407) -- ( 3.860,2.421) -- ( 3.880,2.379) -- ( 3.900,2.286) -- ( 3.920,2.151) -- ( 3.940,1.985) -- ( 3.960,1.801) -- ( 3.980,1.611) -- ( 4.000,1.423) -- ( 4.020,1.246) -- ( 4.040,1.083) -- ( 4.060,0.936) -- ( 4.080,0.806) -- ( 4.100,0.693) -- ( 4.120,0.595) -- ( 4.140,0.511) -- ( 4.160,0.440) -- ( 4.180,0.379) -- ( 4.200,0.327) -- ( 4.220,0.282) -- ( 4.240,0.245) -- ( 4.260,0.213) -- ( 4.280,0.185) -- ( 4.300,0.162) -- ( 4.320,0.142) -- ( 4.340,0.125) -- ( 4.360,0.110) -- ( 4.380,0.097) -- ( 4.400,0.086) -- ( 4.420,0.077) -- ( 4.440,0.068) -- ( 4.460,0.061) -- ( 4.480,0.055) -- ( 4.500,0.049) -- ( 4.520,0.044) -- ( 4.540,0.040) -- ( 4.560,0.036) -- ( 4.580,0.033) -- ( 4.600,0.030) -- ( 4.620,0.027) -- ( 4.640,0.025) -- ( 4.660,0.022) -- ( 4.680,0.021) -- ( 4.700,0.019) -- ( 4.720,0.017) -- ( 4.740,0.016) -- ( 4.760,0.015) -- ( 4.780,0.014) -- ( 4.800,0.012) -- ( 4.820,0.012) -- ( 4.840,0.011) -- ( 4.860,0.010) -- ( 4.880,0.009) -- ( 4.900,0.009) -- ( 4.920,0.008) -- ( 4.940,0.007) -- ( 4.960,0.007) -- ( 4.980,0.006) -- ( 5.000,0.006) -- ( 5.020,0.006) -- ( 5.040,0.005) -- ( 5.060,0.005) -- ( 5.080,0.005) -- ( 5.100,0.004) -- ( 5.120,0.004) -- ( 5.140,0.004) -- ( 5.160,0.004) -- ( 5.180,0.003) -- ( 5.200,0.003) -- ( 5.220,0.003) -- ( 5.240,0.003) -- ( 5.260,0.003) -- ( 5.280,0.003) -- ( 5.300,0.002) -- ( 5.320,0.002) -- ( 5.340,0.002) -- ( 5.360,0.002) -- ( 5.380,0.002) -- ( 5.400,0.002) -- ( 5.420,0.002) -- ( 5.440,0.002) -- ( 5.460,0.002) -- ( 5.480,0.002) -- ( 5.500,0.002); \draw (3,2.4) node[rotate=90,left] {\footnotesize russia2028}; \draw (3.5,1.6) node[rotate=90,left] {\footnotesize germany}; \draw (3.7,1.7) node[rotate=90,left] {\footnotesize france}; \draw (3.9,1.2) node[rotate=90,left] {\footnotesize ussr}; \draw (4.26,1.44) node[rotate=90,left] {\footnotesize italy}; \draw (4.48,2.4) node[rotate=90,left] {\footnotesize moscow2042}; \end{tikzpicture}} \end{document} %
%It is compiled and converted to png with command
convert -resize 1200 p.pdf png8:DurationVer53edited.png
Perhaps, it is not a final version, but the picture is necessary to compile the draft of the final article.
References
https://en.wikipedia.org/wiki/Separation_of_powers Separation of powers is the division of a state's government into branches, each with separate, independent powers and responsibilities, so that the powers of one branch are not in conflict with others.
Keywords
«Duration», «Student Distribution», «Latex», «tikz», «[[]]», «[[]]»,
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 11:39, 12 May 2024 | 1,200 × 557 (21 KB) | T (talk | contribs) | {{oq|DurationVer53edited.png|}} Density of likelihood of Logduration of an empire estimated by the historic events for the Napoleon's France, Mussolini's Italy, Hiter's Germany and the communist's Soviet Union (USSR). The two vertical green l... |
You cannot overwrite this file.
File usage
There are no pages that use this file.