Impl geometry2d part 1.