Computer Graphics
Computer Graphics
3) Color Theory: Understanding color theory is crucial for creating visually appealing
graphics. This includes knowledge of color models (RGB, CMYK, etc.), color spaces,
color harmonies, and the psychological effects of color.
6) Ray tracing: Ray tracing is a technique for generating an image by tracing the path
of light through pixels in an image plane. The technique is capable of producing a
high degree of photorealism; usually higher than that of typical scanline rendering
methods, but at a greater computational cost.
10)Projection Methods: Projection methods define how 3D objects are projected onto
a 2D screen or surface. Common projection methods include perspective projection,
orthographic projection, and isometric projection.
SIMPLE COLOUR MODELS
Colour models are mathematical models that describe the way colors can be represented
and displayed. Here are two simple color models commonly used in computer graphics and
design:
1. RGB (Red, Green, Blue):
RGB is an additive color model where colors are represented by combining different
intensities of red, green, and blue light.
Each color channel (R, G, B) typically ranges from 0 to 255 in an 8-bit system, where
0 represents no intensity and 255 represents full intensity.
By varying the intensity of each channel, a wide range of colors can be produced. For
example, mixing full intensity of red and green produces yellow.
RGB is widely used in electronic displays such as computer monitors, TVs, and
digital cameras.
2. CMY (Cyan, Magenta, Yellow):
CMY is a subtractive color model used in color printing and reproduction. It
represents colors by subtracting different percentages of cyan, magenta, and yellow
ink from white.
When all three colors are combined at full intensity, they subtract all wavelengths of
light, resulting in black (although in practice, a small amount of black ink is usually
added to improve color accuracy and depth, leading to the CMYK model).
CMY is complementary to RGB: mixing equal amounts of CMY produces black in
theory, while equal amounts of RGB produce white.
These simple color models provide different ways to represent and manipulate colors in
digital and print media, each with its own strengths and applications.
VIEWING TRANSFORMATIONS
Viewing transformations are an essential part of computer graphics, particularly in the
context of rendering 3D scenes onto a 2D screen. These transformations involve
transforming objects and their positions relative to a camera or observer to create the
desired perspective or viewpoint. Viewing transformations typically include:
1. Translation: Shifting the entire scene or camera position along the x, y, and z axes.
Translation is often used to reposition the viewpoint or center the scene within the
viewing frustum.
2. Rotation: Rotating the entire scene or camera orientation to change the viewing
direction. This transformation allows for viewing the scene from different angles or
perspectives.
3. Scaling: Adjusting the scale of the scene or objects within it. Scaling can be used to
zoom in or out on the scene, changing the apparent size of objects relative to the
viewport.
4. Projection: Transforming the 3D coordinates of objects into 2D coordinates for
rendering on a 2D screen. Projection can be performed using various techniques,
such as perspective projection or orthographic projection.
5. Viewport Transformation: Mapping the 2D coordinates of the scene onto the
screen or viewport. This transformation involves specifying the position and
dimensions of the viewport within the window or display.
CLIPPING
Clipping in computer graphics refers to removing objects or parts of objects outside of the
visible area of a computer screen. It is a fundamental operation used to determine which
objects or parts of objects are visible within a specified region, called the viewing frustum
or clipping window, and discard the portions that are outside of it. Clipping is essential for
rendering scenes efficiently and accurately. The viewing frustum defines the volume of
space that is visible to the viewer or camera.
Types of Clipping:
Point Clipping: Determines whether a point lies inside or outside the
viewing frustum.
Line Clipping: Determines whether a line segment lies entirely inside,
partially inside, or entirely outside the frustum.
Polygon Clipping: Determines which parts of a polygon lie inside or outside
the frustum. Common polygon clipping algorithms include Sutherland-
Hodgman and Weiler-Atherton.
3D Clipping: Involves clipping objects in 3D space against the viewing
frustum, typically performed after applying the projection transformation.