- 计算机图形学:describes any use of computers to create and manipulate images
- 一般包括specific hardware, file formats, a graphic API
- 本书尽量避免依赖于任何特定硬件或API
- 本章内容:基础概念,历史背景,信息资源
Graphics Areas
major areas
- Modeling: deals with the mathematical specification of shape and appearance properties in a way that can be stored on the computer.
- Rendering: a term inherited from art and deals with the creation of shaded images from 3D computer models.
- Animation: a technique to create an illusion of motion through sequences of images.
other areas (maybe not core areas)
- User interaction: the interface between input devices to the user in imagery, and other sensory feedback.
- Virtual reality: attempts to immerse the user into a 3D virtual world.
- Visualization: attempts to give users insight into complex information via visual display.
- Image processing: deals with the manipulation of 2D images, is used in both the fields of graphics and vision.
- 3D scanning: uses range-finding technology to create measured 3D models.
- Computational photography: new ways of photographically capturing objects, scenes, and environments.
Major Applications
- Video games
- Cartoons
- Visual effects: modern films, some not real characters
- Animated films
- CAD/CAM: computer-aided design, computer-aided manufacturing
- Simulation: can be thought of as accurate video gaming
- Medical imaging: creates meaningful images of scanned patient data. 如computed tomography (CT)
- Information visualization
Graphic APIs
- API (application program interface): a standard collection of functions to perform a set of related operations
- graphics API: a set of functions that perform basic operation such as drawing images and 3D surfaces into windows on the screen
每个图形程序都需要两种API:
- a graphics API for visual output
- a user-interface API to get input from the user
目前的两种dominant paradigms for graphics and user-interface APIs:
- the integrated approach, 如Java, always fully standardized and supported as part of the language
- Direct3D and OpenGL, part of a software library tied to a language such as C++
Graphics Pipeline
- 3D graphics pipeline: a special software/hardware subsystem that efficiently draws 3D primitives(基本体) in perspective(透视)
- 处理前后透视关系采用z-buffer
- 图形管线中主要使用四维空间,4×4矩阵,4维向量——3 traditional geometric coordinates + a fourth homogeneous(齐次) coordinate (helps with perspective viewing)
- 大多数情况下,重要性排序:速度 > 质量
- level of detail (LOD): fewer triangles are needed than when the model is viewed from a closer distance
Numerical Issues
曾经的数码处理非常混乱,直到出现了IEEE floating-point standrad,下面是一些比较重要的规则:
- 一些特殊值:正无穷( ∞ ∞ )、负无穷( )、不是个数(NaN)
- 有关这些特殊值的一些计算结果:
+a/(+∞)<