#790 – How a Rotation Transform Works

A 2D rotation transform in WPF is accomplished by using a transformation matrix.  The transformation matrix is multiplied by another matrix representing a single 2D point to be transformed.  The resulting matrix describes the transformed point.  When rotating a user interface element, this transformation is done individually on each point to generate the set of points representing the transformed element.

The transformation operation for rotation looks like:

790-001

Where ϴ represents the Angle property of the ScaleTransform, indicating the number of degrees to rotate the point in a clockwise direction.

This leads to the equations:

790-002

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

2 Responses to #790 – How a Rotation Transform Works

  1. Pingback: Dew Drop – April 3, 2013 (#1,519) | Alvin Ashcraft's Morning Dew

  2. Pingback: #796 – WPF Transforms Use Homogeneous Coordinates | 2,000 Things You Should Know About WPF

Leave a comment