Unlike images, polygons cannot be directly rotated in Revolution. They have no "angle" property.
Polygons are defined by a list of the points of their vertices. We discuss here how to transform a polygon's points so that it is effectively rotated on the stack/card canvas.
Download the Revolution RotatePolygons stack to see examples and to get all scripts. Read the commented script and a recipe for making a rotatable polygon. And look at this horrible metronome example of use.
The basic idea is to design the polygon by its points relative to an origin and keep this design. One can think of these points as lying in "designspace", unlike the actual points visually representing the rotated and translated polygon on the card canvas.
The design is with real numbers (i.e. not necessarily integer values). It can be by a list of cartesian x,y pairs or a list of polar r,θ pairs. It is kept in custom properties and it never changes.
Here is a simple rectangle: 
This rectangle would rotate around its centre. Its design points would be


The following rectangle would look the same but would rotate around its lowerleft corner, since that is where the design space origin is: 
Its design points would be


And this design is easier to define by its polar coordinates: 
Its design points would be

The actual set of points used to display the polygon is derived from the design by routines (handlers) defined to compute the display points given a desired actual location of the design's origin and a desired angle of rotation.
A polygon must therefore be given these custom properties:
pPoints: the Cartesian coordinates of the points whereby the origin is the point around which the graphic will turn (its "centre"). Y is up (see conventions).
pRThetas: the list of radii and angles of the points in polar coordinates.
pAngle: the angle through which the graphic is rotated from its natural orientation.
pLoc: the actual location of the graphic's design origin, in display coordinates.
To be able to design, move and rotate polygons the polygons themselves need no script: all code can be put higher up in the message path.
The user may define either the pPoints or the pRThetas, the undefined set is computed from the defined one by the functions CartesianToPolar and PolarToCartesian. The polar coordinates pRThetas are used in rotation and the Cartesian coordinates pPoints are used only to define shape. For most polygons it is easier to define the shape using Cartesian coordinates, but some (e.g. a spiral) may be easier defined in polar coordinates.
There is no need for the polygon to have a script if the message path contains setprop handlers for pLoc and pAngle.
In the scripts the word polygon is used interchangeably with graphic (of style polygon).
Note that in Revolution "the loc of graphic … " does not return a point that is fixed to the polygon: it returns the centre of the circumscribed rectangle! This loc is neither the centre of the polygon nor its centre of gravity.
A polygon (red) and its circumscribed rectangle.
The little circle is the centre of the rectangle. 

The same polygon rotated. The dim, rotated rectangle is the circumscribed rectangle from the previous figure.
The new circumscribed rectangle has different dimensions and also has a centre that lies in a different position with respect to the polygon. The Revolution loc of the polygon is the centre of the circumscribed rectangle and hence it is a point that is not fixed to the polygon. 
But in moving and rotating a polygon we do need a point that is fixed to it. That means we also need a way to define the loc of a polygon independently of Revolution and that is why we introduce the custom property pLoc.
For Cartesian coordinates the y axis points upwards, for polar coordinates the angle 0 is to the right and angles grow counterclockwise (like in maths). Angles are in radians.
If an edge of the polygon should not be drawn, leave a blank line in pPoints and pRThetas but make sure there is always a point after a blank line, i.e. the list must end in a nonblank line.
The last transformation after rotation is to put the points at their positions relative to the desired location pLoc on the card canvas. This requires rounding as well as converting to displayY which points down.
Copyright R. Cailliau (robert at robertcailliau dot eu)
next planned revision: 200911