Hi all!
I have 3 vectors with points from one of my modul's. I tried to build 3D plot using Qwt 3D. It is an old but interesting library for 3D plots using openGL. Many hours I'm has been tried to compile this library, and today it was success. Now I have new problem for many-many hours. The simplest way to build curve in this library - create class with reloaded operator with inheritance from class Fucntion.
double operator (double x, double y);
double operator (double x, double y);
To copy to clipboard, switch view to plain text mode
But I can't go this way - i have something like x,y=f1(x),z=f2(x), I mean I have two functions, not one z=f(x,y) like used this operator.
I tried to inheritance from another class Qwt3D::ParametricSurface because he used to build 3D plot operator
Qwt3D::Triple operator()(double x, double y);
Qwt3D::Triple operator()(double x, double y);
To copy to clipboard, switch view to plain text mode
And it was success way but only one problem...
I want to had something like that:
3d_mainwindow.gif
But I have that:
fa6fe89c4b60.jpg
It's just a curve and i don't know what i need to do to have nice plot like first
Maybe I doing something wrong or something don't understood...
Please help me somebody!
Thanks a lot!
P.S. that's a code that creating plot:
Qwt3D::Triple func3D::operator()(double x, double y){
return Qwt3D::Triple(x,proc->getFromPoint(x,"T")/10,proc->getFromPoint(x,"h")/1000);
}
Qwt3D::Triple func3D::operator()(double x, double y){
return Qwt3D::Triple(x,proc->getFromPoint(x,"T")/10,proc->getFromPoint(x,"h")/1000);
}
To copy to clipboard, switch view to plain text mode
proc is an object that just perform calculation.
x and y substituting buy library, I tried to understand but don't know how.
If return replace with code
double v,b,n;
double c = 1.9;
v = (c + cos(y)) * cos(x);
b = (c + cos(y)) * sin(x);
n = sin(y) + cos(y);
return Qwt3D::Triple(v,b,n);
double v,b,n;
double c = 1.9;
v = (c + cos(y)) * cos(x);
b = (c + cos(y)) * sin(x);
n = sin(y) + cos(y);
return Qwt3D::Triple(v,b,n);
To copy to clipboard, switch view to plain text mode
We will have:
f42de7b09123.jpg
I want this result but don't understand what the problem
Bookmarks