In view of the complexity of function mapping coding and the uncertainty of function, this paper proposes that function equation should be separated from the algorithm to design an input program, and then multiple software tools could be utilized to accomplish the complex tasks. This program regards the code generator as the center to dynamically generate graphics code and then calls the execution engine to operate the drawing program. Code generator can automatically generate code for the graphics requirements of any function, which provides a unified mapping framework for the class model of function. The results show that the program is effective and feasible.