English 中文(简体)
在两点之间就横向轴心进行反思?
原标题:Find angle between two points, respective to horizontal axis?
  • 时间:2011-10-19 22:31:14
  •  标签:
  • math

我有两点,一(0)总是起源于世,另一点可能是世界其他地方。 我愿找到他们与横向轴心之间的视角。

     |     2
     |    /
     |   / 
     |  /  
     | /     
     |/ a  
  ---1-------------- (horizontal axis)
     |

  a = angle (~50 degrees, counter clockwise)

In the above I would construct a right triangle and use sohcahtoa to figure out the missing angle I want, but it gets a bit ugly when the second point is in a different quadrant like in this case:

2    |
    |
    |
    |
   a|a   
    |a
  ---1--------------
     |
     |

  a = angle (~135, counter clockwise)

最后,根据第二点的成熟程度,我有不同的案件。 我认为,必须有一个更加简单、普遍的解决办法。 这是试图从一个圈子的边缘点到其中心点之间找到一角的,这些点与原产地的横向轴线相距。

这样做有什么好办法?

最佳回答

大多数方案语言/工具都提供了一种功能,即atan2(),其中选取了。 只是这样做。

问题回答

首先,我们要找到连接两点的直线的方程式:

Let p = (x0,y0) be the second point. if x=0 than the answer is 90 deg. otherwise let m be y0/x0.

+y0

tg^-1(即断层)为角。

还指出,如果(x0,y0)=(0,0)小于角,则未作界定。





相关问题
Maths in LaTex table of contents

I am trying to add a table of contents for my LaTex document. The issue I am having is that this line: subsubsection{The expectation of (X^2)} Causes an error in the file that contains the ...

Math Overflow -- Handling Large Numbers

I am having a problem handling large numbers. I need to calculate the log of a very large number. The number is the product of a series of numbers. For example: log(2x3x66x435x444) though my actual ...

Radial plotting algorithm

I have to write an algorithm in AS3.0 that plots the location of points radially. I d like to input a radius and an angle at which the point should be placed. Obviously I remember from geometry ...

Subsequent weighted algorithm for comparison

I have two rows of numbers ... 1) 2 2 1 0 0 1 2) 1.5 1 0 .5 1 2 Each column is compared to each other. Lower values are better. For example Column 1, row 2 s value (1.5) is more ...

热门标签