0 pts.
 3d drawing
how i draw 3d line's with vb without useing Direct X or OpenGL

Software/Hardware used:
ASKED: March 9, 2005  6:02 AM
UPDATED: March 10, 2005  3:42 AM

Answer Wiki:
Depending on what level of detail and accuracy you need this is either going to be easy or painful! If you are not using a 3D API like OpenGL or DirectX, you need to do the math yourself to project your 3D drawing onto a 2D surface and then just use the normal line drawing commands. Obviously, this won't give you any of the lighting, shading, texturing etc. that appears in most 3D scenes but it will allow you to draw, for example, wireframe representations of quite complex 3D geometric objects. As a very simple starting point, imagine you have a cube that you wish to draw in 3D (i.e. using a perspective projection) - each vertex of the cube will be defined by an (x, y, z) coordinate. The simplest way to draw this shape on a 2D surface is to divide each (x, y) by the corresponding z (or some multiple thereof). If that's all you need then your done! If you need to animate your drawing - by rotating shapes for example, you must use conventional 3D geometry to transform your starting vertices (the x,y,z's) according to the effect you desire, and then project onto 2D using the simplistic "divide by z" method as the final step. The above will not allow you to do things that OpenGL and DirectX will do easily though - there will be no hidden line removal (i.e. lines *behind* other shapes will still be visible), but like I said at the outset, it really depends on your application. Hope that helps, Roger
Last Wiki Answer Submitted:  March 10, 2005  3:42 am  by  Rmrsystems   0 pts.
All Answer Wiki Contributors:  Rmrsystems   0 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _