calculate_convex_hull function

Calculate Convex Hulls for one variable