File:ExampleEquationLog01.png: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Dmitrii Kouznetsov
({{Image notes bypermission |Description = |Author =Dmitrii Kouznetsov |Date =2008 |Source = #include <math.h> #include <stdio.h> #include <stdlib.h> #define DB double void ado(FILE *O, int X, int Y) { fprintf(O,"%c!PS-Adobe-2.0 EPSF-2.0\n",'%'); fprintf(O,"%c%cBoundingBox: 0 0 %d %d\n",'%','%',X,Y); fprintf(O,"/M {moveto} bind def\n"); fprintf(O,"/L {lineto} bind def\n"); f...)
 
imported>Dmitrii Kouznetsov
m (remove extra copyright license)
Line 5: Line 5:
|Date                      =2008
|Date                      =2008
|Source                    =
|Source                    =
//Example of graphic soluiton of equation
  #include <math.h>
  #include <math.h>
  #include <stdio.h>
  #include <stdio.h>
Line 19: Line 20:
         fprintf(O,"/W {setlinewidth} bind def\n");
         fprintf(O,"/W {setlinewidth} bind def\n");
         fprintf(O,"/RGB {setrgbcolor} bind def\n");}
         fprintf(O,"/RGB {setrgbcolor} bind def\n");}
               
  #define DO(x,y) for(x=0;x<y;x++)  
  #define DO(x,y) for(x=0;x<y;x++)  
  main(){ FILE *o; o=fopen("log.eps","w"); ado(o,800,800);
  main(){ FILE *o; o=fopen("log.eps","w"); ado(o,800,800);
Line 31: Line 31:
  for(n=1;n<7;n++){M(0,n)L(6,n)}  fprintf(o,".06 W S\n");
  for(n=1;n<7;n++){M(0,n)L(6,n)}  fprintf(o,".06 W S\n");
  for(n=0;n<6;n++){M(-.4,n-.18) fprintf(o,"(%1d)s\n",n);}
  for(n=0;n<6;n++){M(-.4,n-.18) fprintf(o,"(%1d)s\n",n);}
  for(n=1;n<7;n++){x=1*n;M(x,0)L(x,6)}  
  for(n=1;n<7;n++){x=1*n;M(x,0)L(x,6)}  
  M(-.5,M_E)L(6,M_E)
  M(-.5,M_E)L(6,M_E)
  M(M_E,-.5)L(M_E,6)
  M(M_E,-.5)L(M_E,6)
  fprintf(o,".06 W S\n");  
  fprintf(o,".06 W S\n");  
  for(n=1;n<6;n+=1){x=1*n;M(x-.16,-.5) fprintf(o,"(%1.0f)s\n",x);}
  for(n=1;n<6;n+=1){x=1*n;M(x-.16,-.5) fprintf(o,"(%1.0f)s\n",x);}
  M(0,0)L(7,7)
  M(0,0)L(7,7)
Line 42: Line 40:
  M(-.8,M_E-.16) fprintf(o,"(e)s\n");
  M(-.8,M_E-.16) fprintf(o,"(e)s\n");
  M(M_E-.14,-.8) fprintf(o,"(e)s\n");
  M(M_E-.14,-.8) fprintf(o,"(e)s\n");
  fprintf(o,"/Times-Italic findfont 6 scalefont setfont\n");
  fprintf(o,"/Times-Italic findfont 6 scalefont setfont\n");
  M(-0.5,6) fprintf(o,"(y)s\n");
  M(-0.5,6) fprintf(o,"(y)s\n");
  M(6,-0.5) fprintf(o,"(x)s\n");
  M(6,-0.5) fprintf(o,"(x)s\n");
  for(n=0;n<70;n+=2){x=.8+.02*n+.001*n*n;y=log(x)/log(sqrt(2.));
  for(n=0;n<70;n+=2){x=.8+.02*n+.001*n*n;y=log(x)/log(sqrt(2.));
  if(n==0)M(x,y)else L(x,y)}
  if(n==0)M(x,y)else L(x,y)}
  fprintf(o,"1 0 0 RGB 0.3 W S\n");
  fprintf(o,"1 0 0 RGB 0.3 W S\n");
  for(n=0;n<70;n+=2){x=.7+.02*n+.001*n*n;y=log(x)/log(exp(1/M_E));  if(n==0)M(x,y)else L(x,y)}
  for(n=0;n<70;n+=2){x=.7+.02*n+.001*n*n;y=log(x)/log(exp(1/M_E));  if(n==0)M(x,y)else L(x,y)}
  fprintf(o,"0 .8 0 RGB 0.3 W S\n");
  fprintf(o,"0 .8 0 RGB 0.3 W S\n");
  for(n=0;n<70;n+=2){x=.6+.02*n+.001*n*n;y=log(x)/log (2.);  if(n==0)M(x,y)else L(x,y)}
  for(n=0;n<70;n+=2){x=.6+.02*n+.001*n*n;y=log(x)/log (2.);  if(n==0)M(x,y)else L(x,y)}
  fprintf(o,"0 0 1 RGB 0.3 W S\n");
  fprintf(o,"0 0 1 RGB 0.3 W S\n");
  fprintf(o,"showpage\n");
  fprintf(o,"showpage\n");
  fprintf(o,"%cTrailer\n",'%');
  fprintf(o,"%cTrailer\n",'%');
Line 64: Line 56:
|Country first published in =Japan
|Country first published in =Japan
|Copyright holder          =Dmitrii Kouznetsov
|Copyright holder          =Dmitrii Kouznetsov
|Notes                      = Use it for free, copy, distribute, modify as you like.
|Notes                      = Use it for free: copy, distribute, modify as you like. Indicate the source and mention that you have modified it if you did.
|Other versions            =
|Other versions            =
}}
}}
== Licensing/Copyright status ==
{{attribution}}
{{attribution}}
== Licensing/Copyright status ==
{{Bypermission-noreuse}}

Revision as of 05:12, 20 May 2008

Summary

Template:Image notes bypermission

Licensing/Copyright status

Black Copyright logo.png

This media, ExampleEquationLog01.png, is copyrighted but may be reused

The copyright holder has stipulated that anyone may freely copy, distribute, display and perform this work, as well as make derivative and commercial works, provided that you 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). This applies in perpetuity.
See the Permission page for exact terms.

File history

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

Date/TimeThumbnailDimensionsUserComment
current18:55, 11 March 2022Thumbnail for version as of 18:55, 11 March 20221,600 × 1,600 (103 KB)Maintenance script (talk | contribs)== Summary == Importing file

Metadata