Main Content

so2

SO(2) rotational transformation

    Description

    The so2 object represents an SO(2) rotational transformation in 2-D.

    This object acts like a numerical matrix enabling you to compose poses using multiplication and division.cos(α2)+sin(α2)(xi+yj+zk)

    Creation

    Description

    transformation = so2 creates an SO(2) rotational transformation representing an identity rotation with no translation.

    example

    transformation = so2(rotation) creates an SO(2) rotational transformation transformation representing a pure rotation defined by the orthonormal rotation rotation.

    Input Arguments

    expand all

    Orthonormal rotation, specified as a 2-by-2 matrix, a 3-by-3-byM array, a scalar so2 object, or an M-element array of so2 objects. M is the total number of rotations.

    The resulting number of transformation objects is equal to the larger argument between translation and rotation

    Example: eye(3)

    Data Types: single | double

    Object Functions

    distCalculate distance between transformations
    interpInterpolate between transformations
    mtimes, *Transformation multiplication
    mrdivide, ./Transformation right division
    normalizeNormalize transformation matrix
    rdivide, ./Element-wise transformation right division
    rotmExtract rotation matrix
    times, .*Transformation element-wise multiplication
    transformApply rigid body transformation to points

    Examples

    collapse all

    Define a 3-by-3 rotation matrix and a three-element translation vector.

    rot = eye(3);
    tr = [3 5 2];

    Create the SO(2) and SO(3) rotations using the rotation matrix rot.

    R2d = SO2(rot(1:2,1:2))
    R2d = SO2
         1     0
         0     1
    
    
    R3d = SO3(rot)
    R3d = SO3
         1     0     0
         0     1     0
         0     0     1
    
    

    Create the SE(2) and SE(3) rotations using the rotation matrix rot, and the translation vector tr.

    T2d = SE2(rot(1:2,1:2),tr(1:2))
    T2d = SE2
         1     0     3
         0     1     5
         0     0     1
    
    
    T3d = SE3(rot,tr)
    T3d = SE3
         1     0     0     3
         0     1     0     5
         0     0     1     2
         0     0     0     1
    
    

    Extended Capabilities

    C/C++ Code Generation
    Generate C and C++ code using MATLAB® Coder™.

    Version History

    Introduced in R2022b

    See Also

    Functions

    Objects