Storey displacements are calculated from
Where are the nodes in the storey and is the number of nodes in the storey. The rotations are the calculated relative to the centre of mass, .
The position of node i relative to the centre of mass is
the distance from the centre of mass is
and the component of displacement giving rise to rotation is
The rotation of the storey is then defined as