next up previous
Next: 2 Graphics Programming Using Up: Design of an OpenGL Previous: Design of an OpenGL

1 Introduction

The programming language J, a dialect of APL created by Kenneth Iverson and associates at Iverson Software Incorporated, is a modern functional programming language. The order in which operations are performed depends on the context of the operation's use with in a J sentence [Smi 95]. J sentences may be interpreted by simply reading them from left to right with the aid of a J dictionary to substitute English meanings for symbols from the standard ASCII character set. Once interpreted, the J sentence behaves precisely as the English translation is understood. For example, the following line of code:

   sum =. + /

may be translated into the sentence sum is (=.) the addition operation (+) inserted (/) between elements of its list argument. Therefore, the verb sum might be used add 3 , 5 and 7 as follows: sum 3 5 7 producing a result of 15.

In addition to its straightforward translation, J also lends itself to graphical program development because of the functional nature of graphics programming. The J programming language also contains primitive operations for linear algebra and array manipulation. Graphics programming utilizes linear algebra for processes like object translation, scaling and rotation and uses arrays for tasks like grouping vertices. Graphics programming also consists of issuing commands, or using functions, that manipulate graphics states such as shape and color producing an image or series of images in a graphics view port. Therefore, once appropriate functions have been defined, the J programming language constitutes a tool well suited for graphical program development.


next up previous
Next: 2 Graphics Programming Using Up: Design of an OpenGL Previous: Design of an OpenGL
2002-09-30