简体   繁体   English

在 3d 中使用倾斜坐标系旋转一个点

[英]Rotating an point with an tilted Coordinate System in 3d

I try to convert an given point in the normal coordinate system, to an tilted coordinate system.我尝试将法线坐标系中的给定点转换为倾斜坐标系。

What i have given: The point (2;0;0) in the "normal coordinate system"我给出的:“法线坐标系”中的点 (2;0;0)

With the old coordinate system:使用旧坐标系:

X X

X3;Y3;Z3 the vectors for the local z axis you get from the vector product of x vector (1) and y vector (2) X3;Y3;Z3 从 x 向量 (1) 和 y 向量 (2) 的向量积得到的局部 z 轴向量

The tilted coordinate system is at 45 degree tilted coord sys and X3: 0 Y3: 1 Z3: 0 The coord sys is tilted 45°, but i don´t have that info.倾斜坐标系在45 度倾斜坐标系和 X3:0 Y3:1 Z3:0 坐标系倾斜 45°,但我没有那个信息。 a picture about the tilted coord sys关于倾斜坐标系统的图片

I want to know where the point (2;0;0) getting moved to.我想知道点 (2;0;0) 移动到哪里。

There are many sources about 2D tilting, but not about 3D.有很多关于 2D 倾斜的资料,但没有关于 3D 的资料。 I am trying to calculate it "by hand" but also try to write an c# programm about it.我正在尝试“手动”计算它,但也尝试编写一个关于它的 c# 程序。 So if you just can answer me with an c# function you can do it.所以如果你能用 c# function 回答我,你就可以做到。

I tried to work with euler angles and looked at quaternions, but i couldn´t get the right calculations with the calculator.我尝试使用欧拉角并查看四元数,但我无法使用计算器进行正确的计算。 And the fact that i don´t have the angle, just the vectors of the new coordinate system is hard for me to imagine how to deal with it.事实上,我没有角度,只有新坐标系的向量,我很难想象如何处理它。

I think this formula can be useful for me, but i dont have the rotation angle to fill.我认为这个公式对我有用,但我没有要填充的旋转角度。 https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle https://en.wikipedia.org/wiki/Rotation_matrix#Rotation_matrix_from_axis_and_angle

I hope you understood my question, otherwise feel free to ask and i try to explain it more/better.我希望您理解我的问题,否则请随时提问,我会尝试更多/更好地解释它。

As Thomas stated out, i had to use the change of basis matrix.正如托马斯所说,我不得不使用基矩阵的变化。 The gauss elimination algo helped me there.高斯消除算法在那里帮助了我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM