An Interpolation Based Approach For Pattern Recognition And Generation