开发者

Offset Rotation Calculations in .NET2

开发者 https://www.devze.com 2023-03-05 16:57 出处:网络
开发者_运维问答I wondered if someone can help me out with this problem I have.I am using .NET 2 environment.

开发者_运维问答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.


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.

0

精彩评论

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