Results 1 to 1 of 1

Thread: Strange Interpolation in Qwt3dPlots Surface Plots

  1. #1
    Join Date
    Feb 2010
    Posts
    64
    Thanks
    18
    Qt products
    Qt4
    Platforms
    Windows

    Default Strange Interpolation in Qwt3dPlots Surface Plots

    Hi,

    I'm trying to plot a simple surface plot in 3D. I don't understand the interpolation, because:

    For these data, being (x, y, z) the colums of the tabla matrix.
    Qt Code:
    1. tabla[0][0]= 10;
    2. tabla[0][1]= -50;
    3. tabla[0][2]= 500;
    4.  
    5. tabla[1][0]= 10;
    6. tabla[1][1]= -60;
    7. tabla[1][2]= 500;
    8.  
    9. tabla[2][0]= 30;
    10. tabla[2][1]= -50;
    11. tabla[2][2]= 500;
    12.  
    13. tabla[3][0]= 30;
    14. tabla[3][1]= -60;
    15. tabla[3][2]= 500;
    To copy to clipboard, switch view to plain text mode 
    then I call the function to plot
    Qt Code:
    1. m_3dPlot->loadFromData(tabla, 3, 4, 10, 30 , -60,-50 ); //being 3 = colums, 4= rows, 10 = minX, 30 = maxX, -60 = minY, -50= maxY
    To copy to clipboard, switch view to plain text mode 

    The graph is attached.


    It is shown that, for the values in Y axis, thera are oscillation. For example, for any vaule of X and Y = -60, Z should be 500, but it is 0.

    And then the Z value decreases for an Y value arround -58, and then increases to get 500 for a Y value arround -54. And then it decreases again to 0 in Y = -50.

    Z value should be always 500, because of every Z data inserted is 500 (at any Y and X value). So the interpolation must result also Z=500, but instead, the Z value increases and decreases in a strange way.

    Has someone any idea? The values must be sorted? If yes, wich is the criteria (sorted by X values or Y, or Z).

    Thanks a lot!!!
    Attached Images Attached Images

Similar Threads

  1. resizing an image without interpolation
    By mattei in forum Qt Programming
    Replies: 3
    Last Post: 9th December 2009, 11:10
  2. Plots and Layouts
    By Ozzy in forum Qwt
    Replies: 5
    Last Post: 17th November 2009, 09:00
  3. qt with image Surface as triple buffered to directfb
    By guruvadhiraj in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 20th May 2009, 16:17
  4. opengl bezier surface
    By zorro68 in forum Qt Programming
    Replies: 6
    Last Post: 22nd February 2007, 17:44
  5. Replies: 2
    Last Post: 30th August 2006, 10:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.