implementation of cone and plane