Plot -.-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
#include <math.h>
#include <chplot.h>
#define NUM 36
int main()
{
double x[NUM], y[NUM];
class CPlot plot;
int i;
for(i=0; i<NUM; i++)
{
x[i] = i*360/(NUM-1); // assign x with values from 0 to 360 linearly
y[i] = sin(x[i]*M_PI/180);
}
plot.title("Ch plot");
plot.label(PLOT_AXIS_X, "xlabel");
plot.label(PLOT_AXIS_Y, "ylabel");
plot.data2DCurve(x, y, NUM);
plot.plotting();
}
|
2 questions:
1) what should i use to compile this code ( OpenGL, DirectX ... ) ?
2) where can i find a tutorial for plot function ( a GOOD one ) ?
yeah, sorry i tought that my question should be posted on Windows programming too .... anyway thanks
Topic archived. No new replies allowed.