110 likes | 194 Views
Introduction. Computer graphics (CG) is the use of a computer to define, store, manipulate, interrogate, and present pictorial output
E N D
Introduction Computer graphics (CG) is the use of a computer to define, store, manipulate, interrogate, and present pictorial output • Essentially a passive operation (computer prepares and presents stored information to an observer in the form of pictures. The observer has no direct control over the picture being presented) End product of computer graphics is a picture/image The subject studies HOW: • Pictures are represented in CG • Pictures are prepared for presentation • Previously prepared pictures are presented • Interaction with the picture is accomplished
Graphics Subfields The study of computer graphics can be partitioned into three subfields. • Modelling Mathematical specification of shape and appearance, i.e. creating and representing the geometry of objects in the 3D world • Renderingcreating a image in 2D of these objects • Animation A technique to create the illusion of motion by time-sequencing rendered images.
Applications • Video games: simulations without the need for high accuracy. • Movie special effects such as digital compositing (superimposed backgrounds with separately filmed foregrounds) or computer-generated foregrounds. The first full-length computer-generated film was Toy Story in 1994. • CAD/CAM (Computer-aided Design/Manufacturing): mechanical parts and products are designed by a 3-D modeling package and produced by a computer-controlled milling machine. • Simulation • Medical imaging: creation of shaded images from scanned patient data. • Visualization • Paint programs, Art • Word processing and desktop publishing • Business graphics: graphs and charts • GUI's
Image Representation • Pixel / Picture Elements: A digital image is composed of discrete pixels. These pixels are arranged in a row-and-column fashion to form a rectangular picture area, sometimes referred to as raster • Resolution of an image: Number of pixels per unit length is referred to as the resolution of the image • Aspect Ratio: Ratio of an images’ width to its height, measured in unit length or number of pixels
Image Representation (cont’d) • Individual pixels can be referenced by their coordinates. Typically, the pixel at lower left corner of an image is considered to be at (0, 0) of a pixel coordinate system (0, 0) • Task of composing an image on a computer is a matter of setting pixel values. The collective effects of the pixels taking on different colour attributes give us what we see as picture
Colour Models • A colour model is a method for explaining the properties or behaviour of colour within some particular context. E.g. RGB, CMY, YIQ, HSV, HLS • RGB Colour Model • Used by video-monitors • Additive colour model
RGB • Represent this model with the unit cube defined on R, G and B axes (coordinate system with three primary colours) • Each colour can take an intensity value ranging from 0 to 1 • Mixing three primary colours at different intensity level produces a variety of colours. Collection of all colours obtainable by such a linear combination of r, g, b forms the cube-shaped RGB colour space • Origin represents black and vertex with coordinates (1, 1, 1) is white. Vertices of the cube on the axes represent the primary colours, and the remaining vertices represent the complementary colour for each primary colour • Any arbitrary colour is specified by (r, g, b) colour coordinates • Main diagonal between black and white corresponds to varying shades of gray. Each point along this diagonal has an equal contribution from each primary colour
CMY • CMY Colour Model • Useful for describing colour output to hard-copy devices. • Subtractive process (r, g, b) = (1, 1, 1) – (c, m, y); (c, m, y) = (1, 1, 1) – (r, g, b);