通常,对于三维几何,我们依赖于三维笛卡尔平面。向量也可以用来描述直线和它们与轴所成的角度。我们应该如何描述一条穿过原点并与不同轴成角度的线?我们使用线的余弦比定义它们。在处理三维几何(在许多应用程序,例如游戏设计中使用)时,需要描述3D空间中直线的重要性。
直线的方向余弦和方向比率
假设一条直线OA穿过原点,并分别与x,y和z轴形成角度α,β和γ,称为方向角。这些角度cos(α),cos(β)和cos(γ)的余弦称为有向线OA的有向余弦。下图显示了穿过原点的OA线及其与坐标轴的所有角度。
Note: The line can extend in both the directions, and there can be two sets of angles that it makes with coordinate axes. The line makes α, β, and γ and their supplements , and with the coordinate axes. Now the signs of the directional cosines will be reversed. So, to have unique directional cosines, we choose to make it a directed line.
假设直线的方向余弦为l,m和n。
方向比
与线的方向余弦成比例的数字称为线的方向比率。我们假设l,m和n为线的方向余弦。假设a,b和c是线的方向比。然后,
l = k × a, m = k × b and n = k × c
Where k is any constant.
现在我们知道了
l 2 + m 2 + n 2 = 1
⇒k图2(a 2 + B 2 + C 2)= 1
⇒k =
所以,现在一条线的方向余弦是
l = ,m = 和n =
方向余弦之间的关系
假设我们有一条线BC,它的方向余弦为l,m和n。通过与该线平行的原点绘制一条线,然后让A(x,y,z)在该线上成为一点。我们从A到x轴绘制一个垂直线。
令OA = r。
So, x = lr and similarly, y = mr and z = nr.
x2 + y2 + z2 = r2(l2 + m2 + n2)
We know that distance of (x, y,z) from origin is r.
x2 + y2 + z2 = r2
Thus,
l2 + m2 + n2 = 1
穿过两个点的线的方向余弦
想象一下,我们有两个点A(x 1 ,y 1 ,z 1 )和B(x 2 ,y 2 ,z 2 ),一条线穿过它们。我们的目标是确定穿过这些点的线的方向余弦。令l,m和n为线AB的方向余弦,并假设它们与x,y和z轴成的角度分别为α,β和γ。
在上图中,从线AB到XY平面绘制了垂直线,并且它们在CD处到达XY平面。应该从A到与BD和N相交的BD绘制另一个垂直线。因此,现在在三角形ANB中,∠ABN是γ。
用同样的方式
和
因此,连接AB的线的方向余弦为,
在这里,AB =
让我们看看基于这些概念的一些示例问题,
样本问题
问题1:找到x,y和z轴的方向余弦。
解决方案:
The x-axis makes an angle of 90°, 90° and 0° with the coordinate axes. We know that the direction cosines are basically cosines of the angle the line makes with different axes.
l = cos(0°) m = cos(90°) and n = cos(90°)
Thus,
l = 1, m = n = 0
Similarly, for y-axis,
l = 0, m = 1 and n = 0
and for z-axis
l = 0, m = 0 and n = 1.
问题2:找到分别与x,y和z轴成30°,60°和90°的直线的方向余弦。
解决方案:
Directional cosines for the given line are,
l = cos(30°) ; m = cos(60°) and n = cos(90°)
⇒ l = ; m = and n = 0
问题3:假设我们有一条线的比率为4、2,-4。计算这条线的方向余弦。
解决方案:
Given direction ratios: 4, 2, and -4.
The formula for directional cosines from direction ratios is given by,
l =, m = and n =
Here, a = 4, b = 2 and c =-4.
l = , m = and n =
l = \frac{4}{\sqrt{36}}
m =
n =
问题4:假设我们有一条线的方向比率为0、1、0。计算该线的方向余弦值。
解决方案:
Given direction ratios: 0, 1, and 0.
The formula for directional cosines from direction ratios is given by,
l =, m = and n =
Here, a = 0, b = 1 and c =0.
l = , m = and n =
l = 0
m = 1
n = 0
问题5:找到通过(1、1、1)和(3、3、3)的线的方向余弦。
解决方案:
Let’s say these points are A(1,1,1) and B(3,3,3). We know for any two points on the line AB, the direction cosines are given by,
Here, AB =
Here, (x1,y1,z1) = (1,1,1) and (x2,y2,z2) = (3,3,3)
AB =
=
=
=
= 2√3
⇒
⇒