Jump to content

Computer Graphics/Mathematics

From Wikibooks, open books for an open world

Computer graphics majorly require an understanding of Linear Algebra in mathematics. Specifically, the representation of object points as vectors and transformations as matrices. Transformations are operations that change the object appearance. For example, a rotation transformation would cause an object to be rotated by a given angle. An object can be thought of as a collection of points. Each point can be treated as a vector and the matrix-vector product would compute the position of the point after the transformation is applied. When done for all points representing the object, the entire object appears to be transformed by that transformation. In three dimensions, meshes are used which employ polygons (majorly triangles).

Apart from this, special importance is given to replicate curves in real objects. Most commonly used techniques include Bézier curves, splines and NURBS. Splines are a sequence of piecewise-functions used to fit complex curves. NURBS (Non-Uniform Rational Bézier Splines) is the universal tool of choice to model curved surfaces in three dimensions. While quadratic and cubic Bézier curves are mostly sufficient in two dimensions. A mathematical explanation of these can be found in Affine Geometry.

In addition, an understanding of physics (and corresponding mathematical understanding) is helpful in modelling real-life scenarios. The study of optics and light transport help in rendering objects with different material textures under different lighting conditions. Basic mechanics like that of motion and dynamics are required for simulating motion.