.NET2 中的偏移旋转计算

发布于 2024-11-07 00:36:49 字数 247 浏览 2 评论 0原文

我想知道是否有人可以帮助我解决我遇到的这个问题。我正在使用.NET 2环境。

我在 2D 平面上的不同位置有 2 个点作为两个 PointF

我在第一个点有一个已知的旋转(以度为单位),我需要知道如何计算第二个“偏移”点的旋转。

换句话说,我想将第二个点旋转未知的量,但第一个点的效果需要是已知的旋转值。

我已经尝试了各种方法来解决这个难题,但我的数学和三角技能相当生疏。有人可以帮我吗?

非常感谢。

I wondered if someone can help me out with this problem I have. I am using .NET 2 environment.

I have 2 points at different locations on a 2D plane as two PointF

I have a known rotation (in Degrees) at the first point, I need to know how to calculate what that rotation will be at the second "offset" point.

In other words, I want to rotate the second point by an unknown amount but the effect at the first point needs to be the known rotation value.

I have tried all sorts to solve this puzzle, my math and trig skills are rather rusty. Can anyone help me out?

Many thanks.

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

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

发布评论

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

评论(1

岁月静好 2024-11-14 00:36:49

我正在尝试将围绕一个点计算的旋转值转换为围绕已知 X 和 Y 偏移量的单独点的旋转。

我将其解释为意味着您有第三个点,我们称之为点 R,它围绕 A 点旋转 x 度。您想要计算出 R 围绕 B 点旋转了多少度。

以这种方式构建,这是不可能的。围绕 A 点(红色)的旋转圆与围绕 B 点(蓝色)的旋转圆不同。两个黑色箭头说明,当您说“绕点 A 旋转”和“绕点 B 旋转”时,它们会将您带到不同的方向。

I am trying to translate a rotation value calculated around one point to a rotation around a separate point on a known X and Y offset.

I interpret that as meaning you have a third point, let's call it point R, that rotates x degrees around point A. You want to figure out how many degrees around point B that R has rotated.

Framed that way, it's not possible. The rotation circle around point A (red) is different than the rotation circle around point B (blue). The two black arrows illustrate that when you say "rotate around point A" and "rotate around point B" they take you in different directions.

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