Using a Dataflow Language and the World Wide Web for Scientific Visualization
Total Page:16
File Type:pdf, Size:1020Kb
Using a Dataflow Language and the World Wide Web for Scientific Visualization HELEN M. DOERR 1• * and BRUCE R. LAND 2 1 Mathematics and Mathematics Education, 215 Carnegie Hall, Swacuse University, Syracuse, New York 13244-1150, and 2Cornell Theory Center, 606 Frank H. T. Rhodes Hall, Cornell University, Ithaca, New York 14853; e-mail: [email protected] and [email protected] ABSTRACT The visual programming language Data Explorer has been a powerful tool for teaching and learning introductory computer graphics. The World Wide Web was introduced as a mechanism for providing students with lab exercises, sample programs, and related course material, and as a site for the publication of their final design projects. © 1996 John Wiley & Sons, Inc. INTRODUCTION course in computer graphics being taught at Cornell University. The past decade of technological advances in high For the past 2 years, an undergraduate course in performance computing and communications has computer graphics with an associated lab course brought dramatic improvements simultaneously in has provided students with an introduction to the the infrastructure for accessing networks and in the principles of interactive computer graphics and sci performance of desktop workstations. Within the entific visualization. More recently, we have created past 2 years, the advent of the supporting protocols a Web site for the course to serve as an on-line for the World Wide Web (WWW) and browsers resource for the students to review lab procedures such as NCSA Mosaic and Lynx have resulted in an and results. From the first day of the course, the explosion of resources on the national information students have access to all the information about superhighway. At the same time, these tools now the tasks that will be done throughout the course. offer new opportunities for undergraduate science More important, the final design projects (described and mathematics education in a collaborative, net below) from the previous offerings of the course worked environment. These tools are beginning to are now available to the students and provide ideas change not only what we teach, but how we teach, and building blocks for their projects. Thus, the and they suggest new roles and new opportunities accomplishments of the students from each prior for both students and teachers within an expanded semester become part of the knowledge created classroom [1]. In this article, we describe how this through the course and an available resource for the has happened in an interdisciplinary, undergraduate next semester. In addition, the Web site provides linkages to the Cornell Theory Center's Data Ex plorer repository and on-line tutorial system (at * To whom correspondence should be addressed. Computer Applications in Engineering Education, Vol. 4(2) http:/ /www.tc.cornell.edu:80/DX/). These mod 161-168 (1996) ules and tutorials become part of an expanded set © 1996 John Wiley & Sons, Inc. CCC I 061-3773/96/020161-08 of classroom resources for the students, providing 161 162 DOERR AND LAND alternative paths for exploring the material covered lists, by parametric operations, and by hierar by the class instructor. chic grouping of simple objects to form com Scientific visualization is a way of organizing plex surfaces numerical results in a form which is accessible to Modification of objects by three-dimensional humans. The human visual system is extraordinary geometric transforms to animate their motion in its ability to understand complex images. Visual Viewing of a group of objects including clip ization uses this innate ability to find patterns in ping to a window and perspective or parallel data of all kinds, from satellite imagery to quantum projection into a two-dimensional screen space field simulations. As visualization techniques be Rendering of polygonal and parametric sur come simpler and more accessible, applications faces by hidden surface removal, by shading/ abound in traditional engineering and science lighting, by antialiasing, as well as by surface courses. This course is a first step in making visual property modifications such as texture- or ization techniques available to undergraduates. The bump-mapping students who take this course are primarily upper division science and engineering majors. It should Use of global illumination models to render be possible to construct a freshman-level course us interactions between surfaces ing DX which introduces computer graphics and Modeling of scientific data for scientific visual visualization at an appropriate mathematical level ization. and it would whet student appetites for further in struction. About half the students are from computer In addition to traditional lectures using the work science, the department that gives the course. The of Foley and van Dam [ 4] and Watt [5], the stu rest are distributed among electrical and mechanical dents engage in a range of practical, hands-on expe engineering, physics, mathematics, chemistry, and riences. Each student completes eight lab exercises architecture. This diversity in student majors is re and a final design project of his or her own choosing. flected in the final design projects developed by the Each lab exercise contains both sample programs students. By way of example, Figure 1 illustrates to introduce the concepts and related descriptive the projectile motion of a basketball being thrown material about the manipulations required of the by a robot. Over the last 2 years, at least a fifth of student. All work is based on Web documents which the students taking the course either have gone on explain the lab procedure, show examples, and sup to work in research labs using scientific visualiza ply source code. Currently the exercises cover basic tion or have followed up with independent research computer graphic rendering and introductory scien projects. Examples of these projects can be found tific visualization. The first exercise shows the stu on-line at http: I /www.tc.cornell.edu/Visualization/, dent how to specify a polyhedron by specifying the and then following any of the three years worth of vertices and the polygonal faces of polyhedra. The CS490 links in the Education section. These proj students are expected to design a tfox and a simple ects serve as useful documentation for anybody at propeller and animate the box opening and the pro tempting to learn the functionality of DX. peller spinning. Specifying every vertex in a com plex scene is impractical, so the second exercise illustrates how to use parametric operations to pro GRAPHICS TECHNIQUES FOR duce complex objects (e.g. torus or horn) by mathe SCIENTIFIC VISUALIZATION matical operations on a fiat sheet. The operations may generate quadric surfaces, surfaces of revolu Scientific visualization is a topic that requires math tion, or translation surfaces. The students are ex ematical, programming, and artistic skills, along pected to construct a beverage bottle mathematically with content knowledge in a specific domain of sci and to animate a spring/mass system. To increase ence or engineering. This introductory computer scene complexity further, the third exercise demon graphics course focuses on the mathematical skills, strates how to combine predefined, simple objects but also includes both programming to illuminate (polyhedra or parametric surfaces) into hierarchic the mathematics and applications in science and en objects. An example might be a robot with fingers gineering. The course, described more fully else made of cylinders, attached to an arm made of where [ 2,3], covers the following topics: blocks, attached to a body which again is a cylinder (Fig. 1). The students must build one of several · Construction of surfaces by explicit polygon objects and animate it. This year the list included a DATAFLOW LANGUAGE AND WORLD WIDE WEB 163 helicopter, a wagon, a robot, or a bird. Each of to design an animation of their choice. There were these objects had a required set of motions it had only a few constraints: The animation had to use a to perform. selection of techniques taught in the course. The By this point in the course the students can build animation had to have a title frame which included very complex scenes, so the emphasis turns from the authors' names and a copyright notice. The ani building objects to the process of converting those mation had to use MPEG compression for final stor objects into pictures on a computer screen. The age. Students worked in groups of two and each fourth exercise shows the students how to move a person was expected to put in about 25 hours on computer-graphic "virtual camera" around in the the project. The resulting animations show a huge scene, just as a real videotape recorder must be diversity. Some were artistic, others were scientific. moved through a room. They are introduced to the The complexity and sophistication of many of the concepts of camera motion and of using a camera projects can be amazing. The Web location http: I I to produce an image which itself becomes part of www. tc .cornell.edu1Visualizationlcontriblcs418- the final picture. The students must produce a TV sp941cs418.html has several examples of student camera and TV monitor. The TV monitor displays work. Figures 2-4 illustrate some of these examples. what the TV camera is looking at. Both must be At the introductory level, the lack of program visible in the final picture. The fifth exercise contin ming tools often interferes with learning graphics ues on