Rotate a polygon around any point

Is it possible to modify the functions in lines 20 & 21 of the graph to rotate a polygon around any (specified) point)?

Right now the functions will make a polygon rotate around the origin… but I was hoping to rotate the purple triangle around (-5,-5) after sliders a & b are both pushed to 5. I have been tinkering with some different rotation functions I have seen I this site, but have not been successful.

You can borrow from here if you like. Transformation Modules w/ anim2

Or this. I forget which one is the latest

1 Like