资源简介
使用方法参照
http://blog.csdn.net/caoqiang2006/article/details/53038441
代码片段和文件信息
#include “mylineplot3d.h“
#include
#include
#include
#include
#include “qwt3d_plot.h“
#include “qwt3d_parametricsurface.h“
#include “qwt3d_enrichment_std.h“
#include “QMessageBox“
using namespace Qwt3D;
class Rosenbrock : public Function
{
public:
Rosenbrock(SurfacePlot& pw)
:Function(pw)
{
}
Rosenbrock(){}
double operator()(double x double y)
{
// return 0;
return x*y/2;
return x*sin(y)* log(x) + y* cos(x);
return log(sin(x) * cos(y));
return log((1-x)*(1-x) + 100 * (y - x*x)*(y - x*x)) / 8;
}
};
MyLinePlot3d::MyLinePlot3d()
{
printf(“--------------\n“);
myxMax = 1000;
myyMax = 1000;
myzMax = 1000;
myCurxMax = 0.0;
myCurxMin = 0.0;
myCuryMax = 0.0;
myCuryMin = 0.0;
myCurzMax = 0.0;
myCurzMin = 0.0;
// setFloorstyle(FLOORISO);
setPlotstyle(Qwt3D::LINE3D_style);
coordinates()->setAutoScale();
settitle(“A Simple SurfacePlot Demonstration“);
setIsolines(5);
Rosenbrock rosenbrock;
coordinates()->setGridLines(truetrueQwt3D::LEFT|Qwt3D::BACK|Qwt3D::FLOOR);
rosenbrock.setMesh(55);
rosenbrock.setDomain(0myxMax0myyMax);
rosenbrock.setMinZ(0);
rosenbrock.setMaxZ(myzMax);
rosenbrock.create(*this);
// TestPoint tp;
// tp.setDomain(-1010-1010);
// tp.setMesh(55);
// tp.create(*this);
setShift(100);
setRotation(30015);
setScale(111);
setShift(0.1500);
setZoom(0.9);
int axesCount = coordinates()->axes.size();
for (unsigned i=0; i!=coordinates()->axes.size(); ++i)
{
coordinates()->axes[i].setMajors(7);
coordinates()->axes[i].setMinors(4);
}
coordinates()->axes[X1].setLabelString(“x-axis“);
coordinates()->axes[Y1].setLabelString(“y-axis“);
coordinates()->axes[Z1].setLabelString(QChar(0x38f)); // Omega - see http://www.unicode.org/charts/
setCoordinatestyle(BOX);
// Qwt3D::PLOTstyle s = plotstyle();
updateData();
updateGL();
}
MyLinePlot3d::~MyLinePlot3d()
{
}
void MyLinePlot3d::init()
{
}
void MyLinePlot3d::createLines()
{
}
void MyLinePlot3d::keyPressEvent(QKeyEvent * e)
{
int c = e->key();
if(e->key() == 0x20)
{
setShift(100);
setRotation(30015);
setScale(111);
setShift(0.1500);
setZoom(0.9);
}
else if(c == 65)
{
printf(“set scale %f %f %f\n “xScale()yScale()*1.2zScale());
setScale(11zScale() * 1.2);
}
}
void MyLinePlot3d::tick()
{
updateData();
updateGL();
}
void MyLinePlot3d::setCurMaxMin(double xmindouble xmaxdouble ymindouble ymaxdouble zmindouble zmax)
{
if (xmin < myCurxMin)
{
myCurxMin = xmin;
}
if (xmax > myCurxMax)
{
myCurxMax = xmax;
}
if (ymin < myCuryMin)
{
myCuryMin = ymin;
}
if (ymax > myCuryMax)
{
myCuryMax = ymax;
}
if (zmin < myCurzMin)
{
myCurzMin = zmin;
}
if (zmax > myCurzMax)
{
myCurzMax = zmax;
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-12-29 11:06 qwtplot3d\
目录 0 2016-10-26 17:38 qwtplot3d\_UpgradeReport_Files\
文件 3348 2016-10-26 17:38 qwtplot3d\_UpgradeReport_Files\UpgradeReport.css
文件 12505 2010-05-04 01:19 qwtplot3d\_UpgradeReport_Files\UpgradeReport.xslt
文件 69 2016-10-26 17:38 qwtplot3d\_UpgradeReport_Files\UpgradeReport_Minus.gif
文件 71 2016-10-26 17:38 qwtplot3d\_UpgradeReport_Files\UpgradeReport_Plus.gif
目录 0 2016-10-26 17:37 qwtplot3d\3rdparty\
目录 0 2016-10-26 17:37 qwtplot3d\3rdparty\gl2ps\
文件 985 2004-03-13 19:43 qwtplot3d\3rdparty\gl2ps\COPYING.GL2PS
文件 25846 2004-03-13 19:43 qwtplot3d\3rdparty\gl2ps\COPYING.LGPL
文件 187292 2007-05-20 17:51 qwtplot3d\3rdparty\gl2ps\gl2ps.c
文件 6863 2007-05-20 17:51 qwtplot3d\3rdparty\gl2ps\gl2ps.h
目录 0 2016-12-29 11:06 qwtplot3d\bin\
文件 92160 2016-10-27 02:42 qwtplot3d\bin\autoswitch.exe
文件 154624 2016-10-26 18:20 qwtplot3d\bin\axes.exe
文件 143360 2016-10-27 02:45 qwtplot3d\bin\enrichments.exe
文件 444928 2016-11-04 20:06 qwtplot3d\bin\mesh2.exe
文件 337920 2016-12-29 10:12 qwtplot3d\bin\qwtplot3d.dll
文件 206618 2016-12-29 10:12 qwtplot3d\bin\qwtplot3d.lib
文件 867328 2016-12-29 10:14 qwtplot3d\bin\qwtplot3dd.dll
文件 207260 2016-12-29 10:14 qwtplot3d\bin\qwtplot3dd.lib
文件 120320 2016-12-29 11:01 qwtplot3d\bin\simpleplot.exe
文件 288 2016-10-26 04:06 qwtplot3d\clear.bat
文件 962 2005-07-10 17:10 qwtplot3d\COPYING
目录 0 2016-12-29 11:06 qwtplot3d\doc\
文件 8918 2007-06-25 19:44 qwtplot3d\doc\Doxyfile.doxygen
目录 0 2016-10-26 17:37 qwtplot3d\doc\web\
目录 0 2016-10-26 17:37 qwtplot3d\doc\web\navigation\
文件 4913 2004-02-26 02:55 qwtplot3d\doc\web\navigation\doxygen.css
文件 2352 2003-07-05 17:50 qwtplot3d\doc\web\navigation\doxygen.png
文件 428 2004-03-13 02:20 qwtplot3d\doc\web\navigation\menu.css
............此处省略373个文件信息
- 上一篇:STM32开源对讲机SPEEX
- 下一篇:小功率调幅发射机设计制作
评论
共有 条评论