计算几何
欧几里得距离
- [math]\displaystyle{ (x_1,y_1) }[/math] 与 [math]\displaystyle{ (x_2,y_2) }[/math] 的距离为 [math]\displaystyle{ \sqrt{(x_1-x_2)^2+(y_1-y_2)^2} }[/math]
- [math]\displaystyle{ (x_1,y_1,z_1) }[/math] 与 [math]\displaystyle{ (x_2,y_2,z_2) }[/math] 的距离为 [math]\displaystyle{ \sqrt{(x_1-x_2)^2+(y_1-y_2)^2+(z_1-z_2)^2} }[/math]
海伦公式
三角形三边长分别为 [math]\displaystyle{ a,b,c }[/math],那么定义半周长 [math]\displaystyle{ p=\frac{a+b+c}{2} }[/math]
则三角形面积为 [math]\displaystyle{ \sqrt{p(p-a)(p-b)(p-c)} }[/math]