# Qwt 3D problem

• 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);@
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);@
And it was success way but only one problem...
I want to had something like that:
!http://qtlinux.narod.ru/images/3d_mainwindow.gif(I want)!
But I have that:
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...
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);

}@

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);@

We will have:
I want this result but don't understand what the problem

Gerolf: Moved to 3rd Party, as Qwt is a 3rd party lib and not part of basic Qt

• Hello.
Qwt3D seemed pretty much complicated for me. Could you please post the function for x? I mean:
x = f(v,u), y = f1(x) = f1(f(v,u)), z = f2(x) = f2(f(v,u)). If there is no such function than parametric surface may be a solution for your problem.
Also, did you try using "Qwt3D::Function":http://qwtplot3d.sourceforge.net/web/doxygen/classQwt3D_1_1Function.html?

• [quote author="Wilk" date="1353670167"]Hello.
Qwt3D seemed pretty much complicated for me. Could you please post the function for x? I mean:
x = f(v,u), y = f1(x) = f1(f(v,u)), z = f2(x) = f2(f(v,u)). If there is no such function than parametric surface may be a solution for your problem.
Also, did you try using "Qwt3D::Function":http://qwtplot3d.sourceforge.net/web/doxygen/classQwt3D_1_1Function.html?[/quote]

Hi! Seems that my problem was in my bad geometry knowledge... x is not a function, more precise I have 2 functions and 1 variable that is series (I have variable L, x = x + step, point in 0 < x < L). Seems that in that task there can be only curve, not surface plot...

• Unfortunately, I don't have binaries of Qwt3D to run my test, so try out something like this: