1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to convert 3d co ords to 2d orthographic?

  1. Dec 6, 2011 #1
    I'm still looking into this prior to my older thread and someone has told me of a method that I have quoted below;

    All measurements are assuming that the pixel width/height is one)

    Let fov = the field of view, you can decide how much field of view your user will have from the target viewing point. For example, if you look at your screen and say that there is 30 degrees between the edges of your screen from the target viewing area, then 30 is your fov.

    Let d = (screen width / tan(fov)) to the nearest integer.

    Given the 3D point [x,y,z]

    Your 2D point is [x * d/z, y * d/z] where z is the pixels from 0 being the screen to 1000 being A kilometer away from your screen (of course, all virtually) Here's in example:

    Let my screen be 20 pixels wide.

    Make a V with my hands by placing my palms together, point the edges of my hands to the edges of my screen as shown on my computer monitor, and estimate the angle to be thirty degrees (Of course this will be different with different monitors, so there should be a suggested monitor width) Then:

    d = 20 / tan 30 ~= 35 (This should be pretty close to the actual distance the user is from the screen!)

    Now, Given the point [x,y,z]

    My 2D point is [x * 35 / z, y * 35 / z]


    Will this work or does it have any limitations?

  2. jcsd
  3. Dec 6, 2011 #2


    User Avatar
    Science Advisor

    Yes, that will that will work but I don't quite see why you are doing it. You appear to be calculating the distance from the screen by using a given angle. It is the distance from the screen that is the more direct measurement and one would normally calculate the "fov" from that.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Similar Threads for convert ords orthographic
I Convert from rectangular to Spherical Coordinates