Computer Graphics/Two Dimensions

Two dimensional graphics is graphics drawn on a plane surface. In computer graphics, graphics are drawn on a two dimensional computer display. However, other applications like Augmented Reality (AR) and Virtual Reality (VR) can produce spatial three dimensional graphics. Also, techniques like Holography can create three dimensional illusions of real objects- unrelated to computer graphics. Computer graphics need not be two dimensional, though it often is for computer users. The process of converting a higher dimensional computer graphics object into a two dimensional representation is called rasterization.

The Cartesian Coordinate System

edit

Two dimensional graphics are represented by a cartesian coordinate system. Usually, the origin is at the top left corner of the screen, but the graphics programmer may use any other point as origin. For easier calculations, the center of the screen is often used. The Cartesian coordinate system uses a list of numbers to represent the position of a point. In two dimensions, the list has two numbers. These numbers describe how far the point is from the origin, in terms of horizontal and vertical distance.

The Polar Coordinate System

edit

Although modern (rectangular) displays are not suited for polar coordinates, it can be useful for drawing curves. In this system, a given point lies a given distance from the origin at a given angle. Just like both horizontal and vertical distances can uniquely represent point location in Cartesian Coordinate system, both the distance of given point from the origin and the direction it is oriented towards from the origin uniquely represent point location in polar coordinates.

Transforming Coordinate Systems

edit

Generally, the graphics objects are drawn with their own coordinate system different from the screen coordinates. Thus the representation of the object is separate from that displayed. For this reason, it is required to transform the graphics objects from the (logical) coordinate system they were made on into coordinate system that can be measured in real world.

Representing Two Dimensional Graphics Objects

edit

<TODO>

Graphics Transformations

edit

<TODO>

Colors and Textures

edit

<TODO>