Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Help with 3D grid data

cool_xocool_xo Member Posts: 3
I am new to Graphics Programming.

I have to program a software application that takes in many slices of 2D data in both direction. That is, those slices crosses each other.

I am using VC++/MFC/DirectX to do this. Would anyone have any ideas of where should I start?? And I'm a bit lost on how to get the grid data points and display them as a solid cube.

Any comments would be greatly appreciated. thanks. =(




Comments

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : I am new to Graphics Programming.
    :
    : I have to program a software application that takes in many slices of 2D data in both direction. That is, those slices crosses each other.
    :
    : I am using VC++/MFC/DirectX to do this. Would anyone have any ideas of where should I start?? And I'm a bit lost on how to get the grid data points and display them as a solid cube.
    :
    : Any comments would be greatly appreciated. thanks. =(
    :

    I'm not sure what exactly you're trying to do, but I have two helpful pieces of advice. The first is to ditch DX until you're fairly competent at both C++ and 3D manipulation. I spent (wasted) a month trying to get DX to do anything, then spent about four hours toying with OpenGL and had a fully-rendered 3D engine up. OpenGL also runs faster, but requires an OpenGL compliant card (ie: not an ATI, such as a Radeon). The second would be to ditch the visual series and learn to code the stuff manually because the code turns out MUCH cleaner, faster, and it's a million times easier to go back and correct errors or modify code.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • cool_xocool_xo Member Posts: 3
    : I'm not sure what exactly you're trying to do, but I have two helpful pieces of advice. The first is to ditch DX until you're fairly competent at both C++ and 3D manipulation. I spent (wasted) a month trying to get DX to do anything, then spent about four hours toying with OpenGL and had a fully-rendered 3D engine up. OpenGL also runs faster, but requires an OpenGL compliant card (ie: not an ATI, such as a Radeon). The second would be to ditch the visual series and learn to code the stuff manually because the code turns out MUCH cleaner, faster, and it's a million times easier to go back and correct errors or modify code.
    :

    I am fairly good in C++ and I did a bit of 3D manipulation in Uni. I understand that DX is a really hard to program. However, the laptop I am have IS using an ATI card (*Sigh*).... and our client is using the same labtop as we're. And I think I'm stuck with VC++, since we have no money to get anything else.... =

    Let me explain more:
    We current have a software that output files in a format of slices of 2D data from a Ground Penetrating Radar. So... in simple term, I just want to change those 2D slices of data into a 3D cube thing. =)

    Since there's gap between each data points(specified in each output 2D file), I don't know how to calculate/convert all these 2D POINTS into a solid cube.

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    Ah I think I understand now. Could you possibly show me (in text) what one of these "slices" looks like? If I could see what the slice looks like I could easily tell you how to convert it to a 3d shape.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • cool_xocool_xo Member Posts: 3
    hmmm........ i don't think that's possible. =(

    When I say slices... it is a slices of data points. Like grid data with uncorrlated data points. I believe the main problem I don't understand is:
    - How to do Volume visualisation?

    Since there's a gap between each slices, I need to create some sort of volume for each point in order to make up a cube... instead of lots of dots in 3D.

    hmm.... I don't know if I did make things clean. But I would really appreicate any comments. thank you!~

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : hmmm........ i don't think that's possible. =(
    :
    : When I say slices... it is a slices of data points. Like grid data with uncorrlated data points. I believe the main problem I don't understand is:
    : - How to do Volume visualisation?
    :
    : Since there's a gap between each slices, I need to create some sort of volume for each point in order to make up a cube... instead of lots of dots in 3D.
    :
    : hmm.... I don't know if I did make things clean. But I would really appreicate any comments. thank you!~
    :
    :
    I can't fofer much help specific to your problem without knowing the format, but in OpenGL plotting triangles is simple.
    [code]
    glBegin(GL_TRIANGLES);
    //Here's one triangle
    Vertex3f(x.xxxxxx, y.yyyyyy, z.zzzzzz);
    Vertex3f(x.xxxxxx, y.yyyyyy, z.zzzzzz);
    Vertex3f(x.xxxxxx, y.yyyyyy, z.zzzzzz);

    //Here's another!
    Vertex3f(x.xxxxxx, y.yyyyyy, z.zzzzzz);
    Vertex3f(x.xxxxxx, y.yyyyyy, z.zzzzzz);
    Vertex3f(x.xxxxxx, y.yyyyyy, z.zzzzzz);
    glEnd();
    [/code]
    The way I do the drawing of triangles in my game engine is by using loop-control. It is MUCH more advanced than that though, because I have texture-mapping, mip-map dithering, dynamic lighting, moving objects, shadows, etc etc. But that code above is the part of OpenGL that draws triangles. You would also need to initialize OpenGL before using that code, but that's pretty simple as well.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red][/b][/italic]

  • loopguruloopguru Member Posts: 2
    There is a great FREE / OPENSOURCE visualization package that may be related to what you are trying to do. Its called VTK (Visualization Toolkit) http://www.vtk.org It is quite powerful and is used frequently to visualize "slices" of 2D data (like contours). It has been ported to Java, Tcl/Tk , Python, and C++. And another plus is that its relatively easy to use.
    Hope this helps.
    ks


    : I am new to Graphics Programming.
    :
    : I have to program a software application that takes in many slices of 2D data in both direction. That is, those slices crosses each other.
    :
    : I am using VC++/MFC/DirectX to do this. Would anyone have any ideas of where should I start?? And I'm a bit lost on how to get the grid data points and display them as a solid cube.
    :
    : Any comments would be greatly appreciated. thanks. =(
    :
    :
    :
    :
    :

Sign In or Register to comment.