123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
-
-
-
-
- #include<iostream>
- #include "xyplotwindow.h"
- #include <QApplication>
- using namespace std;
-
-
-
-
-
-
-
- void illustration(int paramValue, int ¶mRef)
- {
- paramValue=1;
- paramRef=1;
- cout << endl << "The content of paramValue is: " << paramValue << endl
- << "The content of paramRef is: " << paramRef << endl;
- }
-
-
-
-
-
- void circle(double p, double &xCoord, double &yCoord)
- {
- xCoord = 5 * cos(p);
- yCoord = 5 * sin(p);
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- int main(int argc, char *argv[])
- {
- QApplication a(argc, argv);
- XYPlotWindow wCircleR5;
- XYPlotWindow wCircle;
- XYPlotWindow wButterfly;
-
-
- double r;
- double y = 0.00;
- double x = 0.00;
- double increment = 0.01;
- int argValue=0, argRef=0;
-
-
-
- illustration(argValue,argRef);
- cout << endl << "The content of argValue is: " << argValue << endl
- << "The content of argRef is: " << argRef << endl;
-
-
-
-
- for (double t = 0; t < 16*M_PI; t = t + increment)
- {
-
-
- circle(t,x,y);
-
-
- wCircleR5.AddPointToGraph(x,y);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
-
-
-
- wCircleR5.Plot();
- wCircleR5.show();
-
-
-
-
- return a.exec();
- }
|