CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: 3d surface plot

  1. #1
    Join Date
    Apr 2006
    Posts
    2

    3d surface plot

    I have some data like this

    1 2 3 4 5
    1 100 200 120 80 5
    2 4 21 123 190 12
    3 12 31 19 123 26
    4 250 123 11 400 98

    now i need a code to plot this as xyz plot and have facility to rotate and view from any axis.... can someone help me... i tried using vector representation and matrix multplications.. but it does not give the required results. can somebody help me out...
    --cskumar

  2. #2
    Join Date
    Jan 2006
    Location
    Bangalore, India
    Posts
    209

    Re: 3d surface plot

    Move the values in an array.

    By use of MSChart control you can draw chart for the values in an array.

    The below link shows how to plot 2d Bar chart for the given array values.

    http://www.vbcity.com/forums/faq.asp...hart%20Control

    You change the chart type property to 3D for your problem.

  3. #3
    Join Date
    Apr 2006
    Posts
    2

    Re: 3d surface plot

    I dont want to use the MSchart tool. i want to code it for all rotations, position movement using trignometry functions.
    -cskumar

  4. #4
    Join Date
    Mar 2002
    Location
    Croatia
    Posts
    275

    Re: 3d surface plot

    Do you want to make a perspective projection of graphs, using trigonometry and VB drawing functions?

    It is not a simple task. You can imagine your graphs as 3D objects, and you have to make projection of x,y,z coordinates to a drawing x,y surface.
    Trignonometry functions for 3D projecton could be found somewhere on internet, I have seen it (not tried) but unfortunatelly I have no link saved.

    Another problem is rendering, but it can be easily solved. You have to sort items (depending on viewing angle) to first draw hidden items.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured