Mr. Latte


Lesson 5 of 10

Project Distant Objects Smaller

Distant objects appear smaller in photographs. Perspective projection changes apparent size with depth. Orthographic projection preserves size across depth, making it useful for diagrams and technical views.

A simple perspective calculation

Assume the camera looks along +z and points in front have positive z. With focal distance f, use x_screen = f*x/z and y_screen = f*y/z. Actual graphics APIs may use different axes and depth conventions.

f, x = 1, 2
print(f * x / 2)
print(f * x / 4)

The outputs are 1.0 and 0.5. Doubling depth halves the projected distance from the origin for the same x. These are projection-plane coordinates; mapping to pixel positions is another step.

Clip what lies outside the view

A camera has a field of view and near and far planes. The enclosed view volume is a frustum. Clipping removes portions outside it. Dividing at z=0 or blindly projecting points behind the camera produces invalid results.

A typical pipeline forms clip coordinates with a projection matrix, clips, then divides by w. Viewport mapping converts the resulting coordinates to the screen’s pixel range.

Check your understanding

Two front-facing objects have equal physical size, but one is twice as far away. How do perspective and orthographic projections differ?

Show explanation

Under equal remaining conditions, perspective halves the distant object’s width and height. Orthographic projection does not reduce size merely because depth increases. Choose the projection suited to the representation.

Looking for a product partner? Founders, teams, businesses: from problem framing to launch.