     clc
     close all
     clear all
     
    % Construct an affine2d object that defines a rotation of 10 degrees
    % counter-clockwise.
    theta = 10;
    tform = affine2d([cosd(theta) -sind(theta) 0; sind(theta) cosd(theta) 0; 0 0 1]);
 
    % Apply forward geometric transformation to an input (U,V) point (5,10)
    [X,Y] = transformPointsForward(tform,5,10)
 
    % Apply inverse geometric transformation to output (X,Y) point from
    % previous step. We recover the point we started with from
    % the inverse transformation.
    [U,V] = transformPointsInverse(tform,X,Y)