private void UpdateSegmentPoints(int i) { List <Vector3> handles = GetSegmentHandles(i); for (int j = 0; j < pointsBySegment; j++) { float t = (1f / (pointsBySegment + 1)) * (j + 1); segmentPoints[(i * pointsBySegment) + j] = MathUtility.BezierPoint(handles, t); } }