Function to rotate a point/polygon

Wanted something to animate rotation of some figures, so I created this set of functions to rotate a point P d degrees about a center C. Enjoy!

Rotating a Point around a Center (New link w/ bugs fixed)

Edit: You can also rotate polygons by inserting a list of points and using the polygon function



There was a problem rotating a point about itself. (The radius was 0, and led to a division by 0.) So, polygons ended up leaving one vertex out. I fixed that. and changed the link above.

Only a_p was changed if you have used this.