* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download ch01
Survey
Document related concepts
List of 8-bit computer hardware palettes wikipedia , lookup
Color vision wikipedia , lookup
Stereo photography techniques wikipedia , lookup
InfiniteReality wikipedia , lookup
Computer vision wikipedia , lookup
Ray tracing (graphics) wikipedia , lookup
Tektronix 4010 wikipedia , lookup
Anaglyph 3D wikipedia , lookup
BSAVE (bitmap format) wikipedia , lookup
Framebuffer wikipedia , lookup
Spatial anti-aliasing wikipedia , lookup
Image editing wikipedia , lookup
Rendering (computer graphics) wikipedia , lookup
Stereoscopy wikipedia , lookup
Hold-And-Modify wikipedia , lookup
Transcript
CAP 4703 Computer Graphic Methods Prof. Roy Levow Lecture 1 Computer Graphics Broadly concerned with producing images by computer Many applications – Still image generation and editing – Animation and film, Computer games – Design – Scientific and medical data visualization – Simulation and Virtual reality – Publishing, … Graphical System Main Components 1. 2. 3. 4. 5. Processor Memory Frame Buffer Output Devices Input Devices Processor and Memory Depending on the application, the system can range from Capable personal computer to a Super-computer Image Output Images may be – Vector graphics Formed by drawing lines to create image – Raster graphics Composed of individual picture elements in an array or raster Individual elements are pixels Stored in a frame buffer Raster graphics is most common – Vector graphics provides better scalability Graphic System Diragram Frame Buffer Normally – Video RAM (VRAM) – designed to support fast transfer of large amounts of data – Dynamic RAM (DRAM) Number of bits per pixel is the depth of the frame buffer – Determines number of distinct color values B&W=1 Full color >= 24 Frame Buffer .2 True RGB color systems are also known as – Number of bits per pixel is divided by 3 – Each group represents one of the colors Red, Green, Blue Resolution is the number of pixels per frame buffer – Usually reported as width x height Frame Buffer .3 To reduce number of bits per pixel, a color buffer may be used – Color buffer holds actual RGB values – Frame buffer holds index into color buffer – Reduces size when number of colors used is small relative to total number possible Rasterization Example Grapihic Processor Processing of graphic information may be done by – Normal CPU – Specialized Graphic Processor High performance graphic display systems generally use separate graphic processor – Optimized for image processing and display Specialized throughput operations and high data Output Devices Previously, most common output device was the cathode-ray tube or CRT – Image is created by a moving electron beam that causes a coating on the tube face to glow – Most commonly CRT scans a line at a time across the screen But may be random scan CRT Operation CRT The image is not retained but must be refreshed (recreated) periodically – Most commonly at least 50 times per second This Scan is the refresh rate lines may be produced consecutively, non-interlaced Or half at a time, interlaced Color CRT Each screen pixel consists of three closely spaced color dots, a RGB triad Shadow mask helps focus electron beam on a single dot Color CRT Image LCD Display Each pixel is a layered solid state device that can be turned on or off to produce that color component Generally cannot support as rapid refresh as CRT Input Devices Keyboard Pointing devices – Mouse – Joystick – Game console – Data tablet Images Physical image is generated by physical object Computer graphic systems generate synthetic image – Produced by program Objects and Viewers World is populated with three dimensional objects How object is seen depends on relationship to viewer and other attributes Generally a viewer can see only some parts of an object Different relationships between object and viewer can produce different images Views of an Object Camera System to Define Image Light Without light all would be uniformly black Light makes images visible and changes features through – Intensity – Color – Direction Interaction with light is complex Camera withLight Light: Electromagnetic Radiation Light Visible spectrum has wavelengths between 350 nm and 780 nm Color depends on wavelength – Blue ~450 nm – Green ~520 nm – Red ~650 nm Modeling Light Geometric Optics – Light assumed to come from point source – Fixed intensity – Travels in straight lines Assume monochromatic (single color) More complex sources can be viewed as collection of point sources Ray Tracing Effect of light can be viewed by following ray from source to viewer Light travels in straight line until it hits surface Surface point then acts as new point source Ray behavior determined by trig laws Infinite possibilities but only those that reach viewer matter Ray Tracing Radiosity When surface scatters incoming light in all directions, ray tracing does not produce accurate results – Energy conservation based calculation is more accurate but also more computationally intensive Human Visual System Light enters eye through lens Focused on retina at back of eye Retina contains light sensitive cells – Rods – brightness only – Cones – three kinds for three colors – RGB cones allow RGB displays to function Sensitivity is not uniform Sensitivity Curves Pinhole Camera A simple model of a camera – Assumes light enters through a pin hole Small enough that only one ray enters in any direction Pinhole Camera Image Can calculate point where ray from point source is projected on back of camera yp = -y/(z/d), similar for x Pinhole Camera Image .2 Point at back of camera is called the projection of the source Field or angle of view is angle made by triangle from lens to image plane Θ=2 arctan(h/2d) Imaging System Synthetic Camera Model Standard approach for threedimensional computer graphics Compute image that would be captured by bellows camera – Bellows allows depth of camera to be changed as desired Image is formed on projection plane, where back of camera would be Views of Image Formation Synthetic Camera Image Clipping Window or Rectangle Determines the image the edge boundaries of Programmer’s Interface Visual interface – Allows image creation by arranging visual components Programming interface – Function library – Application Programmer’s Interface (API) Defines available operations Images build combining operations Paint Program Interface Pen-Plotter Model Typical of early vector drawing systems Move pen from point to point drawing lines to create image moveto(0, 0); lineto(1, 0); lineto(1, 1); lineto(0, 1); lineto(0, 0); Pen-Plotter Image Adding additional lines could produce the image of a cube Pen-Plotter Model Limited functionality Difficult to produce threedimensional images Three-Dimensional APIs Synthetic – OpenGL – PHIGS – Direct3D – VRML – JAVA-3D Camera model is common 3-D API Components Objects Viewer Light Sources Material Properties Primitive Objects Points Line segments Polygons Text Curves Surfaces OpenGL Object Definition List of components bounded by function calls A triangle glBegin(GL_POLYGON); glVertex3f(0.0, 0.0, 0.0); glVertex3f(0.0, 1.0, 0.0); glVertex3f(0.0, 0.0, 1.0); glEnd(); Camera or Viewer Specification attributes – Position – Orientation – Focal length – Film plane requires a number of Camera Specification Sequential Design Process Images are usually generated as a sequence of successively more refined images See color plates 1-8 in text Model-Rendering Paradigm Graphic Architectures Display Processors Pipeline Architectures Transformations Clipping Projection Rasterization