An Introductory Course on Computer Graphics for Engineers A. Iglesias∗ , A. G´alvez Department of Applied Mathematics and Computational Sciences University of Cantabria, Avda. de los Castros, s/n, 39005 Santander, Spain ∗ Corresponding author: E-mail:
[email protected] Phone: +34(942)201723 Fax: +34(942)201703 Web page: http://personales.unican.es/iglesias
Abstract This paper describes our proposal for an introductory course on computer graphics for engineering students. The aim of such a course is to provide the students with a comprehensive overview on the fundamentals of computer graphics in terms of basic algorithms and techniques. The paper discusses the design of such a course taking into account its goals, contents, duration and other constraints. This course has been successfully taught by the authors during the last few years at the University of Cantabria. The main conclusions from this experience are also reported.
Keywords: Computer graphics education, graphics hardware, graphics software, APIs, Open GL .
1
Introduction
Those who have taught computer graphics for years have witnessed the extraordinary advances on the subject during the last three decades. Nowadays, computer graphics is a mature discipline and not longer the domain of a small group of professional experts. If courses on all computer science topics have largely evolved in response to the impressive developments in hardware and software, this is particularly true for computer graphics courses. You can, for instance, take a look at the nice paper by Hitchner and Sowizral [6] to realize how computer graphics curricula have adapted to changes in graphics. On the other hand, many current computer graphics courses are oriented to a wide range of technical university students (not necessarily from computer science disciplines) and are taught at earlier ages than in the past. Furthermore, during the last recent years, more and more people from different fields and with very different background are increasingly demanding computer graphics courses “`a la carte”, adapted to suit different requirements and oriented to particular interests and objectives. Many universities have included elective computer graphics courses in their curricula, in response to the new students’ needs and interests. Although this is particularly the case for computer science students, it is still valid for many other scientific studies, such as engineering. To quote just an example close to the authors, the education committee of the spanish chapter of Eurographics has contended that computer graphics should be a compulsory subject for computer science studies. This assessment is also shared by many other professional and educational organizations worldwide. Since 1999 the authors have taught an introductory computer graphics course for engineering students at the University of Cantabria, Spain. The course, with a total of 60 hours, is part of a set of elective courses designed to provide students with a deeper knowledge on computer science and related fields. Those courses are open to almost everyone from engineering studies. This implies that our audience is extremely diverse, from sophomore to senior students (freshmen are still not allowed to choose the course), from electrical, electronical, mechanical, civil and chemical engineering. Therefore, these students exhibit a wide range of different background and skills. Another important issue is that, because it is
the first course on computer graphics for our students, they are still unaware on the topics and techniques involved. This fact restricts dramatically the course’s goals to simply offer a comprehensive overview on the fundamentals of computer graphics as well as a gentle introduction to the main topics and techniques. Consequently, the tools to be used in the course must be carefully chosen in order to prevent students from boredom or discouragement. In this context, the present paper describes our proposal for an introductory course on computer graphics for engineering students. The structure of this paper is as follows: in Section 2 we describe the framework of computer graphics for the last recent years (Section 2.1) as well as the profile of our students (Section 2.2), a key question for the adequate design of any course. Section 3 discusses the issues we had taken into account when designing an introductory computer graphics course for our engineering students at the University of Cantabria. In particular, we analyze the course’s goals, its general contents, the teaching methods and the bilbiography and complementary material used in this course. Finally, Section 4 closes with the main conclusions and some further remarks.
2
Framework
2.1
Computer graphics in recent years
In the last few years, computer graphics has become one of the most important fields in computer science, with remarkable applications to many other fields: science, engineering, medecine, advertising, entertainment, arts, etc. and the list is expanding rapidly. Current computer graphics hardware is orders of magnitude faster and cheaper, and it is much more robust and powerful than earlier technology. Today, we are used to have powerful graphical cards in our desktop computers and laptops. These graphical cards are especially designed for high performance and often incorporate OpenGL or other APIs in hardware. In addition, we have witnessed extraordinary advances in computer graphics software, such as: • the appearance and acceptance of standardized APIs (Application Programmer Interfaces), such as OpenGL, Direct3D, QuickDraw3D, Java3D, etc.
• extensive general-purpose libraries providing high level graphical capabilities and simplified GUIs (Graphical User Interfaces) • powerful graphical programs (for instance, 3D Studio Max, LightWave or RenderMan) that provide the users with a large and very powerful collection of tools for design, rendering and animation • the Web and its wealth of free demos, software tools (POVray, rayshade, VRML), data sets and examples, etc. (see, for instance, [13] or the nice ACM Siggraph repository at http://www.siggraph.org).
2.2
Student’s profile
Another point that deserves consideration from an education standpoint is the fact that current students are quite different from those in earlier years. Although less skilled in mathematical reasoning and tools, they have access to a considerable amount of technology: computer tools (such as the web, video games, graphical interfaces), video and TV devices, etc. Consequently, they are quite familiar with concepts like pixel, RGB color, texture, navigation, interface, etc. In addition, it is not uncommon for them to have some programming experience. Finally, we can certainly assume that all our students are familiar with computers, at least, at user’s level. All these new features have introduced dramatic changes in both the methodology and the tools applied to teach computer graphics. Most new courses are organized on the basis of a graphics library such as Open GL or Java3D [6]. In fact, as remarked in [12], OpenGL appears to be the standard tool for computer graphics courses for the last recent years. We should proceed carefully, however, because these libraries require some mathematical background and programming skills that either have not been acquired yet (for example, freshman or sophomore university students still lack many advanced programming concepts) or have already been forgotten. Fortunately, the maths required for introductory courses are mostly based on geometrical and simple linear algebra concepts which can be acquired rapidly. By contrast, the programming language can represent a trouble, since it is not so easy to capture the “philosophy” of a programming language at a glance. Therefore, our choice for topics and tools could eventu-
ally require further evaluation on students’ profile and background. Graphical programs (3D Studio Max, LightWave, RenderMan) do not represent a feasible alternative, due to their costs and the fact that they are best suited for modeling and rendering rather than for learning the basic principles and techniques. On the other hand, the material available at the Web is disperse among many different sources and often oriented to specific goals (such as POVray for ray tracing techniques or VRML for virtual reality and navigation), although students are more and more accustomed to carry out exhaustive searches in Internet.
3
Course Design
3.1
Goals
Based on the previous considerations, we think that any proposal for an introductory computer graphics course for engineers should restrict its objectives to: • Offer a comprehensive overview on the fundamentals of computer graphics in terms of basic algorithms and techniques. Although the definition of “basic algorithms” can be understood in many different ways, it is almost unanimously recognized nowadays that, in spite of their pedagogical value, many fundamental algorithms and procedures are not longer necessary. For instance, Bresenham’s algorithms for lines and circles, scan conversion algorithms for polygons, clipping procedures and similar are currently performed in very low level hardware and, consequently, are not useful to learn graphics sofware techniques. On the other hand, the original algorithms are very often modified before being implemented in hardware. Lastly, many algorithms designed for optimal performance at software level are today buried in hardware. Because current graphical cards are much more powerful than those from the previous years, some of those “strategies” for software efficiency are not required anymore. • Develop the students’ visual sense, which is not usually acquired from most of the traditional courses. At our experience, this visual insight is better acquired when appropriate high-level 3D APIs are applied. In particular, we have considered Open GL with GLUT
(Open GL Utility Toolkit) for the higherlevel functions (windowing, menus, or input). Remarkable features for this choice are that Open GL is free and easily available for all students, requires little (or none) effort to install, can be used with many standard compilers and the fact that it supports all the fundamental concepts needed for early work (see http://www.opengl.org for further details).
3.2
General contents
The curriculum of the course depends strongly on the goals and orientation. We think that a computer graphics course must be fundamentally visual, and therefore, our students must be aware of the visual effects of the algorithms rather than of their intrisic mechanisms. In particular, computer graphics should talk about lights, textures, cameras, animation and about methods and techniques to simulate them in a realistic and/or artistic way. In addition, geometry is also an integral part of computer graphics whose relevance cannot be ignored. Our approach is to use it as a tool for doing computer graphics rather than as a subject itself. Thus, our concern is how to express the geometry of the scenes and objects in graphical terms, by using typical computer graphics concepts such as coordinate systems, normal vectors or 3D transformations. We also emphasize that the basic shape must be the triangle, as other (more complicated) shapes, such as the free-form surfaces, are triangularized before being sent to the graphics pipeline. However, because our students are potentially future engineers, we also include a chapter on the free-form surfaces which, in addition to their outstanding applications to computer graphics, are a major ingredient in many industrial developments (such as the design of mechanical parts for the automotive, aerospatial and ship building industries, to mention just one example). On the basis of these considerations, the topics for the course have been organized into five chapters, each containing a theoretical part and some computer training (labelled as Ti and Ci for chapter i, respectively): 1. Introduction. T1:- Basic definitions. History of computer graphics. Computer graphics goals, principles and applications. C1.- Introduction to Open GL.
2. Basic geometrical concepts. Graphical Primitives. T2:- Review on vectors and matrices. 2D and 3D transformations. Perspectives. Cameras. Points, lines, polygons. Free-form curves and surfaces (B´ezier, B-spline, NURBS). Basic algorithms. Fundamentals of differential geometry applied to computer graphics. C2.- Transformations and graphical primitives with Open GL. 3. Illumination models. T3:- Ambient, specular and diffuse illumination terms. Flat, Gouraud and Phong shading. Illumination techniques: ray-tracing, radiosity. Materials. C3.- Illumination models in Open GL. Raytracing: POV-Ray, ray-shade. Learning illumination models with TERA. 4. Textures. T4:- Texture mapping, bump mapping, environment map, solid texture. Fractal texture: 2D and 3D fractals, IFS. C4.- Texturing with Open GL. Texturing for simulation of natural phenomena. Some software for fractals: fractint. 5. Principles of animation. T5:- Basic concepts. Forward and backward kinematics. Animation of natural phenomena, virtual characters and avatars. C5.- Basic animation in Open GL.
3.3
Teaching methods
The curriculum of the course depends strongly on the number of hours and their structure. In our case, the course consists of 40 lectures (of one hour and half each), of which the half are given at the classroom and the other half at the computer labs. Each chapter (typically from 6 to 12 lectures, depending on the complexity of the topics involved) consists of a first visual introduction to the subject, a theoretical explanation of the concepts and techniques, some computer work at the computer labs and homework. Since our objetives are much easier to achieve if the evaluation is based on practical assignments (one for each chapter of the syllabus) and the number of students is relatively low (no more than 30 per course), we have chosen this kind of evaluation. Assignments consist of a brief exposition on some topic or some implementation. Our students are required to perform these assignments by themselves, either as homework or as computer
training at our labs. Of course, this structure demands a significant time and effort to both students and teachers, making this approach feasible only for small groups of highly motivated students. At the end of the course, a final project on some of the topics of the course is also required. To this aim, essential ingredients are a good bibliography and additional documentation and material. They are analyzed in the next section.
3.4
Bibliography and complementary material
Regarding the bibliography used in this course, students are suggested to use the books in [4, 10, 11] for a gentle and general introduction to computer graphics. These books also cover most of the course’s topics at a general (but still enough) level. On the computer training counterpart, the book on Open GL [2] has also been recommended. Some topics, however, require additional bibliography. For geometric design we recommend the excellent books in [1, 8, 10], while illumination models are also analyzed in [7] and in [5] for ray-tracing techniques. Additional bibliography for specific topics, such as fractals [3], could also be used. Additional material comprises ACM Siggraph videotapes, freeware/shareware programs and libraries available from the Web (such as POVray, ray shade or VRML) that are shown just for general knowledge (but they are basic tools for a subsequent advanced computer graphics course not described here), journals (such as “IEEE Computer Graphics and Applications”, “Computers and Graphics”, “ACM Transactions on Graphics”, “Computer Graphics Forum” or “Computer Graphics World” and others available at our library) and additional documentation (manuals, presentations, slides, etc.). Concerning the software, in addition to Open GL, some specific material designed for elementary computer graphics courses such as the program TERA (Tool for Exploring Rendering Algorithms) and its complementary book in [14] are used. Our experience with TERA was quite successful in spite of the fact that interaction is not actually allowed in this software and that the collection of screenshots is quite limited. Finally, the implementations performed by former students are applied to illustrate new students about possible course’s projects.
4
Conclusions and Further Remarks
In this paper an introductory computer graphics course for engineers is presented. The paper discusses the main issues involved in the design of such a course, such as the resources, goals, students’ profile, course contents, teaching methods and bibliography and complementary material. The proposal described in this paper was a consequence of a series of courses taught since 1999 at the University of Cantabria, Spain. At the beginning, we applied a more conservative approach, consisting of following the courses developed by other educators with similar goals and constraints. After some years, we got enough experience to design the course by ourselves and adapt it to our specific goals and conditions. At this point, we considered very seriously the suggestions of the ACM/IEEE-CS Task Force in developing Curriculum 2001 [9]. Roughly, it establishes that creating a single curriculum to meet all needs could be counterproductive, taking into account the different institutional resources, student’s background, skills and goals and other factors. Instead, our approach was to analyze our real constraints and goals, and then select an appropriate small set of concepts and skills we expect our students must acquired. As a consequence, the course described here is taught since 2002. In general, the students are very enthusiastic about the course and a subsequent course on advanced computer graphics was taught as a second one in sequence. The results of this second course evidenced that students did effectively learn many concepts on the subject from the first one. Of course, we had to face some problems as well. Perhaps the most important one is related to the dissimilarity of the background knowledge, since it is an elective course for sophomore, junior and senior students from five different (mechanical, chemical, electrical, electronical and civil) engineering degrees. A natural solution could be to implement different curricula adapted to each student’s profile. But because the number of students never excedeed 30, we decided to keep a similar curriculum for all the attendees. Another interesting test is given by the oral and written project to be presented by the students at the end of the course. Some students put a lot of work and effort into the project, and presented interesting material. However, a few students were
not so stimulated for this assignment and presented poor material, in spite of the fact they were allowed to propose a subject of their own interest. Some students pointed out that they do not like to make an oral presentation and become upset by this duty (this was actually the first thing they suggested to remove from the course). Other students claimed that, being an elective course, the project is perhaps too demanding. These opinions were carefully analyzed and the course’s methodology and evaluation were modified accordingly. For example, last year we gave the possibility to replace the oral presentation by a standard written examination. It is our hope that sharing our positive experience of teaching computer graphics for enginners by applying this approach will be of benefit to other educators. We would be delighted to receive the feedback and comments from others with similar experiences.
Acknowledgements The authors have strongly benefited from fruitful discussions with many people with a large experience on the design and teaching of computer graphics courses at university. We are specially grateful to Vera Anand (Clemson University, USA), whose book [1] was intensively used in our courses for a gentle and comprehensive introduction to the field, Rosalee Wolfe (DePaul University, USA) for discovering us a nice computer tool, TERA, for visualization of computer graphics techniques, Jack Bresenham (Winthrop University, USA) for sharing with us his love and respect for education, Judith Brown (Iowa University, USA) for introducing us the wonderful Siggraph repository and complementary material available at Internet, V. Kamat (Goa University, India) for his interesting suggestions and comments and Jos´e Carlos Teixeira (Coimbra University, Portugal) for his nice courses on virtual reality. We are also grateful to the University of Cantabria (Spain) for the partial support of this work.
[2] Angel, E.: Interactive Computer Graphics: A Top-Down Approach with Open GL (3rd. edition). Addison-Wesley, MA (2002) [3] Barnsley, M.F.: Fractals Everywhere (2nd. edition). Academic Press, Boston (1993) [4] Foley, J.D., van Dam, A., Feiner, S.K., Hughes, J.F.: Computer Graphics. Principles and Practice. (2nd. Ed.) Addison Wesley, MA (1990) [5] Glassner, A.: An Introduction to Ray Tracing. Academic Press, San Diego (1989) [6] Hitchner, L.E., Sowizral, H.A.: Adapting computer graphics curricula to changes in graphics technology. Proc. of the Eurographics/Siggraph Workshop on Computer Graphics and Visualization Education, CGE’99, Coimbra (1999) 23-29 [7] Hall, R.: Illumination and Color in Computer Generated Imagery. Springer-Verlag, New York (1989) [8] Piegl, L., Tiller, W.: The NURBS Book (2nd. Ed.) Springer-Verlag, Berlin Heidelberg (1997) [9] Roberts, E., LeBlanc, R., Shackelford, R., Denning, P.J.: Curriculum 2001: Interim Report from the ACM/IEEE-CS Task Force. In: Proceedings of the Thirtieth SIGCSE Technical Symposium on Computer Science Education (1999) 343-344 [10] Rogers, D.F., Adams, J.A.: Mathematical Elements for Computer Graphics (2nd. Ed.) Mc Graw-Hill, New York Boston (1989) [11] Rogers, D.F.: Procedural Elements for Computer Graphics (2nd. Ed.) Mc Graw-Hill, New York Boston (1998) [12] Wolfe, R.J.: OpenGL: Agent of change or sign of the times? Computer Graphics November-98 (1998) 29-31
References
[13] Wolfe, R.J.: 3D Freebies: a guide to high quality 3D software available via the Internet. Computer Graphics May-98 (1998) 30-33
[1] Anand, V.B.: Computer Graphics and Geometric Modeling for Engineers. John Wiley and Sons, New York (1993)
[14] Wolfe, R.J.: 3D Graphics. A Visual Approach. Oxford University Press, New York (2000)