horizontal projection function