private double CalcAngleForPoint(int i) { Line2D l1 = new Line2D(GetPoint(i - 1), GetPoint(i)); Line2D l2 = new Line2D(GetPoint(i), GetPoint(i + 1)); double a = l1.Angle(l2); if (a < 0.0f) { a += (Math.PI * 2.0); } return(a); }