CG-Lect 1 - Output Primitives
CG-Lect 1 - Output Primitives
Systems
• Vector:
Set of complex objects positioned at specified coordinates locations within the
scene.
Shapes and colors are described with sets of basic geometric structures.
• Each one is specified with the input coordinate data and other information about
• In order to draw the primitive objects, one has to first scan convert the objects.
Attributes Parameter of Output Primitives
• The way a primitive is to be displayed, referred as an attribute parameters.
• Example:
• Line Type
Primitive Attributes • Line Width
• Color
Line
• Pixel Positions are referenced according to scan line number and column
number (column across the scan lines)
• Scan Lines start from 0 at screen bottom, and columns start from 0 at the
screen left side.
• Video controller reads from the frame buffer and plots the screen pixels.
Points
• Point is the fundamental element of picture representation.
• Two points represent line or edge and three or more points represents a polygon.
Random-scan systems: stores point plotting instructions in the display list and
co-ordinate values in these instructions are converted into deflection voltages
that position the electron beam at selected
B/W raster system: Within frame buffer, bit value is set to 1 for specified
screen position. Electron beam then sweeps across each horizontal scan line, it
emits a burst of electrons (plots a point) whenever value of 1 is encountered in
the frame buffer.
RGB raster system: Frame buffer is loaded with the color codes for the
intensities that are to be displayed at the screen pixel positions.
Points (contd.)
Syntax:
In Raster graphics, create a discretized image of the whole screen onto the frame
buffer first. The image is scanned automatically onto the display periodically.
The graphics objects are continuous. The pixels used are discrete. Each pixel can
have either on or off state.
Scan Converting a Point
A mathematical point 𝑥𝑥, 𝑦𝑦 , where x and y are real numbers within the image area,
This can be done by making 𝑥𝑥 ′ to be the integer part of x and 𝑦𝑦 ′ the integer part of y,
This essences place the origin of a continuous coordinate system 𝑥𝑥, 𝑦𝑦 at the lowest
For example:
Display coordinates points 𝑃𝑃1 1.7, 0.8 is represented by the pixel 1, 0
In this we scan 𝑥𝑥, 𝑦𝑦 by making 𝑥𝑥 ′ = 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑥𝑥 + 0.5 and 𝑦𝑦 ′ = 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 𝑦𝑦 + 0.5 where
function 𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓𝑓 returns the largest integer that is less than or equal to the
argument.
This essentially places the origin of a coordinate system 𝑥𝑥, 𝑦𝑦 at the centre of the
pixel 0,0
All the points that satisfy 𝑥𝑥 ′ − 0.5 ≤ 𝑥𝑥 < 𝑥𝑥 ′ + 0.5 𝑎𝑎𝑎𝑎𝑎𝑎 𝑦𝑦 ′ − 0.5 ≤ 𝑦𝑦 < 𝑦𝑦 ′ + 0.5 are