void Wrap() { Point2D bottompoint = FindMinPoint(Points); ReferencePoint.Y = bottompoint.Y; ReferencePoint.X = -100;//inf for scene which i using Point2D selected = GetMaxAngle(ReferencePoint, bottompoint); Point2D prev = bottompoint; int i = 0; Hull.AddPoint(bottompoint, i++); Hull.AddPoint(selected, i++); while (bottompoint != selected) { Point2D next = GetMaxAngle(prev, selected); Hull.AddPoint(next, i++); prev = selected; selected = next; } }