[comp.graphics] 2D to 3D conversion

matthias@mpx1.lanl.gov (11/10/89)

In article <822@uwm.edu>, jrn@csd4.csd.uwm.edu (James Ray Norton) writes:

..

>                           ^
>                           |
>                           |
>                           |
>                           |
>                           |
>                          . --------------->
>                       .
>                    .     
>                 .          
> 
> Now,  how do I convert the point (x,y,z) to screen coordinates (x,y)?

..

Similar questions have appeared in this newsgroup in the not so distant
past, I think. What you want does not look like a general 3D rotation
(Euler angles) followed by a projection on to a specified plane. Rather,
if I understand correctly, you want to try:

     (x',y')=screen coordinates ;  (x,y,z)=original point

     x' = x - z*sin(phi1)
     y' = y - z*sin(phi2)

where phi1 and phi2 are tilt angles that you may want to choose to be 45 deg.
I hope this is also useful to those who have asked similar questions.
Regards,
Bjorn

mcooper@s.cs.uiuc.edu (11/15/89)

of course, it also depends on whether you simply want 'slices' or a true 3-D
image, and if you want the latter, do you want an orthographic or perspective
projection?


I suggest any basic graphics book (Fundamentals of Interactive Computer Graphics by Foley and VanDam)


It should have what you need.