File:ExampleEquationLog01.png: Difference between revisions
imported>Dmitrii Kouznetsov (Category:Code) |
imported>Caesar Schinas m (Bot: Replace Template:Image_notes_* with Template:Image_Details) |
||
Line 1: | Line 1: | ||
== Summary == | == Summary == | ||
{{ | {{Image_Details|permission | ||
| | |description = Graphic of functions | ||
<math>y=x</math> (black) and | <math>y=x</math> (black) and | ||
<math>y=\log_b(x)</math> for | <math>y=\log_b(x)</math> for | ||
Line 7: | Line 7: | ||
<math>b=\rm e^{1/\rm e}</math> (green) | <math>b=\rm e^{1/\rm e}</math> (green) | ||
<math>b=2</math> (blue) | <math>b=2</math> (blue) | ||
|author = Dmitrii Kouznetsov | |||
| | |copyright = Dmitrii Kouznetsov | ||
| | |source = //Example of graphic soluiton of equation | ||
| | |||
//Example of graphic soluiton of equation | |||
#include <math.h> | #include <math.h> | ||
#include <stdio.h> | #include <stdio.h> | ||
Line 60: | Line 58: | ||
fclose(o); | fclose(o); | ||
} | } | ||
| | |date-created = 2008 | ||
| | |pub-country = Japan | ||
| | |notes = Use it for free: copy, distribute, modify as you like. Indicate the source and mention that you have modified it if you did. | ||
| | |versions = | ||
}} | }} | ||
Revision as of 02:43, 22 June 2009
Summary
Title / Description
|
Graphic of functions
(black) and for (red) (green) (blue) |
---|---|
Author(s)
|
Dmitrii Kouznetsov |
Copyright holder
|
Dmitrii Kouznetsov See below for license/re-use information. |
Source
|
//Example of graphic soluiton of equation
#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"); fprintf(O,"/S {stroke} bind def\n"); fprintf(O,"/s {show newpath} bind def\n"); fprintf(O,"/times-Roman findfont 6 scalefont setfont\n"); fprintf(O,"/W {setlinewidth} bind def\n"); fprintf(O,"/RGB {setrgbcolor} bind def\n");} #define DO(x,y) for(x=0;x<y;x++) main(){ FILE *o; o=fopen("log.eps","w"); ado(o,800,800); fprintf(o,"10 10 scale\n"); fprintf(o,"10 10 translate\n"); #define M(x,y) fprintf(o,"%5.2f %5.2f M\n",10.*(x),10.*(y)); #define L(x,y) fprintf(o,"%5.2f %5.2f L\n",10.*(x),10.*(y)); M(0,6.3)L(0,0) L(6.3,0) fprintf(o,".3 W S\n"); int n; DB x,y,t; 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=1;n<7;n++){x=1*n;M(x,0)L(x,6)} M(-.5,M_E)L(6,M_E) M(M_E,-.5)L(M_E,6) 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);} M(0,0)L(7,7) fprintf(o,".4 W S\n"); M(-.8,M_E-.16) fprintf(o,"(e)s\n"); M(M_E-.14,-.8) fprintf(o,"(e)s\n"); fprintf(o,"/Times-Italic findfont 6 scalefont setfont\n"); M(-0.5,6) fprintf(o,"(y)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.)); if(n==0)M(x,y)else L(x,y)} 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)} 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)} fprintf(o,"0 0 1 RGB 0.3 W S\n"); fprintf(o,"showpage\n"); fprintf(o,"%cTrailer\n",'%'); fclose(o); } |
Date created
|
2008 |
Country of first publication
|
Japan |
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
|
If there are other versions of this media on CZ, please list them here. |
Using this image on CZ
|
Copy the code below to add this image to a Citizendium article, changing the size, alignment, and caption as necessary.
|
Please send email to manager A T citizendium.org .
Licensing/Copyright status
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/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 18:55, 11 March 2022 | 1,600 × 1,600 (103 KB) | Maintenance script (talk | contribs) | == Summary == Importing file |
You cannot overwrite this file.
File usage
The following 8 pages use this file: