2D Graphics
   HOME

TheInfoList



OR:

2D computer graphics is the computer-based generation of
digital image A digital image is an image composed of picture elements, also known as ''pixels'', each with '' finite'', '' discrete quantities'' of numeric representation for its intensity or gray level that is an output from its two-dimensional functions ...
s—mostly from two-dimensional models (such as 2D geometric models, text, and digital images) and by techniques specific to them. It may refer to the branch of
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
that comprises such techniques or to the models themselves. 2D computer graphics are mainly used in applications that were originally developed upon traditional
printing Printing is a process for mass reproducing text and images using a master form or template. The earliest non-paper products involving printing include cylinder seals and objects such as the Cyrus Cylinder and the Cylinders of Nabonidus. The ...
and
drawing Drawing is a form of visual art in which an artist uses instruments to mark paper or other two-dimensional surface. Drawing instruments include graphite pencils, pen and ink, various kinds of paints, inked brushes, colored pencils, crayo ...
technologies, such as
typography Typography is the art and technique of arranging type to make written language legible, readable and appealing when displayed. The arrangement of type involves selecting typefaces, point sizes, line lengths, line-spacing ( leading), an ...
,
cartography Cartography (; from grc, χάρτης , "papyrus, sheet of paper, map"; and , "write") is the study and practice of making and using maps. Combining science, aesthetics and technique, cartography builds on the premise that reality (or an i ...
,
technical drawing Technical drawing, drafting or drawing, is the act and discipline of composing drawings that visually communicate how something functions or is constructed. Technical drawing is essential for communicating ideas in industry and engineering ...
,
advertising Advertising is the practice and techniques employed to bring attention to a product or service. Advertising aims to put a product or service in the spotlight in hopes of drawing it attention from consumers. It is typically used to promote a ...
, etc. In those applications, the two-dimensional
image An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensio ...
is not just a representation of a real-world object, but an independent artifact with added semantic value; two-dimensional models are therefore preferred, because they give more direct control of the image than
3D computer graphics 3D computer graphics, or “3D graphics,” sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for th ...
(whose approach is more akin to
photography Photography is the art, application, and practice of creating durable images by recording light, either electronically by means of an image sensor, or chemically by means of a light-sensitive material such as photographic film. It is emplo ...
than to typography). In many domains, such as
desktop publishing Desktop publishing (DTP) is the creation of documents using page layout software on a personal ("desktop") computer. It was first used almost exclusively for print publications, but now it also assists in the creation of various forms of online ...
,
engineering Engineering is the use of scientific principles to design and build machines, structures, and other items, including bridges, tunnels, roads, vehicles, and buildings. The discipline of engineering encompasses a broad range of more speciali ...
, and
business Business is the practice of making one's living or making money by producing or buying and selling products (such as goods and services). It is also "any activity or enterprise entered into for profit." Having a business name does not separ ...
, a description of a document based on 2D computer graphics techniques can be much smaller than the corresponding digital image—often by a factor of 1/1000 or more. This representation is also more flexible since it can be rendered at different resolutions to suit different
output device An output device is any piece of computer hardware equipment which converts information into a human-perceptible form or, historically, into a physical machine-readable form for use with other non-computerized equipment. It can be text, graphics, ...
s. For these reasons, documents and illustrations are often stored or transmitted as 2D graphic files. 2D computer graphics started in the 1950s, based on vector graphics devices. These were largely supplanted by raster-based devices in the following decades. The
PostScript PostScript (PS) is a page description language in the electronic publishing and desktop publishing realm. It is a dynamically typed, concatenative programming language. It was created at Adobe Systems by John Warnock, Charles Geschke, Do ...
language and the
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
protocol were landmark developments in the field.


Techniques

2D graphics models may combine
geometric model __NOTOC__ Geometric modeling is a branch of applied mathematics and computational geometry that studies methods and algorithms for the mathematical description of shapes. The shapes studied in geometric modeling are mostly two- or three-dimensio ...
s (also called
vector graphics Vector graphics is a form of computer graphics in which visual images are created directly from geometric shapes defined on a Cartesian plane, such as points, lines, curves and polygons. The associated mechanisms may include vector display ...
), digital images (also called
raster graphics upright=1, The Smiley, smiley face in the top left corner is a raster image. When enlarged, individual pixels appear as squares. Enlarging further, each pixel can be analyzed, with their colors constructed through combination of the values for ...
), text to be typeset (defined by content,
font In metal typesetting, a font is a particular size, weight and style of a typeface. Each font is a matched set of type, with a piece (a " sort") for each glyph. A typeface consists of a range of such fonts that shared an overall design. In mo ...
style and size, color, position, and orientation), mathematical functions and
equation In mathematics, an equation is a formula that expresses the equality of two expressions, by connecting them with the equals sign . The word ''equation'' and its cognates in other languages may have subtly different meanings; for example, in F ...
s, and more. These components can be modified and manipulated by two-dimensional
geometric transformation In mathematics, a geometric transformation is any bijection of a set to itself (or to another such set) with some salient geometrical underpinning. More specifically, it is a function whose domain and range are sets of points — most often b ...
s such as
translation Translation is the communication of the meaning of a source-language text by means of an equivalent target-language text. The English language draws a terminological distinction (which does not exist in every language) between ''transla ...
,
rotation Rotation, or spin, is the circular movement of an object around a '' central axis''. A two-dimensional rotating object has only one possible central axis and can rotate in either a clockwise or counterclockwise direction. A three-dimensional ...
, and scaling. In object-oriented graphics, the image is described indirectly by an
object Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an ...
endowed with a self- rendering
method Method ( grc, μέθοδος, methodos) literally means a pursuit of knowledge, investigation, mode of prosecuting such inquiry, or system. In recent centuries it more often means a prescribed process for completing a task. It may refer to: *Scien ...
—a procedure that assigns colors to the image
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device. In most digital display devices, pixels are the ...
s by an arbitrary algorithm. Complex models can be built by combining simpler objects, in the
paradigms In science and philosophy, a paradigm () is a distinct set of concepts or thought patterns, including theories, research methods, postulates, and standards for what constitute legitimate contributions to a field. Etymology ''Paradigm'' comes f ...
of
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of ...
.


Geometry

In
Euclidean geometry Euclidean geometry is a mathematical system attributed to ancient Greek mathematician Euclid, which he described in his textbook on geometry: the '' Elements''. Euclid's approach consists in assuming a small set of intuitively appealing axioms ...
, a ''
translation (geometry) In Euclidean geometry, a translation is a geometric transformation that moves every point of a figure, shape or space by the same distance in a given direction. A translation can also be interpreted as the addition of a constant vector to ev ...
'' moves every point a constant distance in a specified direction. A translation can be described as a rigid motion: other rigid motions include rotations and reflections. A translation can also be interpreted as the addition of a constant
vector Vector most often refers to: *Euclidean vector, a quantity with a magnitude and a direction *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematic ...
to every point, or as shifting the
origin Origin(s) or The Origin may refer to: Arts, entertainment, and media Comics and manga * Origin (comics), ''Origin'' (comics), a Wolverine comic book mini-series published by Marvel Comics in 2002 * The Origin (Buffy comic), ''The Origin'' (Bu ...
of the
coordinate system In geometry, a coordinate system is a system that uses one or more numbers, or coordinates, to uniquely determine the position of the points or other geometric elements on a manifold such as Euclidean space. The order of the coordinates is sig ...
. A '' translation operator'' is an operator T_\mathbf such that T_\mathbf f(\mathbf) = f(\mathbf+\mathbf). If v is a fixed vector, then the translation ''T''v will work as ''T''v(p) = p + v. If ''T'' is a translation, then the
image An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensio ...
of a subset ''A'' under the function ''T'' is the translation of ''A'' by ''T''. The translation of ''A'' by ''T''v is often written ''A'' + v. In a
Euclidean space Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidea ...
, any translation is an
isometry In mathematics, an isometry (or congruence, or congruent transformation) is a distance-preserving transformation between metric spaces, usually assumed to be bijective. The word isometry is derived from the Ancient Greek: ἴσος ''isos'' ...
. The set of all translations forms the translation group ''T'', which is isomorphic to the space itself, and a
normal subgroup In abstract algebra, a normal subgroup (also known as an invariant subgroup or self-conjugate subgroup) is a subgroup that is invariant under conjugation by members of the group of which it is a part. In other words, a subgroup N of the group G ...
of
Euclidean group In mathematics, a Euclidean group is the group of (Euclidean) isometries of a Euclidean space \mathbb^n; that is, the transformations of that space that preserve the Euclidean distance between any two points (also called Euclidean transformations ...
''E''(''n'' ). The
quotient group A quotient group or factor group is a mathematical group obtained by aggregating similar elements of a larger group using an equivalence relation that preserves some of the group structure (the rest of the structure is "factored" out). For exam ...
of ''E''(''n'' ) by ''T'' is isomorphic to the
orthogonal group In mathematics, the orthogonal group in dimension , denoted , is the group of distance-preserving transformations of a Euclidean space of dimension that preserve a fixed point, where the group operation is given by composing transformations. ...
''O''(''n'' ): :''E''(''n'' ) ''/ T'' ≅ ''O''(''n'' ).


Translation

Since a translation is an
affine transformation In Euclidean geometry, an affine transformation or affinity (from the Latin, ''affinis'', "connected with") is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles. More generall ...
but not a
linear transformation In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pre ...
,
homogeneous coordinates In mathematics, homogeneous coordinates or projective coordinates, introduced by August Ferdinand Möbius in his 1827 work , are a system of coordinates used in projective geometry, just as Cartesian coordinates are used in Euclidean geometr ...
are normally used to represent the translation operator by a
matrix Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** '' The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchi ...
and thus to make it linear. Thus we write the 3-dimensional vector w = (''w''''x'', ''w''''y'', ''w''''z'') using 4 homogeneous coordinates as w = (''w''''x'', ''w''''y'', ''w''''z'', 1). To translate an object by a
vector Vector most often refers to: *Euclidean vector, a quantity with a magnitude and a direction *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematic ...
v, each homogeneous vector p (written in homogeneous coordinates) would need to be multiplied by this translation matrix: : T_ = \begin 1 & 0 & 0 & v_x \\ 0 & 1 & 0 & v_y \\ 0 & 0 & 1 & v_z \\ 0 & 0 & 0 & 1 \end As shown below, the multiplication will give the expected result: : T_ \mathbf = \begin 1 & 0 & 0 & v_x \\ 0 & 1 & 0 & v_y\\ 0 & 0 & 1 & v_z\\ 0 & 0 & 0 & 1 \end \begin p_x \\ p_y \\ p_z \\ 1 \end = \begin p_x + v_x \\ p_y + v_y \\ p_z + v_z \\ 1 \end = \mathbf + \mathbf The inverse of a translation matrix can be obtained by reversing the direction of the vector: : T^_ = T_ . \! Similarly, the product of translation matrices is given by adding the vectors: : T_T_ = T_ . \! Because addition of vectors is
commutative In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of ...
, multiplication of translation matrices is therefore also commutative (unlike multiplication of arbitrary matrices).


Rotation

In
linear algebra Linear algebra is the branch of mathematics concerning linear equations such as: :a_1x_1+\cdots +a_nx_n=b, linear maps such as: :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and through matrice ...
, a ''
rotation matrix In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space. For example, using the convention below, the matrix :R = \begin \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \ ...
'' is a
matrix Matrix most commonly refers to: * ''The Matrix'' (franchise), an American media franchise ** '' The Matrix'', a 1999 science-fiction action film ** "The Matrix", a fictional setting, a virtual reality environment, within ''The Matrix'' (franchi ...
that is used to perform a
rotation Rotation, or spin, is the circular movement of an object around a '' central axis''. A two-dimensional rotating object has only one possible central axis and can rotate in either a clockwise or counterclockwise direction. A three-dimensional ...
in
Euclidean space Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, that is, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are Euclidea ...
. :R = \begin \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \\ \end rotates points in the ''xy''-
Cartesian plane A Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured in ...
counterclockwise through an angle ''θ'' about the origin of the
Cartesian coordinate system A Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured in ...
. To perform the rotation using a rotation matrix ''R'', the position of each point must be represented by a
column vector In linear algebra, a column vector with m elements is an m \times 1 matrix consisting of a single column of m entries, for example, \boldsymbol = \begin x_1 \\ x_2 \\ \vdots \\ x_m \end. Similarly, a row vector is a 1 \times n matrix for some n, c ...
v, containing the coordinates of the point. A rotated vector is obtained by using the
matrix multiplication In mathematics, particularly in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the s ...
''R''v. Since matrix multiplication has no effect on the zero vector (i.e., on the coordinates of the origin), rotation matrices can only be used to describe rotations about the origin of the coordinate system. Rotation matrices provide a simple algebraic description of such rotations, and are used extensively for computations in
geometry Geometry (; ) is, with arithmetic, one of the oldest branches of mathematics. It is concerned with properties of space such as the distance, shape, size, and relative position of figures. A mathematician who works in the field of geometry is c ...
,
physics Physics is the natural science that studies matter, its fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is that department of knowledge which ...
, and
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
. In 2-dimensional space, a rotation can be simply described by an angle ''θ'' of rotation, but it can be also represented by the 4 entries of a rotation matrix with 2 rows and 2 columns. In 3-dimensional space, every rotation can be interpreted as a rotation by a given angle about a single fixed axis of rotation (see
Euler's rotation theorem In geometry, Euler's rotation theorem states that, in three-dimensional space, any displacement of a rigid body such that a point on the rigid body remains fixed, is equivalent to a single rotation about some axis that runs through the fixed p ...
), and hence it can be simply described by an angle and a vector with 3 entries. However, it can also be represented by the 9 entries of a rotation matrix with 3 rows and 3 columns. The notion of rotation is not commonly used in dimensions higher than 3; there is a notion of a '' rotational displacement'', which can be represented by a matrix, but no associated single axis or angle. Rotation matrices are square matrices, with real entries. More specifically they can be characterized as orthogonal matrices with
determinant In mathematics, the determinant is a scalar value that is a function of the entries of a square matrix. It characterizes some properties of the matrix and the linear map represented by the matrix. In particular, the determinant is nonzero if a ...
 1: :R^ = R^, \det R = 1\,. The
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
of all such matrices of size ''n'' forms a group, known as the
special orthogonal group In mathematics, the orthogonal group in dimension , denoted , is the group of distance-preserving transformations of a Euclidean space of dimension that preserve a fixed point, where the group operation is given by composing transformations. ...
.


=In two dimensions

= In two dimensions every rotation matrix has the following form: : R(\theta) = \begin \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \\ \end. This rotates
column vector In linear algebra, a column vector with m elements is an m \times 1 matrix consisting of a single column of m entries, for example, \boldsymbol = \begin x_1 \\ x_2 \\ \vdots \\ x_m \end. Similarly, a row vector is a 1 \times n matrix for some n, c ...
s by means of the following
matrix multiplication In mathematics, particularly in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the s ...
: : \begin x' \\ y' \\ \end = \begin \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \\ \end\begin x \\ y \\ \end. So the coordinates (x',y') of the point (x,y) after rotation are: :x' = x \cos \theta - y \sin \theta\,, :y' = x \sin \theta + y \cos \theta\,. The direction of vector rotation is counterclockwise if θ is positive (e.g. 90°), and clockwise if θ is negative (e.g. -90°). : R(-\theta) = \begin \cos \theta & \sin \theta \\ -\sin \theta & \cos \theta \\ \end\,.


=Non-standard orientation of the coordinate system

= If a standard
right-handed In human biology, handedness is an individual's preferential use of one hand, known as the dominant hand, due to it being stronger, faster or more dextrous. The other hand, comparatively often the weaker, less dextrous or simply less subjecti ...
Cartesian coordinate system A Cartesian coordinate system (, ) in a plane is a coordinate system that specifies each point uniquely by a pair of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured in ...
is used, with the ''x'' axis to the right and the ''y'' axis up, the rotation R(''θ'') is counterclockwise. If a left-handed Cartesian coordinate system is used, with ''x'' directed to the right but ''y'' directed down, R(''θ'') is clockwise. Such non-standard orientations are rarely used in mathematics but are common in 2D computer graphics, which often have the origin in the top left corner and the ''y''-axis down the screen or page. See
below Below may refer to: *Earth * Ground (disambiguation) *Soil *Floor * Bottom (disambiguation) *Less than *Temperatures below freezing *Hell or underworld People with the surname *Ernst von Below (1863–1955), German World War I general *Fred Below ...
for other alternative conventions which may change the sense of the rotation produced by a
rotation matrix In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space. For example, using the convention below, the matrix :R = \begin \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \ ...
.


=Common rotations

= Particularly useful are the matrices for 90° and 180° rotations: : R(90^\circ) = \begin 0 & -1 \\ pt1 & 0 \\ \end (90° counterclockwise rotation) :R(180^\circ) = \begin -1 & 0 \\ pt0 & -1 \\ \end (180° rotation in either direction – a half-turn) :R(270^\circ) = \begin 0 & 1 \\ pt-1 & 0 \\ \end (270° counterclockwise rotation, the same as a 90° clockwise rotation) In
Euclidean geometry Euclidean geometry is a mathematical system attributed to ancient Greek mathematician Euclid, which he described in his textbook on geometry: the '' Elements''. Euclid's approach consists in assuming a small set of intuitively appealing axioms ...
, uniform scaling (
isotropic Isotropy is uniformity in all orientations; it is derived . Precise definitions depend on the subject area. Exceptions, or inequalities, are frequently indicated by the prefix ' or ', hence '' anisotropy''. ''Anisotropy'' is also used to describ ...
scaling, homogeneous dilation,
homothety In mathematics, a homothety (or homothecy, or homogeneous dilation) is a transformation of an affine space determined by a point ''S'' called its ''center'' and a nonzero number ''k'' called its ''ratio'', which sends point X to a point X' by th ...
) is a
linear transformation In mathematics, and more specifically in linear algebra, a linear map (also called a linear mapping, linear transformation, vector space homomorphism, or in some contexts linear function) is a mapping V \to W between two vector spaces that pre ...
that enlarges (increases) or shrinks (diminishes) objects by a scale factor that is the same in all directions. The result of uniform scaling is similar (in the geometric sense) to the original. A scale factor of 1 is normally allowed, so that congruent shapes are also classed as similar. (Some school text books specifically exclude this possibility, just as some exclude squares from being rectangles or circles from being ellipses.) More general is scaling with a separate scale factor for each axis direction. Non-uniform scaling (
anisotropic Anisotropy () is the property of a material which allows it to change or assume different properties in different directions, as opposed to isotropy. It can be defined as a difference, when measured along different axes, in a material's physic ...
scaling, inhomogeneous dilation) is obtained when at least one of the scaling factors is different from the others; a special case is directional scaling or stretching (in one direction). Non-uniform scaling changes the
shape A shape or figure is a graphical representation of an object or its external boundary, outline, or external surface, as opposed to other properties such as color, texture, or material type. A plane shape or plane figure is constrained to lie ...
of the object; e.g. a square may change into a rectangle, or into a parallelogram if the sides of the square are not parallel to the scaling axes (the angles between lines parallel to the axes are preserved, but not all angles).


Scaling

A scaling can be represented by a scaling matrix. To scale an object by a
vector Vector most often refers to: *Euclidean vector, a quantity with a magnitude and a direction *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematic ...
''v'' = (''vx, vy, vz''), each point ''p'' = (''px, py, pz'') would need to be multiplied with this scaling matrix: : S_v = \begin v_x & 0 & 0 \\ 0 & v_y & 0 \\ 0 & 0 & v_z \\ \end. As shown below, the multiplication will give the expected result: : S_vp = \begin v_x & 0 & 0 \\ 0 & v_y & 0 \\ 0 & 0 & v_z \\ \end \begin p_x \\ p_y \\ p_z \end = \begin v_xp_x \\ v_yp_y \\ v_zp_z \end. Such a scaling changes the
diameter In geometry, a diameter of a circle is any straight line segment that passes through the center of the circle and whose endpoints lie on the circle. It can also be defined as the longest chord of the circle. Both definitions are also valid f ...
of an object by a factor between the scale factors, the
area Area is the quantity that expresses the extent of a region on the plane or on a curved surface. The area of a plane region or ''plane area'' refers to the area of a shape or planar lamina, while '' surface area'' refers to the area of an op ...
by a factor between the smallest and the largest product of two scale factors, and the
volume Volume is a measure of occupied three-dimensional space. It is often quantified numerically using SI derived units (such as the cubic metre and litre) or by various imperial or US customary units (such as the gallon, quart, cubic inch). ...
by the product of all three. The scaling is uniform
if and only if In logic and related fields such as mathematics and philosophy, "if and only if" (shortened as "iff") is a biconditional logical connective between statements, where either both statements are true or both are false. The connective is bic ...
the scaling factors are equal (''vx = vy = vz''). If all except one of the scale factors are equal to 1, we have directional scaling. In the case where ''vx = vy = vz = k'', the scaling is also called an enlargement or
dilation Dilation (or dilatation) may refer to: Physiology or medicine * Cervical dilation, the widening of the cervix in childbirth, miscarriage etc. * Coronary dilation, or coronary reflex * Dilation and curettage, the opening of the cervix and surgi ...
by a factor k, increasing the area by a factor of k2 and the volume by a factor of k3. Scaling in the most general sense is any
affine transformation In Euclidean geometry, an affine transformation or affinity (from the Latin, ''affinis'', "connected with") is a geometric transformation that preserves lines and parallelism, but not necessarily Euclidean distances and angles. More generall ...
with a
diagonalizable matrix In linear algebra, a square matrix A is called diagonalizable or non-defective if it is similar to a diagonal matrix, i.e., if there exists an invertible matrix P and a diagonal matrix D such that or equivalently (Such D are not unique.) ...
. It includes the case that the three directions of scaling are not perpendicular. It includes also the case that one or more scale factors are equal to zero (
projection Projection, projections or projective may refer to: Physics * Projection (physics), the action/process of light, heat, or sound reflecting from a surface to another in a different direction * The display of images by a projector Optics, graphic ...
), and the case of one or more negative scale factors. The latter corresponds to a combination of scaling proper and a kind of reflection: along lines in a particular direction we take the reflection in the point of intersection with a plane that need not be perpendicular; therefore it is more general than ordinary reflection in the plane.


Using homogeneous coordinates

In
projective geometry In mathematics, projective geometry is the study of geometric properties that are invariant with respect to projective transformations. This means that, compared to elementary Euclidean geometry, projective geometry has a different setting, pro ...
, often used in
computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
, points are represented using
homogeneous coordinates In mathematics, homogeneous coordinates or projective coordinates, introduced by August Ferdinand Möbius in his 1827 work , are a system of coordinates used in projective geometry, just as Cartesian coordinates are used in Euclidean geometr ...
. To scale an object by a
vector Vector most often refers to: *Euclidean vector, a quantity with a magnitude and a direction *Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism Vector may also refer to: Mathematic ...
''v'' = (''vx, vy, vz''), each homogeneous coordinate vector ''p'' = (''px, py, pz'', 1) would need to be multiplied with this
projective transformation In projective geometry, a homography is an isomorphism of projective spaces, induced by an isomorphism of the vector spaces from which the projective spaces derive. It is a bijection that maps lines to lines, and thus a collineation. In general, s ...
matrix: : S_v = \begin v_x & 0 & 0 & 0 \\ 0 & v_y & 0 & 0 \\ 0 & 0 & v_z & 0 \\ 0 & 0 & 0 & 1 \end. As shown below, the multiplication will give the expected result: : S_vp = \begin v_x & 0 & 0 & 0 \\ 0 & v_y & 0 & 0 \\ 0 & 0 & v_z & 0 \\ 0 & 0 & 0 & 1 \end \begin p_x \\ p_y \\ p_z \\ 1 \end = \begin v_xp_x \\ v_yp_y \\ v_zp_z \\ 1 \end. Since the last component of a homogeneous coordinate can be viewed as the denominator of the other three components, a uniform scaling by a common factor ''s'' (uniform scaling) can be accomplished by using this scaling matrix: : S_v = \begin 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & \frac \end. For each vector ''p'' = (''px, py, pz'', 1) we would have : S_vp = \begin 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & \frac \end \begin p_x \\ p_y \\ p_z \\ 1 \end = \begin p_x \\ p_y \\ p_z \\ \frac \end which would be homogenized to : \begin sp_x \\ sp_y \\ sp_z \\ 1 \end.


Direct painting

A convenient way to create a complex image is to start with a blank "canvas" raster map (an array of
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device. In most digital display devices, pixels are the ...
s, also known as a
bitmap In computing, a bitmap is a mapping from some domain (for example, a range of integers) to bits. It is also called a bit array A bit array (also known as bitmask, bit map, bit set, bit string, or bit vector) is an array data structure that c ...
) filled with some uniform background color and then "draw", "paint" or "paste" simple patches of color onto it, in an appropriate order. In particular the canvas may be the
frame buffer A framebuffer (frame buffer, or sometimes framestore) is a portion of random-access memory (RAM) containing a bitmap that drives a video display. It is a memory buffer containing data representing all the pixels in a complete video frame. Modern ...
for a
computer display A computer monitor is an output device that displays information in pictorial or textual form. A discrete monitor comprises a visual display, support electronics, power supply, housing, electrical connectors, and external user controls. The d ...
. Some programs will set the pixel colors directly, but most will rely on some 2D
graphics library A graphics library is a program library designed to aid in rendering computer graphics to a monitor. This typically involves providing optimized versions of functions that handle common rendering tasks. This can be done purely in software and runn ...
or the machine's
graphics card A graphics card (also called a video card, display card, graphics adapter, VGA card/VGA, video adapter, display adapter, or mistakenly GPU) is an expansion card which generates a feed of output images to a display device, such as a computer moni ...
, which usually implement the following operations: * paste a given
image An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
at a specified offset onto the canvas; * write a string of characters with a specified font, at a given position and angle; * paint a simple geometric shape, such as a
triangle A triangle is a polygon with three Edge (geometry), edges and three Vertex (geometry), vertices. It is one of the basic shapes in geometry. A triangle with vertices ''A'', ''B'', and ''C'' is denoted \triangle ABC. In Euclidean geometry, an ...
defined by three corners, or a
circle A circle is a shape consisting of all points in a plane that are at a given distance from a given point, the centre. Equivalently, it is the curve traced out by a point that moves in a plane so that its distance from a given point is const ...
with given center and radius; * draw a
line segment In geometry, a line segment is a part of a straight line that is bounded by two distinct end points, and contains every point on the line that is between its endpoints. The length of a line segment is given by the Euclidean distance between ...
, arc, or simple curve with a ''virtual pen'' of given width.


Extended color models

Text, shapes and lines are rendered with a client-specified color. Many libraries and cards provide
color gradient In color science, a color gradient specifies a range of position-dependent colors, usually used to fill a region. Name A color gradient is also known as a color ramp or a color progression. In assigning colors to a set of values, a gradien ...
s, which are handy for the generation of smoothly-varying backgrounds, shadow effects, etc. (See also
Gouraud shading Gouraud shading, named after Henri Gouraud, is an interpolation method used in computer graphics to produce continuous shading of surfaces represented by polygon meshes. In practice, Gouraud shading is most often used to achieve continuous l ...
). The pixel colors can also be taken from a texture, e.g. a
digital image A digital image is an image composed of picture elements, also known as ''pixels'', each with '' finite'', '' discrete quantities'' of numeric representation for its intensity or gray level that is an output from its two-dimensional functions ...
(thus emulating rub-on
screentone Screentone is a technique for applying textures and shades to drawings, used as an alternative to hatching. In the conventional process, patterns are transferred to paper from preprinted sheets. It is also known by the common brand names Zip-A-T ...
s and the fabled ''checker paint'' which used to be available only in
cartoon A cartoon is a type of visual art that is typically drawn, frequently animated, in an unrealistic or semi-realistic style. The specific meaning has evolved over time, but the modern usage usually refers to either: an image or series of images ...
s). Painting a
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device. In most digital display devices, pixels are the ...
with a given color usually replaces its previous color. However, many systems support painting with
transparent Transparency, transparence or transparent most often refer to: * Transparency (optics), the physical property of allowing the transmission of light through a material They may also refer to: Literal uses * Transparency (photography), a still, ...
and
translucent In the field of optics, transparency (also called pellucidity or diaphaneity) is the physical property of allowing light to pass through the material without appreciable scattering of light. On a macroscopic scale (one in which the dimensions a ...
colors, which only modify the previous pixel values. The two colors may also be combined in more complex ways, e.g. by computing their bitwise
exclusive or Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false). It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , ...
. This technique is known as ''inverting color'' or ''color inversion'', and is often used in
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
s for highlighting, rubber-band drawing, and other volatile painting—since re-painting the same shapes with the same color will restore the original pixel values.


Layers

The models used in 2D computer graphics usually do not provide for three-dimensional shapes, or three-dimensional optical phenomena such as lighting,
shadow A shadow is a dark area where light from a light source is blocked by an opaque object. It occupies all of the three-dimensional volume behind an object with light in front of it. The cross section of a shadow is a two-dimensional silhouette, o ...
s,
reflection Reflection or reflexion may refer to: Science and technology * Reflection (physics), a common wave phenomenon ** Specular reflection, reflection from a smooth surface *** Mirror image, a reflection in a mirror or in water ** Signal reflection, in ...
,
refraction In physics, refraction is the redirection of a wave as it passes from one medium to another. The redirection can be caused by the wave's change in speed or by a change in the medium. Refraction of light is the most commonly observed phenomeno ...
, etc. However, they usually can model multiple ''layers'' (conceptually of ink, paper, or film; opaque,
translucent In the field of optics, transparency (also called pellucidity or diaphaneity) is the physical property of allowing light to pass through the material without appreciable scattering of light. On a macroscopic scale (one in which the dimensions a ...
, or
transparent Transparency, transparence or transparent most often refer to: * Transparency (optics), the physical property of allowing the transmission of light through a material They may also refer to: Literal uses * Transparency (photography), a still, ...
—stacked in a specific order. The ordering is usually defined by a single number (the layer's ''depth'', or distance from the viewer). Layered models are sometimes called "2-D computer graphics". They make it possible to mimic traditional drafting and printing techniques based on film and paper, such as cutting and pasting; and allow the user to edit any layer without affecting the others. For these reasons, they are used in most graphics editors. Layered models also allow better
spatial anti-aliasing In digital signal processing, spatial anti-aliasing is a technique for minimizing the distortion artifacts ( aliasing) when representing a high-resolution image at a lower resolution. Anti-aliasing is used in digital photography, computer graphi ...
of complex drawings and provide a sound model for certain techniques such as ''mitered joints'' and the
even–odd rule The even–odd rule is an algorithm implemented in vector-based graphic software, like the PostScript language and Scalable Vector Graphics (SVG), which determines how a graphical shape with more than one closed outline will be filled. Unlike the ...
. Layered models are also used to allow the user to suppress unwanted information when viewing or printing a document, e.g. roads or railways from a
map A map is a symbolic depiction emphasizing relationships between elements of some space, such as objects, regions, or themes. Many maps are static, fixed to paper or some other durable medium, while others are dynamic or interactive. Although ...
, certain process layers from an
integrated circuit An integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or a microchip) is a set of electronic circuits on one small flat piece (or "chip") of semiconductor material, usually silicon. Large numbers of tiny ...
diagram, or hand annotations from a business letter. In a layer-based model, the target image is produced by "painting" or "pasting" each layer, in order of decreasing depth, on the virtual canvas. Conceptually, each layer is first rendered on its own, yielding a
digital image A digital image is an image composed of picture elements, also known as ''pixels'', each with '' finite'', '' discrete quantities'' of numeric representation for its intensity or gray level that is an output from its two-dimensional functions ...
with the desired resolution which is then painted over the canvas, pixel by pixel. Fully transparent parts of a layer need not be rendered, of course. The rendering and painting may be done in parallel, i.e., each layer pixel may be painted on the canvas as soon as it is produced by the rendering procedure. Layers that consist of complex geometric objects (such as
text Text may refer to: Written word * Text (literary theory), any object that can be read, including: **Religious text, a writing that a religious tradition considers to be sacred **Text, a verse or passage from scripture used in expository preachin ...
or
polyline In geometry, a polygonal chain is a connected series of line segments. More formally, a polygonal chain is a curve specified by a sequence of points (A_1, A_2, \dots, A_n) called its vertices. The curve itself consists of the line segments co ...
s) may be broken down into simpler elements (
character Character or Characters may refer to: Arts, entertainment, and media Literature * ''Character'' (novel), a 1936 Dutch novel by Ferdinand Bordewijk * ''Characters'' (Theophrastus), a classical Greek set of character sketches attributed to The ...
s or
line segment In geometry, a line segment is a part of a straight line that is bounded by two distinct end points, and contains every point on the line that is between its endpoints. The length of a line segment is given by the Euclidean distance between ...
s, respectively), which are then painted as separate layers, in some order. However, this solution may create undesirable
aliasing In signal processing and related disciplines, aliasing is an effect that causes different signals to become indistinguishable (or ''aliases'' of one another) when sampled. It also often refers to the distortion or artifact that results when a ...
artifacts wherever two elements overlap the same pixel. See also Portable Document Format#Layers.


Hardware

Modern computer
graphics card A graphics card (also called a video card, display card, graphics adapter, VGA card/VGA, video adapter, display adapter, or mistakenly GPU) is an expansion card which generates a feed of output images to a display device, such as a computer moni ...
displays almost overwhelmingly use raster techniques, dividing the screen into a rectangular grid of
pixel In digital imaging, a pixel (abbreviated px), pel, or picture element is the smallest addressable element in a raster image, or the smallest point in an all points addressable display device. In most digital display devices, pixels are the ...
s, due to the relatively low cost of raster-based video hardware as compared with vector graphic hardware. Most graphic hardware has internal support for
blitting Bit blit (also written BITBLT, BIT BLT, BitBLT, Bit BLT, Bit Blt etc., which stands for ''bit block transfer'') is a data operation commonly used in computer graphics in which several bitmaps are combined into one using a ''boolean function''. The ...
operations or sprite drawing. A
co-processor A coprocessor is a computer processor used to supplement the functions of the primary processor (the CPU). Operations performed by the coprocessor may be floating-point arithmetic, graphics, signal processing, string processing, cryptography ...
dedicated to
blitting Bit blit (also written BITBLT, BIT BLT, BitBLT, Bit BLT, Bit Blt etc., which stands for ''bit block transfer'') is a data operation commonly used in computer graphics in which several bitmaps are combined into one using a ''boolean function''. The ...
is known as a ''
Blitter A blitter is a circuit, sometimes as a coprocessor or a logic block on a microprocessor, dedicated to the rapid movement and modification of data within a computer's memory. A blitter can copy large quantities of data from one memory area to anot ...
chip''. Classic 2D
graphics chip A video display controller or VDC (also called a display engine or display interface) is an integrated circuit which is the main component in a video-signal generator, a device responsible for the production of a TV video signal in a computin ...
s and
graphics processing unit A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mobi ...
s of the late 1970s to 1980s, used in
8-bit In computer architecture, 8-bit Integer (computer science), integers or other Data (computing), data units are those that are 8 bits wide (1 octet (computing), octet). Also, 8-bit central processing unit (CPU) and arithmetic logic unit (ALU) arc ...
to early
16-bit 16-bit microcomputers are microcomputers that use 16-bit microprocessors. A 16-bit register can store 216 different values. The range of integer values that can be stored in 16 bits depends on the integer representation used. With the two mos ...
,
arcade game An arcade game or coin-op game is a coin-operated entertainment machine typically installed in public businesses such as restaurants, bars and amusement arcades. Most arcade games are presented as primarily games of skill and include arcade v ...
s,
video game console A video game console is an electronic device that Input/output, outputs a video signal or image to display a video game that can be played with a game controller. These may be home video game console, home consoles, which are generally placed i ...
s, and home computers, include: *
Atari Atari () is a brand name that has been owned by several entities since its inception in 1972. It is currently owned by French publisher Atari SA through a subsidiary named Atari Interactive. The original Atari, Inc. (1972–1992), Atari, Inc., ...
's
TIA TIA or Tia may refer to: Aviation * Tampa International Airport, US, IATA code TPA * Texas International Airlines, US, ICAO code * Tirana International Airport Nënë Tereza, Albania, IATA code * Trans International Airlines, former U.S. airl ...
,
ANTIC Alphanumeric Television Interface Controller (ANTIC) is an LSI ASIC dedicated to generating 2D computer graphics to be shown on a television screen or computer display. Under the direction of Jay Miner, the chip was designed in 1977-1978 by ...
, CTIA and
GTIA Color Television Interface Adaptor (CTIA) and its successor Graphic Television Interface Adaptor (GTIA) are custom chips used in the Atari 8-bit family of computers and in the Atari 5200 home video game console. In these systems, a CTIA or GTIA ch ...
*
Capcom is a Japanese video game developer and video game publisher, publisher. It has created a number of List of best-selling video game franchises, multi-million-selling game franchises, with its most commercially successful being ''Resident Evil' ...
's CPS-A and CPS-B *
Commodore Commodore may refer to: Ranks * Commodore (rank), a naval rank ** Commodore (Royal Navy), in the United Kingdom ** Commodore (United States) ** Commodore (Canada) ** Commodore (Finland) ** Commodore (Germany) or ''Kommodore'' * Air commodore ...
's OCS *
MOS Technology MOS Technology, Inc. ("MOS" being short for Metal Oxide Semiconductor), later known as CSG (Commodore Semiconductor Group) and GMT Microelectronics, was a semiconductor design and fabrication company based in Audubon, Pennsylvania. It is mo ...
's
VIC Vic (; es, Vic or Pancracio Celdrán (2004). Diccionario de topónimos españoles y sus gentilicios (5ª edición). Madrid: Espasa Calpe. p. 843. ISBN 978-84-670-3054-9. «Vic o Vich (viquense, vigitano, vigatán, ausense, ausetano, ausonense): ...
and
VIC-II The VIC-II (Video Interface Chip II), specifically known as the MOS Technology 6567/8562/8564 (NTSC versions), 6569/8565/8566 (PAL), is the microchip tasked with generating Y/C video signals (combined to composite video in the RF modulator) and D ...
*
Hudson Soft was a Japanese video game company that released numerous games for video game consoles, home computers and mobile phones, mainly from the 1980s to the 2000s. It was headquartered in the Midtown Tower in Tokyo Midtown, Akasaka, Minato, Tokyo ...
's
Cynthia Cynthia is a feminine given name of Greek origin: , , "from Mount Cynthus" on Delos island. The name has been in use in the Anglosphere since the 1600s. There are various spellings for this name, and it can be abbreviated to Cindy, Cyndi, Cyndy, ...
and HuC6270 *
NEC is a Japanese multinational information technology and electronics corporation, headquartered in Minato, Tokyo. The company was known as the Nippon Electric Company, Limited, before rebranding in 1983 as NEC. It provides IT and network soluti ...
's μPD7220 and μPD72120 *
Ricoh is a Japanese Multinational corporation, multinational imaging and electronics company (law), company. It was founded by the now-defunct commercial division of the Riken, Institute of Physical and Chemical Research (Riken) known as the ''Riken ...
's PPU and S-PPU *
Sega is a Japanese multinational corporation, multinational video game and entertainment company headquartered in Shinagawa, Tokyo. Its international branches, Sega of America and Sega Europe, are headquartered in Irvine, California and London, r ...
's VDP, Super Scaler, 315-5011/315-5012 and 315-5196/315-5197 *
Texas Instruments Texas Instruments Incorporated (TI) is an American technology company headquartered in Dallas, Texas, that designs and manufactures semiconductors and various integrated circuits, which it sells to electronics designers and manufacturers globall ...
'
TMS9918 IMAGE:TMS9918A 01.jpg, VDP TMS9918A IMAGE:TMS9918A 02.jpg, VDP TMS9918A IMAGE:TMS9928A 01.jpg, VDP TMS9928A The TMS9918 is a video display controller (VDC) manufactured by Texas Instruments, in manuals referenced as 'Video Display Processor' (VDP ...
*
Yamaha Yamaha may refer to: * Yamaha Corporation, a Japanese company with a wide range of products and services, established in 1887. The company is the largest shareholder of Yamaha Motor Company (below). ** Yamaha Music Foundation, an organization estab ...
's
V9938 The Yamaha V9938 is a video display processor (VDP) used on the MSX2 home computer, as well as on the Geneve 9640 enhanced TI-99/4A clone and the Tatung Einstein 256. It was also used in a few MSX, MSX1 computers, in a configuration with 16kB VRA ...
, V9958 and YM7101 VDP


Software

Many
graphical user interface The GUI ( "UI" by itself is still usually pronounced . or ), graphical user interface, is a form of user interface that allows users to interact with electronic devices through graphical icons and audio indicator such as primary notation, inste ...
s (GUIs), including
macOS macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and lapt ...
,
Microsoft Windows Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
, or the
X Window System The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems. X provides the basic framework for a GUI environment: drawing and moving windows on the display device and interacting wi ...
, are primarily based on 2D graphical concepts. Such software provides a visual environment for interacting with the computer, and commonly includes some form of
window manager A window manager is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface. Most window managers are designed to help provide a desktop environment. They work in conjunction ...
to aid the user in conceptually distinguishing between different applications. The user interface within individual software applications is typically 2D in nature as well, due in part to the fact that most common
input device In computing, an input device is a piece of equipment used to provide data and control signals to an information processing system, such as a computer or information appliance. Examples of input devices include keyboards, mouse, scanners, cameras ...
s, such as the
mouse A mouse ( : mice) is a small rodent. Characteristically, mice are known to have a pointed snout, small rounded ears, a body-length scaly tail, and a high breeding rate. The best known mouse species is the common house mouse (''Mus musculus' ...
, are constrained to two dimensions of movement. 2D graphics are very important in the control peripherals such as printers, plotters, sheet cutting machines, etc. They were also used in most early
video game Video games, also known as computer games, are electronic games that involves interaction with a user interface or input device such as a joystick, controller, keyboard, or motion sensing device to generate visual feedback. This fee ...
s; and are still used for card and board games such as
solitaire Solitaire is any tabletop game which one can play by oneself, usually with cards, but also with dominoes. The term "solitaire" is also used for single-player games of concentration and skill using a set layout tiles, pegs or stones. These game ...
,
chess Chess is a board game for two players, called White and Black, each controlling an army of chess pieces in their color, with the objective to checkmate the opponent's king. It is sometimes called international chess or Western chess to disti ...
,
mahjongg Mahjong or mah-jongg (English pronunciation: ) is a tile-based game that was developed in the 19th century in China and has spread throughout the world since the early 20th century. It is commonly played by four players (with some three-play ...
, etc. 2D graphics editors or ''drawing programs'' are application-level software for the creation of images, diagrams and illustrations by direct manipulation (through the mouse,
graphics tablet A graphics tablet (also known as a digitizer, digital graphic tablet, pen tablet, drawing tablet, external drawing pad or digital art board) is a computer input device that enables a user to hand-draw images, animations and graphics, with a spec ...
, or similar device) of 2D computer graphics primitives. These editors generally provide geometric primitives as well as
digital image A digital image is an image composed of picture elements, also known as ''pixels'', each with '' finite'', '' discrete quantities'' of numeric representation for its intensity or gray level that is an output from its two-dimensional functions ...
s; and some even support procedural models. The illustration is usually represented internally as a layered model, often with a hierarchical structure to make editing more convenient. These editors generally output graphics files where the layers and primitives are separately preserved in their original form.
MacDraw MacDraw is a discontinued vector graphics drawing application released along with the first Apple Macintosh systems in 1984. MacDraw was one of the first WYSIWYG drawing programs that could be used in collaboration with MacWrite. It was eventu ...
, introduced in 1984 with the
Macintosh The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc., Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and ...
line of computers, was an early example of this class; recent examples are the commercial products
Adobe Illustrator Adobe Illustrator is a vector graphics editor and design program developed and marketed by Adobe Inc. Originally designed for the Apple Macintosh, development of Adobe Illustrator began in 1985. Along with Creative Cloud (Adobe's shift to month ...
and
CorelDRAW CorelDRAW is a vector graphics editor developed and marketed by Corel Corporation. It is also the name of the Corel graphics suite, which includes the bitmap-image editor Corel Photo-Paint as well as other graphics-related programs (see below). T ...
, and the free editors such as
xfig Xfig is a free and open-source vector graphics editor which runs under the X Window System on most UNIX-compatible platforms. In Xfig, figures may be drawn using objects such as circles, boxes, lines, spline curves, text, etc. It is also possib ...
or
Inkscape Inkscape is a free and open-source vector graphics editor used to create vector images, primarily in Scalable Vector Graphics (SVG) format. Other formats can be imported and exported. Inkscape can render primitive vector shapes (e.g. rectang ...
. There are also many 2D graphics editors specialized for certain types of drawings such as electrical, electronic and VLSI diagrams, topographic maps, computer fonts, etc. Image editors are specialized for the manipulation of
digital image A digital image is an image composed of picture elements, also known as ''pixels'', each with '' finite'', '' discrete quantities'' of numeric representation for its intensity or gray level that is an output from its two-dimensional functions ...
s, mainly by means of free-hand drawing/painting and
signal processing Signal processing is an electrical engineering subfield that focuses on analyzing, modifying and synthesizing ''signals'', such as audio signal processing, sound, image processing, images, and scientific measurements. Signal processing techniq ...
operations. They typically use a direct-painting paradigm, where the user controls virtual pens, brushes, and other free-hand artistic instruments to apply paint to a virtual canvas. Some image editors support a multiple-layer model; however, in order to support signal-processing operations like blurring each layer is normally represented as a digital image. Therefore, any geometric primitives that are provided by the editor are immediately converted to pixels and painted onto the canvas. The name ''raster graphics editor'' is sometimes used to contrast this approach to that of general editors which also handle ''vector graphics''. One of the first popular image editors was
Apple An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple fruit tree, trees are agriculture, cultivated worldwide and are the most widely grown species in the genus ''Malus''. The tree originated in Central Asia, wh ...
's
MacPaint MacPaint is a raster graphics editor developed by Apple Computer and released with the original Macintosh personal computer on January 24, 1984. It was sold separately for US$195 with its word processing counterpart, MacWrite. MacPaint was nota ...
, companion to
MacDraw MacDraw is a discontinued vector graphics drawing application released along with the first Apple Macintosh systems in 1984. MacDraw was one of the first WYSIWYG drawing programs that could be used in collaboration with MacWrite. It was eventu ...
. Modern examples are the free
GIMP GIMP ( ; GNU Image Manipulation Program) is a free and open-source raster graphics editor used for image manipulation (retouching) and image editing, free-form drawing, transcoding between different image file formats, and more specialized task ...
editor, and the commercial products
Photoshop Adobe Photoshop is a raster graphics editor developed and published by Adobe Inc. for Windows and macOS. It was originally created in 1988 by Thomas and John Knoll. Since then, the software has become the industry standard not only in raster ...
and
Paint Shop Pro PaintShop Pro (PSP) is a raster graphics editor, raster and vector graphics editor for Microsoft Windows. It was originally published by Jasc Software. In October 2004, Corel purchased Jasc Software and the distribution rights to Paint Shop Pro. P ...
. This class too includes many specialized editors—for medicine, remote sensing,
digital photography Digital photography uses cameras containing arrays of electronic photodetectors interfaced to an analog-to-digital converter (ADC) to produce images focused by a lens, as opposed to an exposure on photographic film. The digitized image is sto ...
, etc.


Developmental animation

With the resurgence of 2D animation, free and proprietary software packages have become widely available for amateurs and professional animators. The principal issue with 2D animation is labor requirements. With software like
RETAS RETAS (Revolutionary Engineering Total Animation System) is a 2D animation software bundle developed and sold by Celsys that is available for Microsoft Windows and Mac OS X. It handles the entire animation production from digitally drawing or trac ...
UbiArt Framework The UbiArt Framework is a 2.5D video game engine developed by Ubisoft Montpellier. Its function is to organize 2D animated vector graphics into a playable video game without extensive coding. History In 2010, Ubisoft announced '' Rayman Origi ...
and
Adobe After Effects Adobe After Effects is a digital visual effects, motion graphics, and compositing application developed by Adobe Inc., and used in the post-production process of film making, video games and television production. Among other things, After Eff ...
, coloring and compositing can be done in less time. Various approaches have been developed to aid and speed up the process of digital 2D animation. For example, by generating vector artwork in a tool like
Adobe Flash Adobe Flash (formerly Macromedia Flash and FutureSplash) is a multimedia Computing platform, software platform used for production of Flash animation, animations, rich web applications, application software, desktop applications, mobile apps, mo ...
an artist may employ software-driven automatic coloring and
in-betweening Inbetweening, also known as tweening, is a process in animation that involves creating intermediate frames, called inbetweens, between two keyframes. The intended result is to create the illusion of movement by smoothly transitioning one image int ...
. Programs like
Blender A blender (sometimes called a mixer or liquidiser in British English) is a kitchen appliance, kitchen and laboratory appliance used to mix, crush, purée or emulsion, emulsify food and other substances. A stationary blender consists of a blender ...
allow the user to do either 3D animation, 2D animation or combine both in its software allowing experimentation with multiple forms of animation.


See also

* 2.5D *
3D computer graphics 3D computer graphics, or “3D graphics,” sometimes called CGI, 3D-CGI or three-dimensional computer graphics are graphics that use a three-dimensional representation of geometric data (often Cartesian) that is stored in the computer for th ...
*
Computer animation Computer animation is the process used for digitally generating animations. The more general term computer-generated imagery (CGI) encompasses both static scenes (still images) and dynamic images (moving images), while computer animation refe ...
* CGI *
Bit blit Bit blit (also written BITBLT, BIT BLT, BitBLT, Bit BLT, Bit Blt etc., which stands for ''bit block transfer'') is a data operation commonly used in computer graphics in which several bitmaps are combined into one using a '' boolean function''. Th ...
*
Computer graphics Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
*
Graphic art software Graphic art softwareBob Gordon, Maggie Gordon ''The Complete Guide to Digital Graphic Design '', 15 March 2002 pp:44 is a subclass of application software used for graphic design, multimedia development, stylized image development, technical il ...
*
Graphics Graphics () are visual images or designs on some surface, such as a wall, canvas, screen, paper, or stone, to inform, illustrate, or entertain. In contemporary usage, it includes a pictorial representation of data, as in design and manufacture ...
*
Image scaling In computer graphics and digital imaging, image scaling refers to the resizing of a digital image. In video technology, the magnification of digital material is known as upscaling or resolution enhancement. When scaling a vector graphic image, ...
*
List of home computers by video hardware This is a list of home computers, sorted alphanumerically, which lists all relevant details of their video hardware. Home computers are the second generation of desktop computers, entering the market in 1977 and becoming common during the 1980s. ...
*
Turtle graphics In computer graphics, turtle graphics are vector graphics using a relative cursor (the "turtle") upon a Cartesian plane (x and y axis). Turtle graphics is a key feature of the Logo programming language. Overview The turtle has three attribut ...
* Transparency in graphics *
Palette (computing) In computer graphics, a palette is the set of available colors from which an image can be made. In some systems, the palette is fixed by the hardware design, and in others it is dynamic, typically implemented via a color lookup table (CLUT), ...
*
Pixel art Pixel art () is a form of digital art drawn with graphics software, graphical software where images are built using pixels as the only building block. It is widely associated with the low-resolution graphics from 8-bit and 16-bit era computers a ...


References

{{DEFAULTSORT:2d Computer Graphics Computer graphics