摘要
编程绘制函数图像是常见的方法,但这种方式相当的不方便。针对函数图形绘制程序具有可分离的特性,设计了一个自动生成绘图脚本的代码生成器。代码生成器是通过对用户输入参数与模板代码的合成来生成绘图脚本,并使用C/C++解释计算环境Ch作为绘图脚本的执行引擎,把Ch无缝地嵌入到应用程序中扩展其功能,实现图形绘制。文中给出了一个基于Web的函数图形绘制的应用实例,详述了通用的函数绘图CGI(Common Gateway Interface)程序的设计以及Ch与IIS Web服务器集成的方法。实践表明,该方法有效、可行。
It is very trouble task plotting function graph using programming.In accordance with the analysis of the separable characteristics of graphic drawing program for function,a code generator design for graphical plotting scripting was presented.This generator based on user's input and template code to produce embedded scripting.Then,the scripting was run using Ch that can be seamlessly embedded in other applications as a C/C++ scripting engine for flexible programming.Furthermore,gives a Web-based function graphic drawing example,and recounts the CGI program design and Ch integration with the IIS Web server.Practice shows that the method is effective and feasible.
出处
《计算机技术与发展》
2010年第10期74-77,共4页
Computer Technology and Development
基金
贵州省自然科学基金资助项目(20082122)
贵州民族学院2010年度科研基金资助项目
关键词
程序模板
图形绘制
CH
program template
graphic plotting
Ch