Orthographic Projection
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 to a 2D coordinate system .
To achieve this, follow these steps:
- Identify the 3D point to be projected.
- Apply the projection formula to obtain the 2D point.
This technique is widely used in technical drawing and architecture.
Example
orthographic([10, 20, 5])
[10, 20]
- The input
point_3dis one 3D point : two coordinates across the image plane and , the depth along the viewing direction. - Orthographic projection sends every point along parallel rays straight onto the image plane, so the formula is , , with no dependence on .
- Plugging in: and . The depth 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 and land on the same image point: depth is lost, so sizes don't shrink with distance. Compare perspective projection, where would make the farther point appear closer to the centre.
Constraints
- Return [x, y] from the 3D point