Chapter 4 Vector Graphics Multimedia Systems. Key Points  Points can be identified by coordinates. Lines and shapes can be described by equations. 

Slides:



Advertisements
Similar presentations
Virtual Realism TEXTURE MAPPING. The Quest for Visual Realism.
Advertisements

03/16/2009Dinesh Manocha, COMP770 Texturing Surface’s texture: its look & feel Graphics: a process that takes a surface and modifies its appearance using.
Chapter 3 Drawing and Composing an Illustration. Objectives Draw straight lines Draw curved lines Draw elements of an illustration Apply attributes to.
3D Graphics Rendering and Terrain Modeling
Informationsteknologi Wednesday, November 7, 2007Computer Graphics - Class 51 Today’s class Geometric objects and transformations.
Chapter 7 Creating Graphics. Chapter Objectives Use the Pen tool Reshape frames and apply stroke effects Work with polygons and compound paths Work with.
Modelling. Outline  Modelling methods  Editing models – adding detail  Polygonal models  Representing curves  Patched surfaces.
Chapter 4 Digital Multimedia, 2nd edition Vector Graphics.
(conventional Cartesian reference system)
SWE 423: Multimedia Systems Chapter 4: Graphics and Images.
Introduction to Computer Graphics
Vector vs. Bitmap SciVis V
V Obtained from a summer workshop in Guildford County July, 2014
Guilford County Sci Vis V204.01
Graphics: Creating Images Chapter 8, Exploring the Digital Domain.
MULTIMEDIA TECHNOLOGY SMM 3001 MEDIA - GRAPHICS. In this chapter how the computer creates, stores, and displays graphic images how the computer creates,
3D Concepts Coordinate Systems Coordinates specify points in space 3D coords commonly use X, Y, & Z A vertex is a 'corner' of an object Different coordinate.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
Introduction --Classification Shape ContourRegion Structural Syntactic Graph Tree Model-driven Data-driven Perimeter Compactness Eccentricity.
Curve Modeling Bézier Curves
1 Computer Graphics Week13 –Shading Models. Shading Models Flat Shading Model: In this technique, each surface is assumed to have one normal vector (usually.
University of Illinois at Chicago Electronic Visualization Laboratory (EVL) CS 426 Intro to 3D Computer Graphics © 2003, 2004, 2005 Jason Leigh Electronic.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Chapter 10: Computer Graphics
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 10: Computer Graphics Computer Science: An Overview Tenth Edition.
Vector vs. Bitmap
Introduction to Textures and Skins Chapter 8 & 9 3D Game Programming All-in-One By Ken Finney.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
Chapter 6 Working with Patterns and Brushes. Objectives Use the Move command Create a pattern Design a repeating pattern Use the Pattern Options panel.
INT 840E Computer graphics Introduction & Graphic’s Architecture.
Copyright © Curt Hill Visualization of 3D Worlds How are these images described?
Game Programming 06 The Rendering Engine
Digital Media Lecture 8: Vector Graphics 3D Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Digital Media Dr. Jim Rowan ITEC 2110 Vector Graphics II.
Vector Graphics Digital Multimedia Chap 이병희
Digital Media Dr. Jim Rowan ITEC So far… We have compared bitmapped graphics and vector graphics We have discussed bitmapped images, some file formats.
Digital Media Dr. Jim Rowan ITEC 2110 Vector Graphics II.
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 4 Lecture 4 - Vector Graphics.
RENDERING Introduction to Shading models – Flat and Smooth shading – Adding texture to faces – Adding shadows of objects – Building a camera in a program.
CS 325 Introduction to Computer Graphics 04 / 12 / 2010 Instructor: Michael Eckmann.
Digital Media Dr. Jim Rowan ITEC 2110 Thursday, September 13.
CISC 110 Day 3 Introduction to Computer Graphics.
Creating Vectors – Part One 2.02 Understand Digital Vector Graphics.
Digital Media Dr. Jim Rowan ITEC Vector Graphics Elegant way to construct digital images that –have a compact representation –are scalable –are.
Chapter 8 Engineering Geometry
Digital Media Lecture 5: Vector Graphics Georgia Gwinnett College School of Science and Technology Dr. Jim Rowan.
Guilford County SciVis V104.03
UNIT 11: 3D AutoCAD Objectives: How to print or plot a drawing How to setup a layout using title blocks and viewports Create and manage new layouts Be.
CS 376 Introduction to Computer Graphics 04 / 13 / 2007 Instructor: Michael Eckmann.
Mohammed AM Dwikat CIS Department Digital Image.
Computer – Aided Design Terminology You must have a generic understanding of commands and techniques which are used in a number of packages (YOU CANNOT.
Digital Media Dr. Jim Rowan ITEC 2110 Vector Graphics II.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
Main characteristics of Vector graphics  Vector graphics provide an elegant way of constructing digital images (diagrams, technical illustration and.
IS502:M ULTIMEDIA D ESIGN FOR I NFORMATION S YSTEM D IGITAL S TILL I MAGES Presenter Name: Mahmood A.Moneim Supervised By: Prof. Hesham A.Hefny Winter.
Chapter 10: Computer Graphics
Vector vs. Bitmap.
CSI-447: Multimedia Systems
POLYGON MESH Advance Computer Graphics
Dr. Jim Rowan ITEC 2110 Wednesday, September 12
IMAGES.
3D Graphics Rendering PPT By Ricardo Veguilla.
Chapter 10: Computer Graphics
2.02 Understand Digital Vector Graphics
Digital Media Dr. Jim Rowan ITEC 2110.
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Creating Vectors – Part One
Dr. Jim Rowan ITEC 2110 Vector Graphics II
Presentation transcript:

Chapter 4 Vector Graphics Multimedia Systems

Key Points  Points can be identified by coordinates. Lines and shapes can be described by equations.  Approximating abstract shapes on a grid of finite pixels leads to `jaggies'. Anti-aliasing can offset this effect.  Bezier curves are drawn using four control points.  Bezier curves can be made to join together smoothly into paths.  Paths and shapes can be stroked and filled.  Geometrical transformations — translation, scaling, rotation, reflection and shearing — can be applied easily to vector shapes.

Key Points  Three approaches to 3-D modelling are: constructive solid geometry, free-form modelling and procedural modelling.  3-D rendering models the effect of light and texture, as well as displaying the modelled objects in space.  Ray tracing and radiosity are computationally expensive rendering algorithms that can produce photo-realistic results.  Specialized 3-D applications, such as Bryce and Poser, are easier to use, and may be more efficient, than more general 3-D modelling and rendering systems.

Introduction  Vector Graphics –Compact –Scaleable –Resolution independent –Easy to edit –Attractive for networked multimedia

Introduction  The compactness of vector graphics makes them particular attractive for network multimedia, since the large sizes of the images files lend to excessive download times.  Absence of any standard format for vector graphics prevents it from popularization. –As SVG and SWF standards are adopted, this will change.

Introduction  In vector graphics, images are built up using shapes that can easily be described mathematically.  Vector graphics has been eclipsed ( 衰 退 ) in recent years by bitmap graphics for 2D images.  Vector graphics is mandatory ( 強制性 ) in 3D graphics, since processing voxels is still impractical in modern machines.

Coordinates and Vectors  Image stored as a rectangular array of pixels.  Coordinates (x,y), Fig. 4.1 –Integer  Real coordinate, (2.35, 2.9), Fig. 4.2  Drawing programs allow to display axes (ruler) along edges of your drawing  Vectors  Approximating a straight line, Fig. 4.4

Coordinates and Vectors A B O A(3,7) B(7,3) O(0,0)  Points

Coordinates and Vectors  Lines

Anti-aliasing  Approximating a straight line  Using intermediate grey values  Brightness is proportional to area of intersection  At the expense of fuzziness

Shapes  A simple mathematical representation –Stored compactly and rendered efficiently  Rectangles, squares, ellipses and circles, straight lines, polygons, Bezier curves –Spirals and stars, sometimes  Fills with color, pattern or gradients

 Polylines  Rectangles  Ellipses  Curves

Hermite parametric cubic curves C = C(t) = a 0 + a 1 t+ a 2 t 2 + a 3 t 3 – Four vectors a 0, a 1, a 2, a 3 (12 coefficients, 3D) are required to define the curve. – Usually these vectors can be specified by curve’s behavior at end points t=0 and t=1 Assume endpoints C(0), C(1) tangent vectors, C’(0), C’(1) are given, then a 0 = C(0) a 0 + a 1 + a 2 + a 3 = C(1) a 1 = C’(0) a 1 +2 a a 3 = C’(1) Hermite Curves

a 0 = C(0) a 1 = C’(0) a 2 = 3( C(1) - C(0)) - 2C’(0) - C’(1) a 3 = 2 ( C(0) - C(1)) + C’(0) + C’(1) C(t) = (1-3t 2 + 2t 3 ) C(0) + (3t 2 -2t 3 ) C(1) + (t - 2t 2 + t 3 ) C’(0) + (-t 2 + t 3 ) C’(1)) C(t) = [1 t t 2 t 3 ] C (0) C (1) C’(0) C’(1) T0T0 T1T1

Bezier Curves Given four control points b 0, b 1, b 2, b 3, then the corresponding Bezier curve is given by C(t) = (1-t) 3 b 0 + 3t(1-t) 2 b 1 + 3t 2 (1-t)b 2 + t 3 b 3 C’(t) = -3(1-t) 2 b 0 + 3(1-4t+3t 2 )b 1 + 3(2t-3t 2 )b 2 + 3t 2 b 3 C(0)=b 0 C(1)=b 3 C’(0)=3(b 1 -b 0 ) C’(1)=3(b 3 -b 2 )

Bezier Curves C(t) = [1 t t 2 t 3 ] b b b b 3 b0b0 b1b1 b2b2 b3b3

Bezier Curves  Four control points –Two endpoints, two direction points –Length of lines from each endpoint to its direction point representing the speed with which the curve sets off towards the direction point –Fig. 4.8, 4.9

Bezier Curves –Constructing a Bezier curve  Fig  Finding mid-points of lines

Bezier Curves –Figs  Same control points but in different orders

Bezier Curves b0b0 b1b1 b2b2 b3b3 b01b01 b11b11 b21b21 b02b02 b12b12 b03b03

Bezier Cubic Curves x(t) = a x t 3 + b x t 2 + c x t + x 1 y(t) = a y t 3 + b y t 2 + c y t + y 1 p 1 = (x 1, y 1 ) p 2 =(x 1 + c x /3, y 1 + c y /3) p 3 =(x 2 + (c x + b x )/3, y 2 + (c y + b y )/3) p 4 =(x 1 + c x + b x + a x, y 1 + c y + b y + a y )

Smooth Joins between Curves  Fig. 20 –Length of direction lines is the same on each side  Smoothness of joins when control points line up and direction lines are the same length  Corner point –Direction lines of adjacent segments ate not lines up, Fig. 4.21

Changing a smooth curve to a corner and vice versa convert-anchor-point tool

Paths  Joined curves and lines  Open path  Closed path

 Each line or curve is called a segment of the path  Anchor points: where segments join  Pencil tool: freehand –Bezier curve segments and straight lines are being created to approximate the path your cursors follows –A higher tolerance leads to a more efficient path with fewer anchor points which may smooth out of the smaller movements you made with pencil tool

Stroke and Fill  Apply stroke to path –Drawing program have characteristics such as weight and color, which determine their appearance. –Weight= width of stroke –Dashed effects  Length of dashes  Gaps between them

Line Caps & Joins  Line cap –Butt cap –Round cap –Projecting cap  Line Joins –Miter –Rounded –Bevel

Fill  Most drawing programs also allow to fill an open path –Close the path with straight line between its endpoints –Flat color, pattern or gradients –Gradient: linear, radial –Texture

Fill  Pattern –Tiles: a small piece of artwork –Use pattern to stroke paths, a textured outline  Arrange perpendicular to path, not horizontally  Include special corner tiles  If you want to fill a path, you need to know which areas are inside it. (Fig. 4.27) –Non-zero winding number rule  Draw a line from the point in any direction  Every time the path crosses it from left to right, add one to winding number; every time the path crosses from right to left, subtract one from winding number  If winding number is zero, the point is outside the path, otherwise it is inside.  Depends on the path’s having a direction

Transformations and Filters  Transformations –Translations: linear movement –Scaling, rotation about a point –Reflective about a line –Shearing: a distortion of angles of axes of an objects

Filters  Free manipulation of control points  Roughening –moves anchor points in a jagged array from the original object, creating a rough edge on the object

 Scribbling filter –randomly distorts objects by moving anchor points away from the original object

 Rounding –converts the corner points of an object to smooth curves –Filter > Stylize > Round Corners  Only relatively few points need to be re- computed

3-D Graphics  Axes in 3D: Fig  Rotations in 3D: Fig. 4.36

3-D Graphics  Right-handed coordinate system, Fig  2D: define shapes by paths 3D: define objects by surfaces  Hierarchical modeling –A bicycle consists of a frame, two wheels, …

Rendering  In 3D, we have a mathematical model of objects in space, but we need a flat picture. –Viewpoint –Position of camera –Scaling with distance –Lighting: position, intensity, type  Interaction of light: underwater, smoke-filled room –Texture –Physical impossibilities: negative spotlights, absorbing unwanted light

3D Models  Constructive solid geometry –A few primitive geometric solids such as cube, cylinder, sphere and pyramid as elements from which to construct more complex objects –Operators: union, intersection, and difference, Figs –Physical impossibility

Free Form Modeling  Mesh of polygons  A certain regular structure or symmetry from 2D shapes –Treat a 2D shape as cross section and define a volume by sweeping the cross section along a path  Extrusion –To produce more elaborate objects  Curved path can be used  Size of cross section can be altered  Lathing

Procedural Modeling  Models described by equations  Fractals, Fig –Coastlines –Mountains –Edges of cloudy –Fig. 4.43, snowflake –Fractal mountainside, Fig. 4.44

Procedural Modeling  3D Fractals –Fig –Fractal terrain, Fig. 4.46

Procedural Modeling  Metaballs –Model soft objects –Fig –Complex objects can be built by sticking metaballs together  Particle systems –Features made out of many particles –Rains, fountains, fireworks, grass

Metaballs  Metaballs are also included and make a great addition to helping create base models for further editing. A Metaball can be used in either a positive or negative way in trueSpace 5.

Lightwave  Particle explosion  Particle Storm 2.0

Particle Storm 2.0

Rendering  Wire frame, Fig  Hidden surface removal  Surface properties –Color and reflectivity  Lights –Shading  A color for each polygon  Interpolate color –Gouraud shading –Phong shading: specular reflection

 Wireframe

 Backface removal

 Flat shading

 Gouraud shading

 Phong Shading with different material settings and shininess

 Ray tracing –Tracing the path of a ray of light back from each pixel, Plate 8 –Photo-realistic graphics –High-performance workstations  Radiosity –Interactions between objects –Model complex reflections that occur between surfaces that are close together

POV-Ray  Persistence of Vision Ray Tracer  Free

Radiosity  (a) Actual photo (b) Radiosity image  More accurately based on physics of light than other shading algorithms

Texture Mapping  Adding surface details –Mathematically wrapped over surface of object –Produce appearance of object  Bump mapping –Apply bumpiness or roughness and transparency mapping and reflection mapping, which modify the corresponding optical characteristics on the basis of a 2D map

 Planar Mapping  Mapping To A Cube

 Cylindrical Mapping  Spherical Mapping

Bump Mapping  St.Mattew head model is first simplified, reducing its geometry from 4 millions of faces (left) to just 5 hundreds (middle). The detail lost is then reproduced with an ad- hoc bumpmap (right). The resulting model is dynamically shaded, very similar to the original, but rendered incomparably faster.

Bump Mapping with Light Model

Specialized Types of 3D Graphics  Build a body out of arms and legs  Rendering engine can use algorithms that are optimized for the characteristic models produced within limits set by the modeller –MetaCreations Bryce for landscapes and Poser for human and animal figures

Bryce  Corel  Constructed from a grayscale image whose brightness represents height of 3D terrain model  Terrains can be based on an imported image, or one painted by hand; they can be generated using fractals or built from satellite data.  Sky, atmosphere, clouds, fog, haze, sun, moon, stars, rainbows

Poser  Curious Labs  Manikins ( 人體模型 )  Physically realizable: hand on a figure of a person cannot turn 360