如何旋转用轴作为一个铰链在三维空间中的矩形? [英] How to rotate a rectangle in 3d space using an axis as a HINGE?

查看:176
本文介绍了如何旋转用轴作为一个铰链在三维空间中的矩形?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

这篇关于如何旋转用轴作为一个铰链在三维空间中的矩形?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆