public static Halfspace PlaneAt(IReadOnlyList <Vector> p, int i) { Halfspace h; h.Normal = PolygonTools.GetNormal(p, i); h.D = Vector.Dot(h.Normal, p[i]); return(h); }