File Exchange

image thumbnail

xformtst

version 1.0.0.0 (12.5 KB) by Robert Renka
MATLAB utility for conversion from 3D axes (world) coordinates to screen or mouse coordinates.

1 Download

Updated 13 Jun 2018

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: http://www.cse.unt.edu/~renka/tspack/tspack.html.
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 Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux

MATLAB Online Live Editor Challenge

View the winning live scripts from faculty and students who participated in the recent challenge.

Learn more

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

» Watch video