A Pattern Generation Model Based on Neural Network