- / software craftsman
- / devopper
- / hardware hacker
- / IoT
Rotate a 2D Coordinate Around a Point in Python
I was doing some research on how to rotate coordinates around a point or origin for some silly animations I was doing. After some time kicking stuff around, I came up with a few possibilities.
And of course, I atleast did a quick timer check on the functions to look for one that is obviously faster. I was surprised just how slow the numpy operation was… but I guess in the end it isn’t surprising since it’s executing more Python code in general.