#include <math.h>
#include <chplot.h>
int main() {
int numpoints = 36;
array double r1[numpoints], theta1[numpoints], z1[numpoints];
array double r2[numpoints], theta2[numpoints], z2[numpoints];
class CPlot plot;
linspace(theta1, 0, 360);
z1=(array double [numpoints])3+
sin((theta1-(array double [numpoints])90)*M_PI/180);
r1=(array double [numpoints])1;
linspace(theta2, 0, 360);
z2=(array double [numpoints])0;
r2=(array double [numpoints])1;
plot.dimension(3);
plot.coordSystem(PLOT_COORD_CYLINDRICAL, PLOT_ANGLE_DEG);
plot.data3D(theta1, z1, r1);
plot.data3D(theta2, z2, r2);
plot.line(0, 0, 1, 0, 2, 1);
plot.line(90, 0, 1, 90, 3, 1);
plot.line(180, 0, 1, 180, 4, 1);
plot.line(270, 0, 1, 270, 3, 1);
plot.plotType(PLOT_PLOTTYPE_LINES, 0, 1, 1);
plot.plotType(PLOT_PLOTTYPE_LINES, 1, 1, 1);
plot.plotType(PLOT_PLOTTYPE_LINES, 2, 1, 1);
plot.plotType(PLOT_PLOTTYPE_LINES, 3, 1, 1);
plot.plotType(PLOT_PLOTTYPE_LINES, 4, 1, 1);
plot.plotType(PLOT_PLOTTYPE_LINES, 5, 1, 1);
plot.plotting();
}