给定点 1 和点 2 之间的直线,到点 3 的角度变化是多少?

Use*_*974 5 microsoft-excel microsoft-excel-2016

我在 Excel 表格中有折线顶点。

在此输入图像描述

  ASSET_ID VERTEX_NUM          X          Y ANGLE_CHANGE
---------- ---------- ---------- ---------- ------------
        10          1     118.56        3.8         null
        10          2     118.62       1.03         null
        10          3     121.93       1.03            ?

        20          1     123.59       1.19         null
        20          2     124.21       1.02         null
        20          3     124.85        .96            ?
        20          4     125.49       1.01            ?
        20          5     126.11       1.16            ?
        20          6      126.7       1.41            ?
        20          7     127.24       1.75            ?
        20          8     127.26       2.16            ? --I chose to put this point in the screenshot just because the change in angle is large. So it was easy to illustrate what I'm looking for (lots of room for markup).
        20          9     127.36       2.56            ?
        20         10     127.52       2.94            ?
        20         11     127.75       3.29            ?
        20         12     128.03       3.59            ?

        30          1     129.84       1.26         null
        30          2     133.26       2.88         null
Run Code Online (Sandbox Code Playgroud)

我想确定点与点之间的“角度变化”是什么。

换句话说,给定点 1 和点 2 之间的直线,如何计算到点 3 的角度变化?

har*_*ymc 8

假设 Excel 中的列是 A、B 等,X、Y、ANGLE_CHANGE 列分别是 C、D、E,第一个数据行是数字 2。

要找到角度,您可以使用以下 E3 公式:

=ATAN((Y3-Y2)/(X3-X2))*(180/PI())
Run Code Online (Sandbox Code Playgroud)

选择单元格 E3 并将小手柄向下拖动到下面的列上。

这使用了 ATAN 函数 ,该函数返回以弧度为单位的结果,需要乘以180/Pi得到度数。


Joh*_*SUN 7

您将通过一个简单的公式获得所需的 87 度(几乎是直角,几乎垂直)

=ATAN2(<current X>-<previous X>;<current Y>-<previous Y>)*180/PI()

喜欢作为

=ATAN2(C14-C13;D14-D13)*180/PI()

  • 如果您知道 X 和 Y 增量,ATAN2 一般来说会比 ATAN 更好,因为它也会为您提供正确的方向。所以为此+1。 (4认同)
  • @User1974 [*不要浪费时间在 Excel 中找到此选项!此选项不在 Excel 中,而是在 Windows 的本地设置中*](https://www.excel-exercise.com/comma-or-semicolon-in-excel-formula/) (3认同)