// 分裂
List<CPoint> points1 = new ArrayList<CPoint>();
List<CPoint> points2 = new ArrayList<CPoint>();
for (int i = 0, n = points.size() - 1; i < n; i++)
{
LineSegment lseg = new LineSegment(points.getCoordinate(i), points.getCoordinate(i+1));
if (lseg.onLineSegment(p))
{
List<CPoint> tpoints = subList(points, 0, i + 1);
points1.addAll(tpoints);
points1.add(p);
if (!lseg.onBorder(p))
{
points2.add(p);
}
List<CPoint> tpoints2 = subList(points, i + 1, n + 1);
points2.addAll(tpoints2);