added h,v coordinate system, generalized painter drawing for different coords