How to rotate a rectangle in 3d space using an axis as a HINGE?
问题 I'm looking forward mathematical or algorithmic calculation of rotating a rectangle with a fixed axis as a HINGE. As you can see in the below picture. I have positions (x,y) of 4 points of rectangle vertices, and the origin is center of the rectangle, so the desired algorithm will project my original shape's vertices into the desire shape vertices. (Please see image below) I know it's easy to do it with 3d libraries but i need to do it with 2d graphics in a high-level programming language