Edge Function - A Little Math You Want to Know about CG Posted on 2024-10-22 Edited on 2024-11-06 In graphics Views: Edge 函数定义 E01(P)=(P.x−V0.x)∗(V1.y−V0.y)−(P.y−V0.y)∗(V1.x−V0.x)E_{01}(P)=(P.x - V_0.x) * (V_1.y - V_0.y) - (P.y - V_0.y) * (V_1.x - V_0.x) E01(P)>0E_{01}(P) > 0E01(P)>0 当 PPP 在 V0V1⇀\overrightharpoon{V_0V_1}V0V1 的右边 E01(P)=0E_{01}(P) = 0E01(P)=0 当 PPP 在 V0V1⇀\overrightharpoon{V_0V_1}V0V1 的边上 E01(P)<0E_{01}(P) < 0E01(P)<0 当 PPP 在 V0V1⇀\overrightharpoon{V_0V_1}V0V1 的左边 更好记的形式: ∥V1V0⇀×PV0⇀∥\lVert \overrightharpoon{V_1V_0} \times \overrightharpoon{PV_0} \rVert∥V1V0×PV0∥ 参考 A Parallel Algorithm for Polygon Rasteriztion