How can I determine the width of the visible side of a 3d box from a centered fixed distance camera?

What's you're looking for is a perspective projection . In addition to the position of the camera and dimensions of the box, you also need a "screen" somewhere between the camera and the box onto which the box will be projected. The distance from the camera to this screen will scale the size of the projected box.

Up vote 1 down vote favorite share g+ share fb share tw.

Thanks! Math 3d-graphics computational-geometry link|improve this question edited Jan 5 '11 at 4:09 asked Jan 5 '11 at 3:54emery204 33% accept rate.

What's you're looking for is a perspective projection. In addition to the position of the camera and dimensions of the box, you also need a "screen" somewhere between the camera and the box onto which the box will be projected. The distance from the camera to this screen will scale the size of the projected box.

Let's say the camera is at the origin and z units away from the box, the screen is one unit away from the camera, and the box was depth d, width 2w, and height 2h. In 3D ambient space, the top-left corner of the box is at position (-w, h, z). The ray between the camera and this point intersects the projection screen at (-w/z, h/z, 1).

The top-left corner of the floor of the box is at position (-w, h, z+d) which is projected to (-w/(z+d), h/(z+d), 1). Similarly, you can find the positions of the other projected points. Therefore the width of the outer box on the screen is 2w/z, the width of the inner box 2w/(z+d), and analogously for the heights.

The inner box is thus just a uniformly scaled version of the outer box, with the inner box dimensions z/(z+d) times the outer box ones. Note that the diagonals connecting the two boxes are not oriented at 45 degrees unless the box happens to be square.

Perfect, thank you! – emery Jan 5 '11 at 20:06.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions