# 重心坐标

v1, ..., vn向量空间V中一个单形的顶点，如果V中某点p满足，

${\displaystyle (\lambda _{1}+\cdots +\lambda _{n})\,p=\lambda _{1}\,v_{1}+\cdots +\lambda _{n}\,v_{n},}$

## 三角形的重心坐标

${\displaystyle BD:DC=\lambda _{3}:\lambda _{2},}$ 从而${\displaystyle {\textbf {d}}={\frac {\lambda _{2}{\textbf {b}}+\lambda _{3}{\textbf {c}}}{\lambda _{2}+\lambda _{3}}},}$
${\displaystyle AP:PD=(\lambda _{2}+\lambda _{3}):\lambda _{1}}$ ，故
${\displaystyle {\textbf {p}}={\frac {(\lambda _{2}+\lambda _{3}){\textbf {d}}+\lambda _{1}{\textbf {a}}}{\lambda _{1}+\lambda _{2}+\lambda _{3}}}\,,}$
${\displaystyle {\textbf {p}}=\lambda _{1}{\textbf {a}}+\lambda _{2}{\textbf {b}}+\lambda _{3}{\textbf {c}}\,.}$

### 坐标变换

${\displaystyle S(ABC)={\frac {1}{2}}{\begin{vmatrix}1&x_{a}&y_{a}\\1&x_{b}&y_{b}\\1&x_{c}&y_{c}\\\end{vmatrix}}}$

${\displaystyle \lambda _{1}=S(PBC)/S(ABC)={\begin{vmatrix}1&x_{p}&y_{p}\\1&x_{b}&y_{b}\\1&x_{c}&y_{c}\\\end{vmatrix}}/{\begin{vmatrix}1&x_{a}&y_{a}\\1&x_{b}&y_{b}\\1&x_{c}&y_{c}\\\end{vmatrix}}}$

${\displaystyle {\textbf {p}}=\lambda _{1}{\textbf {a}}+\lambda _{2}{\textbf {b}}+\lambda _{3}{\textbf {c}},}$
${\displaystyle x_{p}=\lambda _{1}x_{a}+\lambda _{2}x_{b}+\lambda _{3}x_{c},}$
${\displaystyle y_{p}=\lambda _{1}y_{a}+\lambda _{2}y_{b}+\lambda _{3}y_{c}.}$

### 应用

${\displaystyle {\textbf {p}}=\lambda _{1}{\textbf {v}}_{1}+\lambda _{2}{\textbf {v}}_{2}+\lambda _{3}{\textbf {v}}_{3},}$

${\displaystyle \int _{T}f({\textbf {p}})\ ds=2S\int _{0}^{1}\int _{0}^{1-\lambda _{2}}f(\lambda _{1}{\textbf {v}}_{1}+\lambda _{2}{\textbf {v}}_{2}+(1-\lambda _{1}-\lambda _{2}){\textbf {v}}_{3})\ d\lambda _{1}\ d\lambda _{2}\,}$

${\displaystyle f({\textbf {p}})=\lambda _{1}f({\textbf {v}}_{1})+\lambda _{2}f({\textbf {v}}_{2})+\lambda _{3}f({\textbf {v}}_{3}),}$

## 四面体的重心坐标

${\displaystyle {\textbf {p}}}$ 的笛卡尔坐标和为关于四面体${\displaystyle {\textbf {v}}_{1},{\textbf {v}}_{2},{\textbf {v}}_{3},{\textbf {v}}_{4}}$ 的重心坐标的关系：

${\displaystyle \lambda _{1}={\text{Vol}}(PV_{2}V_{3}V_{4})/{\text{Vol}}(V_{1}V_{2}V_{3}V_{4}),\;\lambda _{2}=\cdots .}$

3维重心坐标和2维一样，可以确定一点是否位于四面体内部，也能对四面体网格上函数插值。因为利用重心坐标可以极大地简化3维插值，四面体网格经常用于有限元分析

## 参考文献

• Bradley, Christopher J. The Algebra of Geometry: Cartesian, Areal and Projective Co-ordinates. Bath: Highperception. 2007. ISBN 978-1-906338-00-8.