Translations

RTSX Help: Translations

transl

Translation in 3-D

Syntax

  • T= transl(p)

Input Arguments

  • p —   a 3 x 1 (1 x 3 is acceptable) vector representing new location

Output Arguments

  • T — 4×4 homogeneous transformation matrix

Description

transl( ) returns a homogeneous transformation matrix representing a translation to a new location specified by vector p. The rotation part is just a 3×3 identity matrix.

Examples

-->T=transl([-1 1 2])
 T  =
    1.    0.    0.  - 1.  
    0.    1.    0.    1.  
    0.    0.    1.    2.  
    0.    0.    0.    1.