CSCI 120 Computer Graphics and Visualization Shiaofen Fang Department of Computer and Information Science Indiana University Purdue University Indianapolis What is computer graphics? Computer graphics is concerned with Producing pictures using computer. Creating pictures (modeling) Presenting pictures (rendering) Interacting with pictures The field of computer graphics Methods and Principles (geometry, physics, optics, etc.) Algorithms and data structures Software/hardware tools Applications 1
3D computer graphics paradigms: Traditional (this course): modeling rendering user interface Modeling Rendering Other paradigms Data visualization image-base rendering Computer graphics vs. image processing/vision graphics Models pictures Image processing/vision Computer graphics applications Entertainment: movie production, animation, special effects, games, Presentation: Web, e-commerce, publishing, computer art, advertisement, education. Design: CAD/CAM, ECAD, fashion design, architectural design. Simulation: complex experiments, flight simulation, surgical simulation, traffic control, power plants, etc. Graphical user interface(gui): bitmap window systems, interface tools, VR systems. Scientific visualization: biological image analysis, medical diagnosis, weather data, satellite data, remote sensing, NASA data, simulation data, etc. 2
Geri's Game : Pixar Typical raster graphics system Graphics processor Input devices memory Frame Buffer D/A converter Monitor (CRT) CPU Graphics processor: a specialized processor for geometric and graphical display operations. 3
Frame buffer Pixel: the smallest screen unit that can be lighted with a color value independently Raster: 2D array of pixels Frame buffer : a 2D array of memory cells made of high speed memory chips, corresponding one-to-one to the raster. Frame buffer cell: the frame buffer memory cell (often called pixel as well) 1 bit: black and white images 8 bits: 256 colors or color index 24 24 bits: 2 RGB colors Red (8 bits) Green (8 bits) Blue (8 bits) 2 32 32 bits: RGBA colors Synthetic image formation Object modeling: 3D geometric models graphics primitives material and optical properties View independent Lighting: Lights ray tracing model Synthetic camera model 4
Synthetic camera model Viewing plane Center of Projection (COP) Object model Graphics architecture Graphics pipeline Scene modeling Viewing transformation clipping Projection Rasterization Graphics API Application programs Graphics API Low-level graphics system application programs OpenGL window systems Operating systems 5
OpenGL examples A simple rotating cube example OpenGL Resources: http://www.opengl.org/ Rendering Rendering hierarchy: rendering methods using different shading models that approximate physical lighting process at different levels, leading to different levels of realism. 1. Wireframe: draw edges only, hidden lines may and may not be removed. 2. Flat shading: each face is shaded uniformly, i.e. drawn with the same color. 3. Smooth shading: different points are shaded differently using an interpolation technique. 4. Special effects: shadowing, texture mapping. 6
7
8 Shading The total amount of light that reaches the eye from a point:,0) max(,0), max( m h m h P m s m s L where f s s d d a a P I L I I I
Global illumination Global illumination model: lights that reach a point by reflection from or transmitted through other objects are also considered in shading computation. Graphics pipeline architecture is not suitable Ray-tracing model: tracing the light rays coming to the eye backwards. to eye Examples 9
Radiosity Light Energy Conservation: in a closed environment (enclosure), light energy emitted or reflected by each surface will be reflected or absorbed by other surfaces in the same enclosure. Radiosity method first determines all light interactions in an enclosure in a view independent way, and then renders the scene from different view points. Radiosity is treated the same as color intensity in the rendering process. 10
What Is Visualization? Visualization: transformation of data/information into pictures Scientific Visualization Data from science, engineering, medicine, etc. Is a method of computing: exploration, simulation, discovery, insight. Data are usually homogeneous with predefined spatial structures. Information Visualization Abstract Data: WWW documents, file structures, relationships, financial data, etc. Usually heterogeneous without spatial structures. 22 11
Examples Terrain geometry: Terrain Texture: (10,20,21), (12,13,14), (13,32,12),..., (1,2,3), (2,4,5),(3,5,6),... (23,34,54), (23,34,23), (45,26,78),... Time 0: Volumetric cloud cover: 0, 0, 12, 14, 15, 15, 17, 12, 23, 45,... Wind vectors: (0.2, 0.3, 0.93,5), (0.4,0.5,0.76,12),..., Time 1: Volumetric cloud cover: 0, 0, 11, 12, 13, 16, 20, 12, 32, 45,... Wind vectors: (0.4,0.5,0.76,12),(0.5,0.5,0.7,6),... 24 12
Train schedule Paris-Lyon, 1880s 25 26 13
Napoleon s Russia campaign, 1812, plots 6 variables on a 2D graph 27 Graphical Display (example) fear-rage graph 28 14
Graphical Integrity -- What To Avoid In Visualization The Lie Factor = Size of effect shown in Graphic Size of effect in Data Example: fuel economy standards 29 Visual Perceptions Visual Memory is Limited We are sometimes not very sensitive to small visual changes Visual perception can be influenced contrast and surrounding environment 30 15
How many black dots? 31 Seeing parallel lines 32 16
Visualization Design Data Filtering Visual Mapping View Selection and Interactions Aesthetics in Visualization Metaphor in Visualization 33 Data Filtering Determining the optimal amount of information a certain visualization process can handle. Two approaches 1. Let the users choose the data scale to visualize 2. Multi-view or multi-display 34 17
Visual Mapping People s prior knowledge can help visual perception From data elements to visual elements 35 The Wind Map 36 18
View Selection and Interaction Visual Interaction Zoom and Roll Controlling color mapping. Controlling visual mapping of data. Data zooming and filtering Level of Detail control 4D data visualization using scatter plot and parallel coordinates 37 Aesthetics in Visualization Focus Balance Simplicity - Labels - Networks - Color 38 19
Visual Metaphor A visual metaphor maps the characteristics of some well understood source domain to a more poorly understood target domain (data) so as to render aspects of the target understandable in terms of the source. 39 Trees 40 20
Rivers 41 Ferris Wheel 42 21
Sunflower 43 Scientific Data Scanning devices: Biomedical imaging Surface scanners Geographic sensors Computation (mathematical) processes Simulation Computational fluid dynamics Measuring weather, satellite, statistical data, etc. 44 22
45 Information Visualization Visualization of abstract information structures An appropriate visual representation of information needs to be carefully designed Visual navigation and manipulation tools need to be provided. Often combined with data exploration/data mining techniques. 46 23
Parellel Coordinates 47 Scatter Plot Matrix 48 24
Treemap : file system 49 Cone Tree 50 25
Graph Graph: Arc Diagram 26
Story-Flow: Inception 53 Wordle: http://www.wordle.net I Have a dream Wordle 27