File Exchange

image thumbnail


version 1.0 (12.5 KB) by

MATLAB utility for conversion from 3D axes (world) coordinates to screen or mouse coordinates.

1 Download


View License

The code consists of a coordinate space conversion utility and a simple test program. The utility converts an array of points in 3D axes coordinates to an array of points in window or screen coordinates along with depth values, where depth is distance from the camera position. In the case of orthographic projection, the transformation is affine and can be represented by a matrix (using homogeneous coordinates). The matrix is an optional output whose inverse maps a pair of screen coordinates, along with a depth, to a point in axes coordinates. This capability can be used to design a space curve by dragging control points in a projection plane:
Extensive comments in the code describe part of the MATLAB graphics processing pipeline in more detail than is available anywhere else.

Comments and Ratings (0)

MATLAB Release
MATLAB 7 (R14)

MATLAB Online Live Editor Challenge

Win cash prizes and have your live script featured on our website

Learn more

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video