开发者

What kind of calculations will you do in order to mimic the 3D rotation of the rectangle in 2D space?

You are given a rectangle with width, x a开发者_如何学JAVAnd height y. You can see that first of all the rectangle rotates from the middle along the y-axis. Once the rotation is complete, it rotates along the x-axis but from the bottom.

Consider yourself to be in a 2D drawing space, as a result, you cannot use 3D transformation matrices to perform these tasks.


Generally you would use homographic coordinate vectors to describe your rectangle by appending a 1 for z to your 2D coordinates. This lets you use 3d transformation matrixes as appropriate.

Your constraint seems pointless- if the problem is data storage, simulate the appended 1 by calculating the matrix transformation with a function instead of a simple matrix multiplication.

http://en.wikipedia.org/wiki/Homography

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜