public static PointSet interpolation(PPDictionary ppd) {//插值所有三角形 PointSet result = new PointSet(); foreach (KeyValuePair <Point, List <Point> > kv in ppd) { PointSet tps = interp(MyConvert.toPoint3d(kv.Key), MyConvert.toPoint3dList(kv.Value)); if (tps != null) { result.Add(tps); } } return(result); }
public static PointSet interpolation_partial(PPDictionary ppd) { PointSet result = new PointSet(); int count = ppd.index.Count; List <InterpolatedPoint> lip = new List <InterpolatedPoint>(); for (int i = 0; i < count; i++) { KeyValuePair <Point, List <Point> > kv = ppd.index[i]; List <InterpolatedPoint> tps = interp2(MyConvert.toPoint3d(kv.Key), MyConvert.toPoint3dList(kv.Value)); if (tps != null) { lip.AddRange(tps); } } lip.Sort(new InterpolatedPointComparer()); count = lip.Count / 5; for (int i = 0; i < count; i++) { result.Add(lip[i].point); } return(result); }