v9.1.1
Menu

Orthographic Projection

easyFREE3D to 2D ProjectionsProjectionCV: Image Formation

Implement an orthographic projection to transform a 3D point into a 2D point. This process involves projecting a 3D point onto a 2D plane using parallel lines, which is essential in computer vision and image formation.

The concept of orthographic projection is crucial in preserving the shape and size of objects in 2D representations, particularly in CAD designs and engineering drawings. Mathematically, this can be represented as a transformation from a 3D coordinate system (X,Y,Z)(X, Y, Z) to a 2D coordinate system (X,Y)(X, Y).

To achieve this, follow these steps:

  1. Identify the 3D point to be projected.
  2. Apply the projection formula to obtain the 2D point.
X′=XX' = X Y′=YY' = Y

This technique is widely used in technical drawing and architecture.

Example

Input
orthographic([10, 20, 5])
Output
[10, 20]
Reasoning
  • The input point_3d is one 3D point (X,Y,Z)=(10,20,5)(X, Y, Z) = (10, 20, 5): two coordinates across the image plane and Z=5Z = 5, the depth along the viewing direction.
  • Orthographic projection sends every point along parallel rays straight onto the image plane, so the formula is X′=XX' = X, Y′=YY' = Y, with no dependence on ZZ.
  • Plugging in: X′=10X' = 10 and Y′=20Y' = 20. The depth Z=5Z = 5 plays no part and is discarded.
  • The output is a 2D point with exactly two numbers, [10, 20], in the same order and units as the input's first two coordinates.
  • Notice that (10,20,5)(10, 20, 5) and (10,20,100)(10, 20, 100) land on the same image point: depth is lost, so sizes don't shrink with distance. Compare perspective projection, where X′=fX/ZX' = fX/Z would make the farther point appear closer to the centre.

Constraints

  • Return [x, y] from the 3D point

Learn this in

More from CV: Image Formation

solution.py

Test results

Sign in to run your code against the test cases.