00001
00002 #include "winmagra_stdc++.h"
00003 #include <cmath>
00004 #include <vector>
00005 #include <iostream>
00006 #include <xgrayimg.hpp>
00007
00008 using namespace std;
00009
00010
00011 typedef vector<float> vfl;
00012 void main()
00013 { vfl test;
00014
00015 float x[50],y[50];
00016 for(int i=0;i<50;i++) {
00017 x[i]=2*i;
00018 y[i]=2.*sin(2.*3.14159*i/50.+3.14159);
00019 test.push_back(x[i]);
00020 }
00021
00022
00023
00024
00025 desk dvi;
00026 boxclass box(dvi);
00027
00028
00029
00030 dvi.open(SCREEN|EPS_FILE,"test1","pos=(200,300)");
00031
00032
00033 box.init(30,30,110,85,0.97);
00034 box.dim(0,100,-2.4,2.4,25,.6);
00035 box.label("Voltage (V) ","Amplitude (A)");
00036
00037 box.showpoints(x,y,50,_BLUE,HEXAGON,1.5);
00038 box.connectpoints(x,y,50,_RED,1);
00039
00040
00041 for (vfl::iterator c=test.begin(); c!=test.end(); c++)
00042 cout<<*c<<endl;
00043
00044
00045 bild16 testbild;
00046 testbild.write_pgm16("einbild.pgm");
00047 }