Revision as of 08:51, 1 December 2018 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Original file(1,183 × 282 pixels, file size: 48 KB, MIME type: image/jpeg)

Explicit plot of the simplest self-SinFT function

$y=F(x)=2x \exp(-x^2/2)~$ , thin smooth curve,

its discrete representation at the mesh with 4 nodes (thick colored segmented line),

and its SFT (black segmented line). Even with so view nodes, visually, the two segmented curves practically coincide; the array is reproduced with at least 3 decimal digits.

C++ generator of lines

// Files ado.cin and scft.cin should be loaded in order of compile the code below

#include <stdio.h>
#include <math.h>
#include "scft.cin"
#include "ado.cin"
#define NP 4
int main(){ int i; double a[NP],b[NP]; double d=sqrt(M_PI/NP); double x,y; FILE *o;
for(i=0;i<NP;i++){ x=i*d; a[i]=b[i]=2.*x*exp(-.5*x*x); }
for(i=0;i<NP;i++) { b[i]*=sqrt(2./NP); printf("%2d %19.14lf %19.14lf %19.14lf\n",i,a[i],b[i], b[i]-a[i]);}
//o=fopen("34.eps","w"); ado(o,470,140);
o=fopen("sinftes04.eps","w"); ado(o,570,140);
#define M(x,y) fprintf(o,"%9.4lf %9.4lf M\n",x+0.,y+0.);
#define L(x,y) fprintf(o,"%9.4lf %9.4lf L\n",x+0.,y+0.);
fprintf(o,"10 10 translate 100 100 scale 2 setlinecap 1 setlinejoin\n");
fprintf(o,".007 W S\n");
M(0,0); for(i=1;i<110;i++) { x=.05*i; y=2.*x*exp(-.5*x*x); L(x,y);} fprintf(o,".009 W 0 0 0 RGB S\n");
M(0,0); for(i=1;i<NP;i++) { x=d*i; y=a[i]; L(x,y);} fprintf(o,".04 W 1 0 .5 RGB S\n");
M(0,0); for(i=1;i<NP;i++) { x=d*i; y=b[i]; L(x,y);} fprintf(o,".015 W 0 0 0 RGB S\n");

system("epstopdf sinftes04.eps");
system( "open sinftes04.pdf");

Latex generator of curve


File history

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

current06:14, 1 December 2018Thumbnail for version as of 06:14, 1 December 20181,183 × 282 (48 KB)Maintenance script (talk | contribs)Importing image file
  • You cannot overwrite this file.

The following page links to this file: