TEACHING INTRODUCTORY COMPUTER GRAPHICS WITH THE PROCESSING LANGUAGE



Similar documents
Teaching Introductory Computer Graphics Via Ray Tracing

CURRICULUM VITAE EDUCATION:

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

CG: Computer Graphics

How To Teach Computer Graphics

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

Introduction to Computer Graphics

Computer and Information Sciences

COMP-557: Fundamentals of Computer Graphics McGill University, Fall 2010

COMPUTER SCIENCE. FACULTY: Jennifer Bowen, Chair Denise Byrnes, Associate Chair Sofia Visa

UNDERGRADUATE COMPUTER SCIENCE EDUCATION: A NEW CURRICULUM PHILOSOPHY & OVERVIEW

CS130 - Intro to computer graphics. Dr. Victor B. Zordan vbz@cs.ucr.edu Objectives

Arts, Media and Entertainment Pathway Courses

CAD and Creativity. Contents

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

A Client-Server Interactive Tool for Integrated Artificial Intelligence Curriculum

Tactile and Advanced Computer Graphics Module 5. Graphic Design Fundamentals

Computer Graphics. Computer graphics deals with all aspects of creating images with a computer

Comparison of Student Performance in an Online with traditional Based Entry Level Engineering Course

A LOOK BACK: UNDERGRADUATE COMPUTER SCIENCE EDUCATION: A NEW CURRICULUM PHILOSOPHY & OVERVIEW

COMP175: Computer Graphics. Lecture 1 Introduction and Display Technologies

RARITAN VALLEY COMMUNITY COLLEGE COURSE OUTLINE. CISY 103 Computer Concepts and Programming

Instructor. Goals. Image Synthesis Examples. Applications. Computer Graphics. Why Study 3D Computer Graphics?

CS 378: Computer Game Technology

CE 504 Computational Hydrology Computational Environments and Tools Fritz R. Fiedler

Please consult the Department of Engineering about the Computer Engineering Emphasis.

DIGITAL FORENSICS SPECIALIZATION IN BACHELOR OF SCIENCE IN COMPUTING SCIENCE PROGRAM

JMulTi/JStatCom - A Data Analysis Toolkit for End-users and Developers

The Art Institute of Philadelphia Catalog Addendum GAME ART & DESIGN

Computer Science Course Descriptions Page 1

MT. DIABLO UNIFIED SCHOOL DISTRICT COURSE OF STUDY

JEFFERSON TOWNSHIP PUBLIC SCHOOLS RELATED ARTS AND TECHNOLOGY CURRICULUM TITLE: 3D COMPUTER GRAPHICS GRADE: 10-12

Introduction to Graphic and Web Design. Nina S. Young Date: 1/6/11 Revised:1/6/11

CS 325 Computer Graphics

Chapter 13: Program Development and Programming Languages

CSE452 Computer Graphics

Instructional Design Framework CSE: Unit 1 Lesson 1

Igniting young minds through computer programming

SAN DIEGO COMMUNITY COLLEGE DISTRICT MESA COLLEGE ASSOCIATE DEGREE COURSE OUTLINE

White Paper: 5GL RAD Development

Course Developer: Charles Shami, Professor, Savannah College of Art and Design

AP Computer Science A - Syllabus Overview of AP Computer Science A Computer Facilities

VAPA (Visual Arts) VISUAL ARTS

WWHS Visual Arts Program Tips

DESIGNING WEB LABS FOR TEACHING SECURITY CONCEPTS ABSTRACT

Course Descriptions. preparation.

STUDENT PERSPECTIVES ON A REAL WORLD PROJECT

Some programming experience in a high-level structured programming language is recommended.

Introduction Week 1, Lecture 1

Using ipads in Undergraduate Mathematics

Syllabus for CS 134 Java Programming

Manage Software Development in LabVIEW with Professional Tools

SYLLABUS & COURSE OUTLINE

Library Intro AC800M

A Design Paradigm in Undergraduate Electrical Engineering Curriculum

Matrox Imaging White Paper

Using Photorealistic RenderMan for High-Quality Direct Volume Rendering

A Comparison of Programming Languages for Graphical User Interface Programming

Adding Animation With Cinema 4D XL

Game Programming for Complex System Development and ABET Accreditation Assessment

COMPUTER SCIENCE COURSE OUTLINE

Integration of Mathematical Concepts in the Computer Science, Information Technology and Management Information Science Curriculum

Student Perceptions On Computer Coding Ashfield Public School Term 3, The Initiative. The survey

WebGL based E-Learning Platform on Computer Graphics

RARITAN VALLEY COMMUNITY COLLEGE ACADEMIC COURSE OUTLINE. ARTS 248: Designing Motion Graphics

An Instructional Aid System for Driving Schools Based on Visual Simulation

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

INFORMATION SYSTEMS (INFO)

Computer Information Systems (CIS)

Graphic Design. Location: Patterson Campus - Bldg. K. Program Information. Occupational Choices. Average Full-Time Wage.

Orange Unified School District Video Game Design II Year Course

ENGINEERING, TECHNOLOGY, AND DESIGN

Bachelor of Science in Business Administration - Information Systems and Technology Major

The Effectiveness of Games as Assignments in an Introductory Programming Course

Counselor Lesson Plan

Course Descriptions: Undergraduate/Graduate Certificate Program in Data Visualization and Analysis

BRAZOSPORT COLLEGE LAKE JACKSON, TEXAS SYLLABUS ITSC 2339: PERSONAL COMPUTER HELP DESK HYBRID VERSION

Unresolved issues with the course, grades, or instructor, should be taken to the point of contact.

Lifting the Hood of the Computer: * Program Animation with the Teaching Machine

Blended Course Evaluation Standards

Transcription:

TEACHING INTRODUCTORY COMPUTER GRAPHICS WITH THE PROCESSING LANGUAGE Dino Schweitzer, Jeff Boleng, Paul Graham United States Air Force Academy, CO 80840 dino.schweitzer@usafa.edu ABSTRACT Different approaches to teaching introductory computer graphics have been documented in the literature over the years. Different languages, environments, API s, and graphical standards have been proposed. Some unusual approaches have included using games and gaming engines, animation and simulations, and even spreadsheets. A common characterization of the different teaching methods is a bottom-up approach (basic algorithms and primitives first) versus a top-down approach (functional modules of an application). Many texts use OpenGL as the API of choice for teaching graphical functions and capabilities in a top-down means. One problem with this approach is the student becomes API-centric, and sees graphics concepts through the eyes of the system being used. Criticism of the bottom up approach is that students need to learn the math and low-level algorithms before they can begin creating useful and interesting applications. At the United States Air Force Academy, we have taught the introductory computer graphics course using both approaches. In the most recent implementation, we chose a more bottom up approach to emphasize fundamental algorithms and concepts in an API-agnostic fashion. To allow students to quickly advance to interesting applications, we chose the open-source Processing language and environment. Processing (www.processing.org) was developed at MIT as a way to teach the fundamentals of computer programming in a visual context. It is a Java-based language without requiring knowledge or experience with object-oriented concepts. It is well suited for people with minimal programming experience, and as a rapid prototyping tool. The ease of quickly creating interactive graphical applications makes it a good choice for learning fundamental graphic algorithms and applying them to interesting applications. This paper will describe our approach of using Processing to teach graphics, include sample programming projects, and report on student attitudes and performance. INTRODUCTION Computer Graphics is fun to teach. Students find the topics interesting; there are many occasions to tell anecdotes about animations, movies, and games; class projects provide opportunities to express creativity; and students are self-motivated to create their own computer generated images and animations. Our experience is that students are willing to spend many more hours working on their computer graphic projects than other project-based CS courses. In addition, the material is inherently visual which makes for more lively classroom presentations. As with many CS courses, different educators have proposed different approaches to teaching computer graphics: different languages, different systems, an API approach, a tool-based approach, a web-based approach, game-based approach, a survey-based approach, and even teaching it with spreadsheets [1-6]. One general categorization is a top down versus a bottom up approach [1]. A top down approach is defined as an API-driven approach in which the emphasis is on students learning and using an existing API, such as OpenGL, to quickly write high-level programs and generate interesting images and graphic applications. The advantages of this approach are that students are motivated to develop graphically interesting programs and learn an API common in the field. The disadvantage is that students can become API-centric and not understand the underlying concepts. The bottom up approach focuses on algorithms and the underpinning concepts of the field. In the extreme case, students write all of their computer graphic programs from scratch, down to setting individual pixels in line drawing algorithms. The advantages of the bottom up approach are that students have a better understanding of underlying concepts and can apply these to follow-on courses. However, in an undergraduate program in which students take a single computer graphics course, if the majority of

time is spent focusing on low-level programming problems, students do not get the opportunity to develop more motivational projects such as sophisticated interactive games. OUR COURSE At USAFA, we have taught the course using both approaches, partially depending on the biases of the instructor for the specific offering. Students take the course in their Junior or Senior year with the only pre-requisite being CS2. This past spring semester, the course was offered using a hybrid approach algorithms and underlying concepts were taught but students did not implement low-level algorithms such as fill, line drawing, and rasterization. They did not use a high-level API, but rather used the fundamental drawing capabilities built into a language. They used an existing modeling tool (Blender) for a modeling exercise, and they wrote programs to do realistic shading, rendering, and stereoscopic displays. The complete list of lesson topics is shown in Table 1. Intro to Computer Graphics Visual Perception Color Graphic Primitives Basic Algorithms User Interaction Math Review Transformations Transformations II Viewing Transformation 3D Viewing Modeling Procedural Modeling Modeling Tool Hidden Surfaces Shading Advanced Shading Ray Tracing Review Increased Realism Intro to Animation Animation II Virtual Reality Image Formats Image Processing Image Compositing Visualization Non-photorealistic Rendering OpenGL Table 1. List of topics taught in Introductory Computer Graphics class For the final project in the course, students worked in teams to create an immersive display cave for an Unmanned Aerial Vehicle (UAV) training application. The project consisted of hardware, software, modeling, and interfacing with existing systems. An early decision in preparing the course was the choice of textbook. In the previous offering of the course, a top down approach based on OpenGL, students used the API reference books as their only text. For the current hybrid offering, the instructor felt it important for students to have a written reference of the concepts and algorithms being taught. After reviewing available texts, it was decided that none of the current texts in the market exactly hit the right level. They were either too API-centric or too detailed for an undergraduate computer graphics overview course. Thus, the instructor wrote a set of readings for the students, one per lesson that covered the material at the desired level. Another interesting aspect of the course was an emphasis on hands-on instruction. Every lesson included an interactive tool for learning a central concept in the day s lecture, such as a specific algorithm, setting parameters in shading models, and morphing shapes and faces. 12 minutes of every class was dedicated to students using the tool, experimenting with its capabilities, and answering an associated challenge question on the concept. Figure 1 shows an example of one of the tools.

Figure 1. Sample graphics tool. LANGUAGE CHOICE With the decision not to use an existing API, such as OpenGL, there was a lot of flexibility in what language to teach the course in. While most of the students were Computer Science majors, there were some students with minimal programming experience. The goals were to choose a language that had sufficient graphics functionality available, was easy to learn (for non-programmers) and use, and supported simple interaction and animation. The Processing language and IDE were chosen to meet these objectives. Processing (www.processing.org) is a Java-based open source programming language and environment specifically designed for creating images, animations, and interactions. It was created by Ben Fry and Casey Reas at MIT as a tool for artists and designers to quickly generate visual applications with a minimal of programming experience. While it is built on Java, it does not require knowledge of the object-oriented paradigm, and greatly simplifies programming requirements such as classes, paths, and environment variables. It also has a fairly sophisticated 2D and 3D library of graphic routines available for drawing shapes and manipulating images. The example in Figure 2 shows a simple Processing program and resulting screen to draw shapes. Figure 2. Simple Processing program and output.

To provide animation and interaction, programs are written in interactive mode which uses the pre-defined functions setup and draw. Setup is called once when the program begins to perform any initialization. The draw routine is continually called so that any changes will appear animated. Figure 3 is an example of a simple bouncing ball: Figure 3. Simple bouncing ball in Processing. For user interactions, call-back routines are available for events such as mousepressed, mousedragged, and keypressed. A well-documented reference to the available functions in Processing is provided under the help menu in the Program Development Environment (PDE). When desired, a program can be easily exported as a standalone Java application or as a Java applet for embedding in web pages. The language includes a number of libraries for different capabilities, and, if necessary, straight Java code can be embedded in the program. USING PROCESSING IN THE COURSE Students are introduced to Processing at the start of the course, and examples are provided throughout. The customized readings for the course contain all of the examples in Processing, and have sections dedicated to how to accomplish certain activities, such as user interaction and graphic primitives. In addition, all of the daily interactive tools described above are written in Processing, and students have access to the documented source code to see how certain interactions are accomplished. They are encouraged to copy useful sections of code, such as a button press routine or slider bar, into their own programs. The course required students to write three separate programming exercises in addition to the modeling exercise using Blender and the final integration project. The three projects and associated course concepts being reinforced are listed along with sample outputs in Figure 4: Project Basic Paint Program 3D Anaglyphs Ray Tracing Course Concepts Graphic primitives, simple drawing, basic user interaction 3D transformations, binocular stereopsis, perspective, advanced user interaction Advanced rendering, simple models, hidden surfaces, shading calculations, shadows

Figure 4. Sample output images from the three Processing programming exercises. RESULTS The class size was relatively small with only nine students, so it is difficult to make definitive statements as to the effectiveness of the approach with such a sample size. Most students successfully completed the required exercises. The average scores on the first two were 95% and 85% respectively. The third exercise, ray tracing, was more challenging and students only averaged 75%. Students who did not successfully complete it agreed the problems were with their logic, and were not related to the language. On the course critique, students were asked to rate the use of Processing as the required programming language. On a scale of 1-5 (5 being the highest), the average student rating was 4. Comments on the language included: - Fun PEX s (programming exercises) - Processing did not have much overhead - Need something with a better debugger The last comment is based on the fact that the Processing environment does not have an integrated debugger, and students are forced to use more traditional techniques such as println s. While understanding a sophisticated IDE and debugger is important for future computer scientists developing complex systems, learning a new system can be cumbersome and take time away from the underlying algorithms. Our students are exposed to such IDE s in other classes. In summary, the use of Processing for the introductory Computer Graphics course was deemed a success. The students were able to complete relatively complex programs that reinforced graphic concepts and not get bogged down with a complicated language or environment to learn. The aspects of the language that support user interaction and animation were beneficial in reinforcing certain concepts in the course. By providing several examples through the readings and daily interactive tools, students had no difficulty understanding the programming aspects of the exercises (although several struggled with the complexity of the ray tracing exercise). While the higher level functions of a sophisticated API are not available, the use of a language such as Processing worked well with this hybrid approach. REFERENCES [1] Angel, E., Cunningham, S., Shirley, P., and Sung, K, Teaching computer graphics without raster-level algorithms, Proceedings of the 37th SIGCSE Technical Symposium on Computer Science Education, 2006.

[2] Bresenham, J., Laxer, C., Lansdown, J., and Owen, G. S., Approaches to teaching introductory computer graphics, Proceedings of the 21st Annual Conference on Computer Graphics and interactive Techniques, 1994. [3] Klein, R., Hanisch, F., and Straßer, W., Web-based teaching of computer graphics: concepts and realization of an interactive online course. In ACM SIGGRAPH 98 Conference Abstracts and Applications 1998. [4] Marchese, F. T., Teaching computer graphics with spreadsheets, ACM SIGGRAPH 98 Conference Abstracts and Applications, 1998. [5] Owen, G. S., Teaching computer graphics using RenderMan, Proceedings of the Twenty-Third SIGCSE Technical Symposium on Computer Science Education, 1992. [6] Tori, R., Bernardes, J. L., and Nakamura, R., Teaching introductory computer graphics using java 3D, games and customized software: a Brazilian experience, ACM SIGGRAPH 2006 Educators Program, 2006.