matlab中的叉积函数

发布于 2024-08-16 07:03:53 字数 240 浏览 6 评论 0原文

谁能告诉我如何在matlab中使用叉积函数?

举个例子,我有下面的图像,立方体上有 6 个固定点,如何找到立方体的另外两个点? 替代文本 http://img24.imageshack.us/img24/6479/drawcube01.png< /a>

Can someone explain to me how to use the cross product function in matlab?

An example, I have the following image with 6 fixed points on the cube, how to find the two other points of the cube?
alt text http://img24.imageshack.us/img24/6479/drawcube01.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

江南月 2024-08-23 07:03:53

不使用 Matlab 就知道叉积函数的含义是件好事。

如果有两个向量 A = ax i + ay j + az kB = bx i + by j + bz k,叉积定义为向量 C,如下所示:

C< /strong> = (aybz - byaz) i - (axbz - bxaz) j + (axby - bxay) k

您可以将 C 想象为垂直于 AB当您将A旋转到B时,沿右旋螺丝方向旋转。

另一种写法是:

C = ab sin(θ)n,其中 a 是 A 的大小,b 是B,n为单位法向量。

在你的例子中,A和B的大小是魔方的边长。您想要的点是向量C的末端。

其他细节:

在您的情况下,矢量A从底部点延伸到右侧的角点;向量B从左侧角的公共底点开始。将 A 交叉到 B 中,以获得垂直于底平面向上朝向未知角点的向量。使其成为单位向量。将单位向量乘以立方体的边长。将公共底点添加到该向量的分量中,您就得到了未知角点的绝对坐标。重复其他三点即可完成。

It's good to know what the cross-product function means without using Matlab.

If you have two vectors A = ax i + ay j + az k and B = bx i + by j + bz k, the cross product is defined as the vector C as follows:

C = (aybz - byaz) i - (axbz - bxaz) j + (axby - bxay) k

You can visualize C as perpendicular to both A and B in the direction of a right-hand screw when you rotate A into B.

Another way to write it is:

C = ab sin(θ)n, where a is the magnitude of A, b is the magnitude of B, and n is the unit normal vector.

In your case, the magnitudes of A and B are the lengths of the sides of the Rubik's Cube. The point that you want is the end of the vector C.

ADDITIONAL DETAIL:

In your case, the vector A runs from the bottom point to the corner on the right; the vector B starts at that common bottom point to the corner on the left. Cross A into B to get the vector that runs perpendicular to the bottom plane up towards the unknown corner point. Make it a unit vector. Multiply the unit vector by the length of the side of the cube. Add the common bottom point to the components of this vector and you have the absolute coordinates of the unknown corner. Repeat for the other three points and you're done.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文