lab_transform_dim1 & dim2

Convex hull slow down the program (?)
Drop the convex hull and use binary search only