本文整理汇总了C++中Plotter::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ Plotter::clear方法的具体用法?C++ Plotter::clear怎么用?C++ Plotter::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plotter
的用法示例。
在下文中一共展示了Plotter::clear方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PlotAll
static void PlotAll (Scene& scene, Plotter& plotter)
{
Vector x(1,steps), Pot(1,steps);
for (int i = 1; i <= steps; i++) {
x(i) = xmin + (i-1)*(xmax-xmin)/(steps-1);
Pot(i) = V(x(i));
}
plotter.clear();
double ymin = -1, ymax = min(6.0,max(1.0,Max(Pot))); // betwwen 1 and 6 !!
plotter.axisframe(xmin,xmax,ymin,ymax, "x","V(x), Psi(x)");
plotter.style(plotter.LINES);
plotter.plot(x,Pot); // potential
scene.Line(xmin,ymin,xmin,ymax);
scene.Line(xmax,ymin,xmax,ymax);
scene.SetColor(ColorB(255,0,0)); // wave function
plotter.plot(x,Psi);
scene.SetColor(ColorB(0,0,255)); // eigen energy
scene.Line(xmin,E,xmax,E);
scene.SetTextStyle(Standard);
char label[60];
sprintf(label,"E=%.8g",E);
scene.Write(xmin+0.01,E+0.05,label);
}
示例2: backgroundIntro
//Function that prints names
bool backgroundIntro()
{
ifstream data;
POINT p;
Plotter screen;
/* HWND consoleWnd = GetConsoleWindow();*/
Sleep(100);
//PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\357mag.wav", NULL, SND_ASYNC);
screen.setColor(yellow);
screen.move(30,23);
cout<<"Created By:";
Sleep(2000);
Sleep(100);
//PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\357mag.wav", NULL, SND_ASYNC);
screen.setColor(green);
screen.move(30,25);
cout<<"Abril Resendiz";
Sleep(2000);
// PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\357mag.wav", NULL, SND_ASYNC);
screen.setColor(yellow);
screen.move(30,27);
cout<<"Daniel Holt";
Sleep(2000);
// PlaySound("C:\\Users\\Alex\\Desktop\\CB\\ProjectFinal\\357mag.wav", NULL, SND_ASYNC);
screen.setColor(green);
screen.move(30,29);
cout<<"Maggie Schmeltekopf";
Sleep(2000);
// PlaySound("C:\\Users\\Alex\\Desktop\\CB\\ProjectFinal\\357mag.wav", NULL, SND_ASYNC);
screen.setColor(yellow);
screen.move(30,31);
cout<<"Victoria Robinson";
Sleep(2000);
// PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\\357mag.wav", NULL, SND_ASYNC);
screen.setColor(green);
screen.move(30,33);
cout<<"Emily Peirce";
Sleep(2000);
screen.clear();
return exit;
}