Surfaces

Polygonal Representation

通常包含以下几个要素:

  • List of vertices
    • 顶点顺序很重要(逆时针定义,右手定则)
  • List of polygons formed by the vertices
  • (Optional) List of normal vectors built at the vertices

Analytical Representation

如何定义一个平面
隐函数形式 Ax+By+Cz+D=0Ax+By+Cz+D=0,法向量为 N=(A,B,C)N=(A,B,C)
截距形式 xa+yb+zc=1\frac{x}{a}+\frac{y}{b}+\frac{z}{c}=1
法向量、点式 N(rr0)=0\bold{N}\cdot (r-r_0)=0,即法向量与平面上任意向量的夹角为 90°90\degree.
三点式 P=P1+u(P2P1)+v(P3P1)P=P_1+u(P_2-P_1)+v(P_3-P_1)

Bilinear Surface

Bilinear Surface 可以看作是两条不共面的直线所形成的曲面。

假设 Pi,i={1,2,3,4}P_i,i=\set{1,2,3,4} 是四个点,令 P1,P2P_1,P_2 取自直线 aaP3,P4P_3,P_4 取自直线 bb,其核心公式是

P=P1+u(P2P1)+v(P3P1+u(P4P3(P2P1))) P=P_1+u(P_2-P_1)+v(P_3-P_1+u(P_4-P_3-(P_2-P_1)))

注意:双线性曲面不能完全用于定义一般平面,因为这与四个点如何选取息息相关;但是可以表示三角形(令其中的两个点重合即可)。