3D to 2D Transformation
-
I'm trying to convert a series of 3D points (XYZ) to a 2D (XY) surface. In my application a series of lines run along the axes (think of pipes fitted together with elbows, tees, and crosses), they are 90 deg to each other. I simply do the following to map my XYZ points to the YZ plane: xp = (z + x * COS_45); yp = (y + x * SIN_45); This is not quite right. When drawn on a metafile, lines in the Z direction run Parallel to bottom edge, they should actually be at 30 deg. I can see that I need to get an x and y added value from the z-component, however I haven't had much luck. A simple set of points: (0,0,0) (20,0,0) (20,20,0) (20,20,20) (40,20,20) Does anyone have the appropriate transformation/formula that I should use? Or good place to look? (I was trying to avoid matrices and doing some type of world to eye to screen transform - it seems it should be easier, since all my lines are at 90's) Thanks Mike