#include <chplot.h> #include <math.h> int main() { array double x1[50], x2[50], y[4], z[200]; int i,j,angle; class CPlot plot; linspace(x1, 0, 2*M_PI); linspace(x2, M_PI/2, 2*M_PI+M_PI/2); linspace(y, 0, 2*M_PI); for (i=0;i<50;i++) { for (j=0;j<4;j++) { z[j+4*i]=cos(x1[i]); // Z-axis data. } } plot.dimension(3); plot.data3D(x1, y, z); plot.data3D(x2, y, z); plot.plotting(); }