i still have the problem to bring 3d data to 2d. i have an array with polygons. every polygon has 3 vertex points with logically 3 values (x,y,z). now i want to draw these polygons with gdi+ which is only 2d. i want to do something like: for every polygon get every vertex point get correct x and y value for this point in all articles i found, is a value which stands for the position of the viewer or the point of view. how can i get this value. it has to be in the center of my window, where i´m painting with gdi+. thanks for help
Share
There is no other way (nor that I’m aware of) then
define a
Plane, where your 2D will be drawnmove your 3D vertex along plane normal versus normal, constrcuting in this way vector/line.
find intersection of the
Planeand vector == that would the point you are going to draw in 2D space.To define a plane, you can use your 3D engine. It usually achieved (also because it’s mathematically correct), by specifying
a pointanda normal vector. Having these 2 informations you’re able to construct (also mentally) a plane surface.