摘要
主要研究了通用函数方程的曲线绘制过程。根据用户输入的函数表达式,使用VC++编程语言对输入的字符串进行分析,并绘制出相对应的函数曲线;该研究包括函数方程式的解析和逆波兰式求值、规定区域内函数曲线初始值和初始方向的确定,以及函数曲线的逐点绘制过程;根据MFC图像绘制方法,对内存DC缓冲技术进行了研究,建立基于Bitmap的内存兼容DC,以高效地完成函数图像的平移和缩放操作方法;该研究已实现多项式函数、常用数学函数以及数学函数的复杂嵌套形式的绘制;当用户输入出现错误时,能够智能地提示错误位置;该研究对数学教学和函数模型研究具有深刻的意义。
The method of generic function curve drawing is studied in this paper.According to the expression that user input,it is analyzed by VC++ programming language,and a corresponding function curve should be drawn finally.The research includes the function expression parsing and Reverse Polish Notation evaluation,and the evaluation of the initial value and the initial direction of the curve within a certain area,and the rendering process of a function curve point by point.The memory DC buffering technique is also researched in this paper according to MFC drawing method.Compatible memory DC based on Bitmap is established to efficiently complete the translation and scaling of function images.The research has accomplished the rendering of functions constituted of x in polynomial,and common mathematical functions,and other complex functions assembled by simple functions.When an error occurs in the user inputs,the error place can be indicated intelligently.It is significant to mathematics teaching and mathematical functions model building and researching.
作者
毛开梅
邹星
Mao Kaimei, Zou Xing(Electronic Information Department, Xi'an Railway Vocational Technical Institute, Xi'an 710014, Chin)
出处
《计算机测量与控制》
2018年第9期246-249,263,共5页
Computer Measurement &Control
关键词
方程式解析
逆波兰式求值
函数曲线绘制
function expression parsing
RP Notation evaluation
function curve drawing