calculating  convex polygon  at initialization