A rate and distortion analysis for grid intersect encoding of line drawings