圆到切线映射

发布于 2024-10-01 18:46:11 字数 747 浏览 8 评论 0 原文

假设给定一个圆,线 AB 包含其圆心 O,因此 A 和 B 在圆上(OA=OB=半径)。在 A 点上作切线 t,并且 我应该计算圆的某些点(a,b,c,d ...)到切线上的点(at,bt,ct,dt,...)的映射,使得距离Aa(距离沿圆的距离)与距离 Aat(沿切线的距离)相同(对于距离 Ab、Ac、Ad 也相同)。但是,这里应该考虑一定的约束:从 A 到 B 的圆的一侧(在(a,b,c,d)中)的那些点应该放置在切线(较近),而从 A 到 B 的圆圈另一侧的则应放在另一侧。基本上,圆应该在 B 处分割,然后映射到切线。我希望这个解释足够充分。

应该注意的是,我有关于 A、B、O、a、b、c、d 坐标的信息。我应该计算(at,bt,ct,dt)。 为了解决这个问题,我有两种方法,但我不确定如何确保它们始终正常工作。

1)我计算A点的切线方程。然后对于每个点(a,b,c,d)我计算距A(沿圆)的距离,并使用这些距离计算(at,bt,ct , dt...) 沿切线。我这里不知道如何计算距离 从 A 到 (a, b, c, d)。问题是“适当的一侧”确定,这意味着我应该如何确定该点是否应该映射在切线的一侧或另一侧。有什么方法可以确定这一点。

2)我计算A点的切线方程。然后对于每个点(a,b,c,d)我计算距A(沿圆)的距离,并使用这些距离计算(at,bt,ct , dt...) 沿切线。为了确定给定点的“真边”,我可能会使用该点到切线的投影。但是,即使这样,我怎么知道“哪一边是哪一边”呢?也许有更简单的方法可以做到这一点。

欢迎任何有关如何执行此操作的建议。如果我说得不够精确,我会详细说明。

Assume you're given a circle with the line AB containing its center O, such that A and B are on the circle (OA=OB=radius). A tangent t is drawn on the point A, and
I should calculate the mapping of certain points (a,b,c,d...) of the circle to the points on the tangent (at, bt, ct, dt, ...) such that the distance Aa (the distance along the circle) is the same as the distance Aat (the distance along the tangent) (and the same for the distances Ab, Ac, Ad). But, here, certain constraint should be considered: those points of the circle (among (a, b, c, d)) that are from one side of the circle from A to B should be placed on one side of the tangent (the nearer), and those from the other side of the circle form A to B should be placed on the other side. Basically, the circle should be split at B, and then mapped to the tangent. I hope this explanation is sufficient enough.

It should be noted that I have information about coordinates of A, B, O, a, b, c, d. I supposed to calculate (at, bt, ct, dt).
For solving this problem, I have two approaches, but I'm not sure how I could make sure they always work correctly.

1) I calculate the equation of the tangent at point A. Then for each point (a, b, c, d) I calculate the distance from A (along the circle), and use these distances for calculating (at, bt, ct, dt...) along the tangent. What I dont know here is how to calculate the distances
from A to (a, b, c, d). The problem is the 'proper side' determination, meaning how should I determine whether the point should be mapped on one side of the tangent or the other. What would be the way to determine this.

2) I calculate the equation of the tangent at point A. Then for each point (a, b, c, d) I calculate the distance from A (along the circle), and use these distances for calculating (at, bt, ct, dt...) along the tangent. To determine the 'proper side' of a given point, I might use the projection of that point to the tangent. But, even with this, how I know 'which side is which'? Perhaps there are much simpler ways to do this.

Any suggestion on how to do this is welcome. In case I was not precise enough, I'll elaborate.

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

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

发布评论

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

评论(2

后来的我们 2024-10-08 18:46:11

更好的建议是计算一个坐标变换,将圆映射到以原点为中心的单位圆,以便 A 的坐标为 (1, 0)(B 的坐标分别为 (-1, 0))。
变换应该是旋转膨胀。
现在,Aa 上的距离就是以弧度测量的角度 aOA。所以你可以很容易地计算出,它是 (1, atan2(y, x)) 其中 ( x, y) 是 a 的坐标。

现在,您唯一需要的就是返回到原始坐标系,应用逆变换。

A better suggestion would be to calculate a coordinate transformation that would map the circle into a unit circle with the centre at the origin, so that A will have coordinates (1, 0) (and B respectively (-1, 0)).
The transformation should be dilation with rotation.
Now, the distance on Aa is just the angle aOA measured in radians. So you can easily calculate at, it is (1, atan2(y, x)) where (x, y) are the coordinates of a.

Now, the only thing you need is to return to the original coordinate system, applying the inverse transformation.

绳情 2024-10-08 18:46:11

要确定您位于圆的哪一侧,您基本上需要确定您位于线 AB 的哪一侧。有关答案,请参阅 确定线的哪一侧一个要点是

To determine which "side" of the circle you're on, you basically need to determine which side of the line AB you're on. For the answer to that, see e.g. Determine which side of a line a point lies.

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