by Torsten Ullrich and Dieter W. Fellner

The computer graphics tutorial CGTutorial was developed by the Institute of Computer Graphics and Knowledge Visualization at Graz University of Technology in Austria. It combines a scripting engine and a development environment with Java-based Web technology. The result is a flexible framework which allows algorithms to be developed and studied without the need to install libraries or set up compiler configurations. Together with already written example scripts, the framework is ready to use. Each example script is a small runnable demonstration application that can be started directly within a browser. Using a scripting engine that interprets Java and JavaScript on a client, the demos can be modified and analysed by the user and then restarted. This combination of scripting engines and Web technology is thus a perfect environment for blended learning scenarios.

The development of a software solution can be divided into three steps: algorithm design, software design and implementation. Although all the stages belong together, many differences exist between them. During the design of an algorithm, many programming details such as data types are almost unimportant (as long as it is not the design of a numerical algorithm). Books on algorithms therefore frequently use some kind of pseudo-code, which does not distinguish between the many data types. For example, you do not need to know how many bytes are used to store a graph in order to understand Floyd-Warshall's algorithm. The first time these details need to be discussed is during software design. In this phase, data types are important, as good design should be reflected in an implementation and vice versa. Thus, in choosing design tools, the differences between algorithm and software design should be allowed for. Algorithms should not be designed in a system programming language (such as C/C++), but rather in a flexible environment that allows the designer to concentrate on concepts rather than on implementation details.

Scripting languages offer just such a flexible environment, and allow algorithms to be designed using rapid prototyping techniques. As John Ousterhout has written in Scripting: Higher Level Programming for the 21st Century (1998), "Scripting languages such as Perl and Tcl represent a very different style of programming than system programming languages such as C or Java. Scripting languages are designed for 'gluing' applications; they use typeless approaches to achieve a higher level of programming and more rapid application development than system programming languages. Increases in computer speed and changes in the application mix are making scripting languages more and more important for applications of the future."

The interactive scripting environment integrated in the CGTutorial can be used to teach OpenGL programming. Example scripts can be downloaded from the server and executed on any client with a browser. As scripts are not compiled but interpreted, the source code can be analysed and modified without problems.
The interactive scripting environment integrated in the CGTutorial can be used to teach OpenGL programming. Example scripts can be downloaded from the server and executed on any client with a browser. As scripts are not compiled but interpreted, the source code can be analysed and modified without problems.
Scripting languages are used to reduce development time in many areas of research and applications; for example, scientific packages such as Matlab are well established in numerics and scientific simulations. They allow the testing of new algorithms in a flexible framework, since the built-in interpreters enable algorithm changes during execution.

The combination of scripting languages with Web technology offers further possibilities. In the context of computer graphics, interplay between forms of technology can be used, for example, in an OpenGL tutorial. Using the scripting framework developed by the Institute of Computer Graphics and Knowledge Visualization at Graz University of Technology, students can start a JavaScript engine implemented in pure Java in a browser. An included editor completes the scripting environment, which can be used to tech computer graphics algorithms. Without the need to install any libraries (not even OpenGL), students can concentrate on concepts. Very little time is needed to become familiar with the environment. Students can edit predefined OpenGL scripts online, write new script-based applications and start them from within the editor by a simple mouse click.

This framework is a good basis for online tutorials. Included and ready-to-run scripts are able to replace simple applets, and offer many more possibilities and no drawbacks. Furthermore these scripts are the perfect environment in a blended learning setting: demo applications can be started via Web browser and can be modified just-in-time. Such modifications can be made during a lecture or within a drill-and-practice session. Students who use this framework do not have to implement standard program frameworks such as data input routines, matrix multiplications and user interfaces, but instead can concentrate on the algorithms they should learn. In the future, static compiled applets will be transformed into interactive scripts which can be modified online

Link:
http://www.cgv.tugraz.at/CGTutorial/CGTutorial_RenderingPipeline.html

Please contact:
Torsten Ullrich and Dieter W. Fellner
Institute of Computer Graphics and Knowledge Visualization
Graz University of Technology, Austria
E-mail: t.ullrich@cgv.tugraz.at

Next issue: October 2024
Special theme:
Software Security
Call for the next issue
Get the latest issue to your desktop
RSS Feed