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!

Homework Help: How object distance varies with distance(depth)?

  1. Oct 12, 2012 #1
    Suppose a rod measures 10 cm in length at a distance of 50 cm from my eyes, what will it's length be when it is pushed further by x cm ?(that is at a distance of 'x+50'cm from my eyes)

    Please provide a mathematical expression with derivation involving:
    rod length-a
    new distance-l' as variables.
  2. jcsd
  3. Oct 12, 2012 #2


    User Avatar
    Science Advisor

    Measured rod length is not a function of distance from your eyes.

    Subtended angle is a function of distance from your eyes. But that's trigonometry, not physics. Draw a picture. Label the angles. Try to find a trig function that gives a ratio of the two things that you do know (rod length and distance) in terms of the thing that you don't know (subtended angle).

    You may be able to simplify by considering the top half of the rod and the bottom half of the rod separately.
  4. Oct 13, 2012 #3
    Is it correct to say l'=(10/(50+x))*50
  5. Oct 13, 2012 #4
    Suppose I look at a series of steps as shown in the attached file.

    k is the horizontal shift per step and h the vertical shift per step.
    -> points to the vertical plane along which steps are projected perspectively.

    Then is the height of 'n'th step h'=(h*k)/(n*k)=h/n.

    Attached Files:

    Last edited: Oct 13, 2012
  6. Oct 13, 2012 #5


    User Avatar
    Science Advisor

    It appears that you are trying to ask about perspective.

    One way of dealing with perspective is to think in terms of angles. That is the approach that I was taking. The angle at which a point at a distance x and height h is seen will be given by arctan ( h / x ).

    This corresponds to putting a transparent sphere around the eye, projecting sight lines onto the sphere and measuring the angle where sight line passes through the sphere. This technique is good for doing physics (we call it "polar coordinates) but not very good for painting pictures -- paper is not spherical.

    Another way of dealing with perspective is to project the sight lines down to an imaginary flat pane of glass through which you are looking at a scene. The points where the sight lines hit the pane are the points where you would put paint on paper to faithfully reproduce the scene. This is the approach that you are taking.

    With this understanding...

    Yes: If a rod is 10 cm tall when it is right at a pane of glass 50 cm away from the eye then the projection of this rod on the pane will be 10 * 50 / ( 50 + x ) cm tall when it is moved to 50 + x cm away from the eye.

    Yes: If h is the projected height of the first step as seen from 1 distance unit away then h/n will be the projected height of the n'th step as seen from n distance units away.
  7. Oct 13, 2012 #6
    Thanks, I am actually trying to program a 3d grid. And I wanted to know how to space the grid lines for a particular angle as input to mimic a 3d effect.
    Can you please attach a bmp image showing the ray diagrams to illustrate the change in object size with distance taking into account the position of eye.
  8. Oct 13, 2012 #7
    Any links to online info are also welcome.
  9. Oct 13, 2012 #8


    User Avatar
    Science Advisor

    If you are trying to program it then what you are probably after is a transformation.

    Given a 3-d coordinate value (x,y,z), find the projection of that coordinate on a given plane.

    For convenience, take the origin of your coordinate system to be at the eye and take the projection with respect to the x=1 plane.

    Then the projection of (x,y,z) on the plane is simply (1, y/x, z/x) and you will want to display a pixel at (y/x, z/x).

    If you want to render a 3-d line segment, then find the projections of the end points and fill in the 2-d line segment between those points.

    You may want to clip the image and not try to render any image element for which x < 0.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook