如何旋转用轴作为一个铰链在三维空间中的矩形?铰链、矩形、作为一个、空间

2023-09-08 10:45:11 作者:浪客

我在寻找旋转矩形固定轴为铰链向前数学或算法计算。正如你可以在下面的图片中看到。

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.

我有4个点的矩形顶点的位置(X,Y),并且原点是矩形的中心,所以所希望的算法将投射我的原来的形状的顶点成所要求的形状的顶点。 (请参见下图)

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)

我知道它很容易与3D库,做到这一点,但我需要与2D图形在一个高层次的编程语言如.NET或Java或东西,没有任何3D或互补的库去做。

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 like .Net or JAVA or something without any 3d or complementary library.

请帮我的任何想法或参考,或比所有源$ C ​​$ C或算法更好。

在此先感谢您质量的时间。

Thanks in advance for you quality time.

推荐答案

以上总结我的评论:

http://en.wikipedia.org/wiki/Rotation_matrix http://en.wikipedia.org/wiki/3D_projection http://en.wikipedia.org/wiki/Viewing_frustum http://en.wikipedia.org/wiki/Rotation_matrix http://en.wikipedia.org/wiki/3D_projection http://en.wikipedia.org/wiki/Viewing_frustum