摘要
由于科学数值计算语言Fortran在图形处理以及可视化方面的不足,提出了以脚本语言Tcl(Tool Command Language)作为主语言,与Tk(Toolkit)一起进行图形界面等方面的开发设计,并且直接使用强大的图形处理工具包VTk(Visualization Toolkit),轻松实现可视化。同时,在Tcl中,嵌入Fortran语言,实现混合编程,进行功能扩展。以焊接生产中的纵向收缩力(Tendon Force)与焊接热输入的关系为示例,展示如何以若干个基本数据为基础,通过在Fortran中实现最小二乘法来进行线性拟合;然后,所有的计算分析过程都会在Tcl/Tk构建的主程序用户界面GUI(Graphic User Interface)中实时显示出来;最后,主程序调用VTk图形处理工具包,将所有基本数据以及计算拟合的线性函数进行可视化处理。
Due to the disadvantages of scientific numerical computing language (Fortran) on graphic analysis and visualization, a proposal was presented to consider the script language Tcl as dominant programming language. Tcl usually develops the graphic interface with Tk and directly employs VTk for graphic visualization. Meanwhile, Tcl can plug in other programming language to implement mixed-programming and extend functions. In this study, taking the relation between Tendon force and welding heat input as an example, investigation demonstrates that how to carry out least square method for linear fitting with some basic data in Fortran. All computational procedure will be displayed immediately in GUI produced by Tcl/Tk, and VTk was employed to visualize the basic data and computed linear fitting function.
基金
中央高校基本科研业务费专项资金(编号:2015MS102)资助