http:^^www.tc.cornell.edu^edu^articles^ctc.dxarticle.html

来自「This data set contains WWW-pages collect」· HTML 代码 · 共 283 行

HTML
283
字号
Date: Sun, 24 Nov 1996 23:09:55 GMTServer: NCSA/1.5Content-type: text/htmlLast-modified: Fri, 28 Oct 1994 20:37:32 GMTContent-length: 12230<TITLE>Forefronts Teaching Computer Graphics with DX article</TITLE><H3><IMG SRC="/Logos/ctc.logo.sm.gif"> Cornell Theory Center<hr></H3><i>This article originally appeared in Cornell Theory Center'sForefronts newsletter.  </i><H2> <DL> <DT> Teaching Computer Graphics and ScientificVisualization using the Dataflow Block Diagram Language DataExplorer</DL> </H2>by Bruce Land, Visualization Project Leader, Cornell Theory Center  <P><H3>Abstract</H3>The scientific visualization language DataExplorer (DX) from IBM hasbeen found to be useful in undergraduate education as a vehicle forteaching computer graphics at an introductory level. Although it isdesigned for scientific data visualization, DX can be used toconstruct student lab exercises in computer graphics. DX has been usedfor two years as an environment which emphasizes graphicsmanipulations (e.g. rotation, perspective) while not requiring theprogramming overhead of traditional computer languages.  <P><H3>Introduction</H3>Computer graphics is a topic that requires mathematical, programming,and artistic skills, among others. The content of the computergraphics fundamentals course at Cornell focuses on mathematical skillsbut must include programming to illuminate the math. The course coversthe following topics:<UL><LI>   Construction of surfaces by explicit polygon lists, by parametricoperations, and by hierarchical grouping of simple objects to form complexsurfaces<LI>   Modification of objects by 3D geometric transforms in order to positionthem in space and animate them<LI>   Viewing of a group of objects including clipping to a window andperspective or parallel projection into a 2D screen space<LI>   Rendering of polygonal and parametric surfaces by hidden surface removal,shading/lighting, by anti-aliasing, as well as by surface propertymodifications such as texture- or bump-mapping <LI>   Use of global illumination models to render interactions betweensurfaces<LI>   Modeling of scientific data for scientific visualization.</UL>The programming aspect of the course attempts to give students practicalexperience with many of the techniques taught in lecture. Lab exerciseswritten in DX cover nine computer graphics topics. These exercises include:<UL><LI>   construction of polyhedra from vertex and face descriptions;<LI>   construction of parametric surfaces including quadric surfaces (e.g.ellipsoids), figures of rotation, and tensor-product surfaces (e.g.bilinear);<LI>   hierarchical modeling and animation of complex objects; <LI>   writing perspective viewing transforms;<LI>   comparing lighting techniques with wire frame, flat shaded, or Gouraudshaded objects illuminated with ambient and point illumination;<LI>   producing variations on the standard Phong lighting model, includingspotlights and bump mapping of surfaces;<LI>   image techniques including production of texture mapped surfaces, imagefiltering and anti-aliasing;<LI>   visualization of a 2D scalar field (heights of a landscape) and a 3Dvector field (a flow field); and<LI>   a design project to produce animation based on all the techniqueslearned.</UL>All exercises have example programs to introduce the concepts anddescriptions of the manipulations required of the student.  <P>The first two exercises deal with construction of objects and are anintroduction to DX. In the first exercise, students are introduced to thenotion of polyhedron construction with vertex and face lists. They areexpected to design a couple of polyhedra and perform a simple animation ofone object. They experiment with determining the normals to the surface.The second exercise introduces parametric surfaces. Students design quadricsurfaces, figures of rotation, and bilinear patches. After this lab theycan design quite complex single objects.  <P>Exercise three teaches them how to hierarchically combine objects and howto concatenate 3D transforms to make complex motion. They design either:<UL><LI>   a wagon that rolls forward, stops, then turns its front axle (andwheels);<LI>   a helicopter with main and tail rotors that starts the rotors, takes off,and flies away; or<LI>   a prop aircraft that behaves like the helicopter.</UL>When done correctly, the exercise shows them how to design parts of acomplicated object (e.g. props or wheels), move them, and duplicate themfor re-use several times in the final construction.  <P>In exercise four,  students turn off perspective in DX and write their own pseudo-perspective transform for a simple scene.This introduces the use of homogeneous coordinates and matrix manipulationin DX. The calculation is complicated enough to introduce the variousstructuring aids of DX which make the code more readable.<P>Exercises five and six explore lighting. Students first design a landscapeto be lit by two simulated suns, a white dwarf, and a red giant in twodifferent orbits. Then they turn off the default lighting model in DX(Phong illumination with Gouraud shading) and design their own lighting.They code a lighting model based on light positions, viewer position, andobject normals, and extend the model to produce a spotlight depth cueingbased on intensity.  <P>Exercise seven introduces image manipulation and filtering. Students areasked to anti-alias a simple scene using postfiltering and to determine a"best" scheme based on available filters and system resource (i.e. memory,CPU time). They then edge-enhance an image. Finally they texture-map animage onto a quadric surface by parametrically modifying the image pixelcoordinates. In DX, an image has extent in world space, with each pixelhaving a position.  <P>Exercise eight introduces scientific visualization by having the studentsmake judgments based on graphical representation of fields. The first partof this exercise is to identify the geographic location of a landscapeheight field, then to enhance the slope and exposure by modifying theprogram. The second part is to identify the sources and sinks in a 3Dvector flow field. They are shown how to draw flow lines, vector arrowicons, and isosurfaces of speed. They then combine these techniques to findthe sources and sinks.  <P>The final design project is to produce an animation of hierarchicallymodeled objects. Typical projects have included:<UL><LI>   a robot that stands up out of an ocean, turns, and fires a projectile ata tower on the far shore; <LI>   a seagull that flies down and plucks a fish from the water; <LI>   a castle with waving flags and drawbridge;<LI>   a car driving through a town with rotating signs and street lights;<LI>   a human walking;<LI>   simulation of the deformation of tennis racket strings during a ballimpact; and<LI>   morphing between faculty face images.</UL>The complexity and sophistication of many of the projects can be amazing.  <P><H3>DX as a Programming Language</H3>At the introductory level, lack of programming tools often interferes withlearning graphics operations. Typically, graphical operations are eitherprovided as a large library of routines that students must learn, or derivefrom relatively simple programming projects that students must code fromscratch. The block diagram interface of DX can be customized to make a"visual subroutine library" of often-used graphics routines. Students canconstruct very complex scenes including camera and lighting control in ashort time. They can also "open up" various visual subroutines and modifyor extend them. The graphical nature of the user interface and its easyextensibility make it possible for students to rapidly prototype a graphicsoperation, see the effects and modify the program. The structure of DX thatallows such easy interaction is described next.  <P>DX is a block diagram, point and click programming language designed forproducing high quality images based on 3D data which may represent objects(walls, stars) or fields (density, electric field). DX can easily beextended to construct the objects and perform the operations needed for anintroductory graphics class. The block diagram program is built up of"modules" and "wires" connecting them. A module is a primitive programfunction that appears on the screen as a block with input and output tabs.Wires are dragged with the mouse from outputs to inputs. A group of modulescan be hidden inside of another module to form a user "macro." Systemsupplied DX modules include vector and scalar field rendering, andgeometric operations (rotate, translate), in addition to x and y plotting.There is direct programming support for producing custom MOTIF control panels. The Theory Center has added modules to make parametric surfaces,texture maps, bumpmaps, spotlights, and a variety of other graphicallyoriented functions.  <P>Students are expected to design visual programs to perform some particularassigned task. They are expected to produce working programs that arereadable and documented. A visual language has a different style oforganization for readability than text-based code, but for programs biggerthan one screen wide, organization is no less important. Any module canhave a comment field and the Theory Center encourages a comment in all butthe most obvious modules. Programs tend to build an object of some kind(e.g. house) by defining its parts, combining them, and then moving them tosome position. Such a section of code tends to be small (perhaps 20modules) but cryptic unless the designer minimally labels the output of thecode block. DX supports labeling of wires to document what is flowingthrough them. In many cases a small code block can be made into a macro,which then appears to be another module with a user-chosen name. At somepoint objects have to be combined to make higher order structures. Carefularrangement of the hierarchical structure (which is all visual) helpsduring program tracing and debugging. We have found that, as with allprogramming, providing a few examples and a programming manual is aneffective way of introducing students to the subject matter.  <P><H3>Conclusions</H3>DX allows students to concentrate on learning the graphics content of thecourse rather than investigating the details of a programming environment.Students can generate code to make images in a fraction of the timerequired of a C language environment, encouraging experimentation. At thetime of writing, course evaluations are not yet available from students,but will be when this article appears in Forefronts. Preliminary studentfeedback indicates satisfaction with DX as a vehicle for learning graphics.The acquired background in computer graphics using DX is already being putto use in scientific visualization as students incorporate their classskills into research projects across campus. This year students in thecourse were mostly upper division computer science and engineering majors.It should be possible to construct a freshman-level course using DX whichintroduces computer graphics and visualization at an appropriatemathematical level and whets their appetites for further instruction. A downside to DX use in the classroom is that it requires a graphicsworkstation such as an IRIS Indigo, SPARC station, HP workstation, or RISCSystem/6000, not a Mac or PC, which is the hardware most readily availableto college and university students. Hopefully the trend of cheaperworkstations and more powerful personal computers will continue to open newpossibilities. Designing complex scenes in DX is easy enough that manyprojects put a large demand on the workstations for CPU and memory. Duringthe final project many of the students ran out of memory while using 32MByte machines. In most cases, scaling down the resolution of texture mapssolved the large size, but in a few cases the objects and motions becametoo complex.  <P>The lab exercise software plus student lab instructions are availableon-line from an anonymous ftp site at Cornell University(info.tc.cornell.edu).  Contact Bruce Land (bruce@tc.cornell.edu) for moreinformation.  <P>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?