Download as pdf or txt
Download as pdf or txt
You are on page 1of 62

',

u..,.... ,. ... 0 cti e


i tur rea ion in Compute Gra
elopment and CAD/C ·
Product Modeling
l. duct Life Cycle Managemen
.3 .1 Purpose
1.3.2 Element of PLM
1.3.3 Implementing PL
Summary

as1c of om ter rap


2.1 Element of a Gr m
2.2 Graphic m·
2.2.l Inpu
2.2.1. G
.2. 1.
2..
oni rs

phi
I

Q} Scanned with OKEN Scanner


x Contents
3.1
3. Geometric Transformations
3.1
3.1 Types of Geometric Transformations
3.3
3 .2 Geometric Transf01mations_in 2 D
3.3
3.2.1 Cartesian Co-ordinate Transfonnations
3.6
3.2.2 Homogenous Coordinate System
3.6
3.2.3 Composite Transformations
3.7
3 .3 Geometric Transformations in 3 D .
3.8
3 .3 .1 Generalized Transformation Matrix
3.9
3.3 .2 Composite Transformations
3.10
3 .4 Examples
3.13
3 .5 Review Questions

_jProjection Transformations 4.l


4.1
4.1 From Object to Image
4.1.1 Types of Projections 4.2
4.2 Mathematics of Projection 4.3
4.2.1 Orienting 3 D Cameia 4.3
4.2.2 Projection Vector and Plane Eijuations 4.3
4.3 Parallel Projec~ions 4.5
4.3.1 Orthographic projections . 4.5
4.3.2 Multi View Projectio11s 4.6
4.3 .3 · Axonometric Projections 4.6
4.3.4 Oblique Projections 4.7
4.4 Perspective Projection . 4.8
4.4.1 Theory of Perspective Projections 4.8
4.4.2 Single and Multi Point Projections 4.9
4.4.3 Generalized Projection Transfof¥!ation Matrix 4.11
4.5 Exa~ples
4.12
4.6 . Review Questions
4.16
'
5._Geometric Design of Planar and Space curves
5.1
5.1 Types of curves
5.1
5.2 Basis for Curve Representation
5.2
5.3 Techniques for Curve Design
5.2
5 .4 Mathematical Basis for Curve Representation
5.3
5.4.1 Implicit and Explicit Curve Equations
5.4.2 Visual Representation of Curves 5.3
5.4.3 Vector Valued Parametric Equations 5.4
5.4.4 Properties of Parametric Equations 5.5
5.5 Curve Design from points· ' 5.9
5.5.1 Lagrange Interpolation Te_chnique 5.9
5.10

(l:: Scanned with OKEN Scanner


t t
. . . omputer graphics is an interesting field which enables the creation of virtual o d
digital. rmag · It provi~es ~sers software tools to model 3D object shapes and tran fo
dyn~ ~lly to crea~e an_im~tions. Computer graphics is widely used in a variety of applica 1 n
~ ientific data VIsuahzabon, Computer Aided Design and Manufacturing (CAD/C ae
rmagery weather forecasting, medical imaging computer animation advertizing tele i io
filmmaking. ' '
. This chapter will present a brief introduction to Computer Graphics and Product ode · g
with focus on CAD/CAM applications.

1.1 COMPUTER GRAPHICS

Computer graphics is a subfield of Computer Science which is primarily concerned wi e


synthesis, manipulation and visualization of digital images. In a broad sense, it focuses on e
computational techniques for the representation and manipulation of geometric and visual cont t o
an image. Computer graphics overlaps with fields such as Computer Vision and Image Proce sin o
several mathematical and computational issues.

1.1.1 Historical Perspective

The single event that marked the evolution of Computer Graphics as an important ne
was the publication of a Ph.D thesis in 1962 by Ivan F. Sutherland, a student at MIT. The th i
Sketchpad· A man-machine Graphical Communication System conclusively demon"trat
computer graphics was a viable, useful and exciting field of research with wide ranging ppli
potential.
Several researchers from academic and industrial laboratories ontributed ub"
evolution and growth of computer graphics as a discipline during the 60 . te
student at MIT created the first video game Spacewar using DEC omput r PDP-1
instant success. By the mid 60's, major corporations like TRW, IBM, Lo khe d - r i , n ral
Electric, Sperry Rand took active interest in computer graphic in term f d lopm t • h i '
and software. Dave Evans and I. Sutherland started the computer i n pr am · t lJ ni i ' f
Utah in USA. By 1970, it became the hub of pione ring r ar h , hi h ntribut d " ral
fundamental algorithms in computer graphics.
Realizing the potential of computer graphi , appli ation ori ,nt d r ~· rch a arri d ut
during the 70's. Prominent among the e d vel pm nt wa th m rg nc ~ ot omputer id d D sign

o~ Scanned with OKEN Scanner


nd Pr du t Mod Jin for 'A 0 'AM
1.2 mput r r rphi
0 r the ircr nd automobile
tur· ) r s v r 1 pp1ic tion are
( d m ut
m. rriu r it lity.
0
fr it 1
• 1 o put r phi
• I
. . . mani ulation of digital images, termed as Pi lure i of
In m ut 1 !!Ta h1 . r ation ~d . P dictated by the end application. or example in
th 1
param unt imp rtan •. Quality . f e _P tur~ is line drawing which consists of imple graphic
m ut
1
id .d Drafting the P1 tur~ . ma J aSolid Modeling, geographical imaging, games and
ntiti · - ~in . T t. etc: ~pphcatl: ; images (pictures) with colors, shades and ligh
0
n: u r arumatton need teah sttc _reu<le h g listic images at a specific time (frame rate) to create
r tion . Animation needs refreshmg sue rea
tion of object motion.
.
. Figure f ·cture creation in computer graphics. Two approaches are
I. I shows the process o pt
rnadl followed as under.

Graphics Software
Picture
Viewing Transformations
U er Geometric
Modeling
CAD Model
Data Projection
User Scanning
Point Data

Figure 1.1 Picture Creation in Computer Graphics

Geometric Modeling

Geometric modeling provides utilities to the user to create 2D/3D object shapes in the user
defined world. The modeler has a predefined set of geometric entities (primitives) like Point, Line, Arc,
Curve, Solids, and a set of tools to create, edit, and transform them. Advanced modelers like Feature
based systems enable user to model parts in terms of functionally relevant features for specifi
application domains like machined, die cast or sheet metal parts. Using the geometric modeler user
can create, manipulate, store and retrieve part and assembly models for CAD/CAM appli ti ns.
Techniques of geometric and solid modeling are explained at length further in the book.

Image Creation from Points

Quite often it is required to create digital images (pictures) from data whi h ha b n obtained
from satellite imaging, video, model (part) scanning or conduction of som scientific e perim nt. In
industrial product development scenario, designer sometime reat an ae thetic clay model of the
product such as an automobile. This activity is termed as styling. Th clay model created by artist is
digitally scanned and its shape is generated in the CAD modeling oftware from the points collected.

a~ Scanned with OKEN Scanner


Introduction 1.3
'[be point data or the CAD mod .
analysi a embly int rfi r n e i
AM application such as FE
imaging human organ ar •
r pi Pro typing. In medical
n trU tion of digital ima ( p b and the p int data i used for the
aru dfo ·
Th AD m d 1 data
u rat d ith r by th .
db th graphi ft.war to er ate hn g 11: tn m deler or from the anned p in is
age on the di play device.

1.2 PRODUCT DEVELOPMENT AND CAD/CAM

Due to global competition manufa tur· . . .


u h a shorter product life cycles frequented 1:°g mtl~s.tries worldwide are facing several challenges
· ' es1gn rev1s10 ·
produ t quality and the need for shortest time t k ns, requrrements of higher produc ivity and
D im and Manufacturing (CAD/CAM) techn
0

mahr et. To meet these challenges, Computer 'ded
ogy as been developed in the last three decades.

Designer ... Product Production


--,.. 1•
- ....
Design ....
Planning
I

.A

,r
II
Customers .. Sales
1.....
""II

Marketing ""II Manufacturing

Figure 1.2 Stages in Product Development

Figure 1.2 shows the stages in a typical product development scenario. Activities can be
conceptually grouped into four categories viz Product Design, Production Planning, Mamifacturing,
Sales and Marketing. These can be further classified into specific functional activities.

CAD/CAM technology essentially focuses upon automating and integrating these a tivities o
create flexibility and agility in the prod~ct development cycle. Computer Aided Design (CAD) focu es
on activities such as Conceptual Design, Detailed Design, Engineering Analysi As em I I
Interference analysis, Drafting while Computer Aided Manufacturing (CAM) deals with
programming, Robot planning, Factory management system involving Production Planning ateri
sales, forecasting etc. CASA/ SME (Computer and Automation Systems Association di · ion i
of Manufacturing Engineers, USA) proposed the concept of Computer Integrated anufa turin ...
(CIM) which essentially aims at integrating the Technical and Business function of an t ri · .
Figure 1.3 shows conceptually various activities in CIM. Product Design, Analysi . _and imul ti n
form important activities among them. In the context of this book, Computer graph1 an Pr 11 t
Modeling techniques for CAD/CAM applications are focused upon.

CJ~ Scanned with OKEN scanner


. 1hi . n Pr lu t Mo .fi ,fin for Al /i AM
1.4 nJ ut r

M t tin

Analysis

Finan Simulation

Manufacturing
Infonnation Manufacturing
Management Planning

Factory Production
Automation Control

Figure 1.3 Activities in Computer Integrated Manufacturing (CIM)

Product Modeling

Product modeling is the heart of any CAD/CAM activity as it creates a central repository of
roduct data which drives the downline application tasks. Product data can be broadly cla si:fied in o
two categories viz. Geometric and Non Geometric. Geometric data is concerned with produ .t iz
shape, features, constituent parts, their topology, surfaces, curves, vertex coordinates to name a fi .
on geometric data constitutes part name, number, production volume, material, part li t (BO 1 .
sales/ marketing data which is important for the business functions of the organization.

Efficient representation of product data is very important for the seamle integrati n
agility of the business functions of an organization. STEP is an evolving International tandar
efficient representation and sharing of Product Data in the electronic format. Du t ti
competition, several forward looking industries worldwide, are implementing STEP tan
integration of product development and other business functions. Thi , in s en i t rm d
Life Cycle Management.

a~ Scanned with OKEN Scanner


Introduction 1.5
1.3 PRODUCT LIF
y L ◄ MANA EM
.Pr du t ifi 1 Mana m nt (P M) d l . t

produ _t mfi Imation fur u 1out th Ii£ y I fa a with th r ation, modifi tfon and hange of
managmg pr du t d ta r 1 tin to t1 . P du t. .Jt r pr ' nt an 11-cn mpa ing vi ion for
manufa tur d g d . 1
d sign, prn<luctrn 1 upp rt and ltima ~ i po l f e

Owing th pa t decad m :5 . . .
in t:rumentation packaged goods an anu. acturers of I?dustnal machinery, con urn er ele onic
PLM and ar thus implementin ·t .d ~tbei c?mplex engmeered products have realized the benefit of
g 1 m mcreasmg numbers.
1.3.1 Purpose

PLM can be thouoht of b h •


as a communication o b as ot a repository for all information that affects a product as well
. . I p_rochess etween product stakeholders viz engineering manufacturing marketing
and field Service. t 1s t e first pl h . c. . • .' '
encompassed by Com t Aid d Dae~ w ere m1ormation from engmeenng and business functions
Aided Engineerino ~~r e ~sign (CAD) ' Co~puter Aided Manufacturing (CAM), Computer
(CRM) M ti O ~ ), En~erpnse Resource Planmng (ERP) Customer Relationship Management
d . ' anu actunng Execution System (MES), to name a few is integrated and shared between
es1gners, manufacturers, suppliers, and customers.

1.3.2 Elements of PLM

. . PLM in essence, is a collection of digital solutions for various engineetjng and business
applicat10ns. They can broadly be categorized as under .

• Product and Process Structure creation


• Program management
• Lifecycle change and configuration Management
• Engineering Collaboration.

Product and Process structure enable the management of product and process data for all
phases of the product life cycle. It encompasses process (project) related documentation, CAD desi
drawings, BOM, 3D model mockup data , etc to create a universal data model caterinb t th
management, users and partners. Program management targets new product development and att mp
to optimize processes from project planning, execution to progress analysis. It coordinat "th
accounting, sales, distribution, production planning, materials and maintenance activitie . Lin 1
change and configuration management support all c~ntral logistic processes and provide m hani m
to enable and track product/assembly/configuration changes at a higher level. The 0 0 m pr du t
quality and economics of business process. Engineering collaboration enables integrati n of t mal
and internal partners for an efficient product development scenario. It follow haring of kn wl dg
using Concurrent/ Collaborative principles.

a~ Scanned with OKEN Scanner


16
• Computer Graphics and Produ t Modeling/or CAD/CAM
I.3.3 llllplementing PLM

. PLM software developers offer range of solutions to industries to implement PLM. These are
essentially based on the International standard ISO t 0303 termed as STEP- Standard for Exchange of
Product Data

STEP provides variety of Application Protocols (AP) such ~s AP214 for automotive
mechanical design, AP 212 for electromechanical design and installation, AP232 for technical data
packaging core information and exchange, AP 203 for configuration controlled 3D design of parts and
assembles to name a few. STEP file format and APs are discussed at length further. (Chapter 9)

1.4 SlJMMARy

This chapter presented an overview of Computer Graphics and Product Modeling with a focus
on product development using CAD/CAM. Subsequent chapters will present in details, the
fundamentals of computer graphics, computer aided geometric design;. geometric and solid modeling
techniques and Product Data standards. ·

(l; Scanned with OKEN Scanner


Chapter 2
Basics of Computer Gra
. Computer
1 h Graphics
. forms the core of any CAD/CAM . .
interactive y synt esize part shapes, carry out their fun . activity. It enables a designer to
the assembly/ process. Computer Graphics • ctto?~1 analysis and simulate the performance of
digital prototyping. m essence, facihtates the creation of this Virtual World for

This chapter will introduce some k


Graphics systems. · ey concepts and present an overview of the Computer

2.1 ELEMENTS OF A GRAPmcs SYSTEM

In a computer graphics env · · ·


the conce tual architecture of a rr~nment, pz~tu~e I~ of pai:amount impoi:tance. Figure 2.1 shows
P graphics system md1cat111g vanous modules m the picture generation
process. ·

Graphics System

G Modeling
Use

u Analysis Data
Base
Display
I

Figure 2.1 Architecture of a Graphics System

User interacts with the system with the help of familiar interactive devices like a mot
keyboard. 1be system presents to the user a graphical layout termed as Graphical User lnterfa e
which is specific to the application task. User interacts with the system using the facilitie pr ided
the GUI. The data inputted by the user is processed by the graphics application software and the
picture of the desired model, process or graphical entity is finally displayed on the monitor t th u r.
Figure 2.1 shows that there are four conceptual parts of the graphics oftware viz GUI,
Modeling, Analysis, and Display. Database acts as a central repository which store ariou data files.
It provides integration and data sharing among the four elements of the graphic system during the user
interaction. Majority of the algorithms are written in the graphics/ application oftware. However a few
are a part of the graphics hardware or firmware to enhance the speed of picture processing and display.

Q; Scanned with OKEN Scanner


2.2 omput r Gr · hi and Produ t Mod !in for 'AD/i 'AM
mpri. , f two omp nents viz: hardwa.re and oftware.
u h a di pl( y device (momt~rs),. pnnter, _plotter an~
lnpu k b ard mou tabl t, joy tick or trackball. Detailed mf; rmat1on on t~eu
ntJ d antag ~/ limitation can be found in lite ature. Input /output devices
nun d inp will b di cu sed here.

2.2 GRAPHICS SYSTEM HARDWARE

2.2.1 Input Devices

U er interacts with the graphics system through the input devices. The most familiar input
d , · i th keyboard User types in commands using the keyboard which are displayed as Text on the
r n and interpreted by the computer during operation. Though efficient for text input, the keyboard
i a ery abstract and unfriendly device to draw shapes in graphics environmen~. As a result for
efficient graphics interaction many input devices such as mouse, trackball, digitizer (tablet) have been
de eloped over the years.

In what follows, basic concepts of user- computer interaction (GUI) and the working of
mouse will be presented.

2.2.1.1 Graphical User Interface (GUI)

During operation, user interacts with the computer through the Graphical User Interface
(GUI) which is specific to the application being executed. Figure 2.2 shows typical layout of a GUI.
Th: screen are~ is divided into different logical · sections to suit various desired functions. They
typically compnse of Menu, Command Prompt and the Graphics area. These _are discussed one by
one.

TITLE BAR

. - - - MENU
- opt
Option
ICON - opt
Option Text Menu - opt

Option Sub Menu

- Option
- Option Graphics Area
>> Command Prompt
>>

Figure 2.2 Typical Layout of a Graphical User Interface (GUI)

Q1 Scanned with OKEN Scanner


n si :.,· of "omput r ,r rphic 2.3
J\1enu
J,/( nu i th Ji t 1 tion pro id d by th , fl
u r in th m nu ar a in t\ l . r t th t s r. r Ii pl ye t th

• T , b d m nu ·1 m t 1m d
• (pi tur ut 0t t m

lf th
rar I

G n rall the menu options are organized in the Hierarchic fa hi n and are ·
fun ti nal QfOUp · ?11
clicking a specific icon, the menu options in that category croll do
er t pi k from. Figure 2.2 shows a typical scroll down sub menu.

Command p ompt

The command prompt area in GUI is generally kept at the bottom of the screen e 2.
Text commands entered by the user are displayed there and executed in the command mode ~
ystem. Command prompt option is generally used by the experienced users of the CAD syst ~
know which command is to be used in a particular design operation. They do not want to wa e
the cascade of m en us and submenus to reach to the desired command. Command based operati
enhances the user productivity.

Graphics area

It is the area on the screen where the picture (CAD model) is displayed. User can int t
the model using the input device. Figure 2.3 shows various activities carried out by the u er.

TITLE BAR
MENU

Pick
Button

+ Lo ate
+

Valuate

Figure 2 _3 Logical Input l ntera tiv Fun tion

o~ Scanned with OKEN Scanner


2.4 omput r ra hi and Pro Ju ·t U d !in o 'AD} 'AM
und .

m
phi (pi tur ) entity

a tion~.
m us

Th ouse

Mouse i a u er friendly input device connected to the computer. Mouse rests on a flat surfa~e
(pa table) and can be moved in X -Y directions on the surface by the user. Movement of the mouse 1s
tran formed electronically into the movement of the cursor on the computer screen. User can thus, get
an immediate visual feedback on the action of moving the mouse. Mouse generally has 2 or 3 buttons
on the top surface which can be used to select items in the menu to communicate actions to the system.

Mouse was invented by :Qr .Douglas Engelhart, a Professor with Stanford Research Institut e,
California, USA in 1964.The unit had one button on the top and two wheels at the bottom which
tracked the horizontal and vertical movements. A cable transmitted signals from the device to the
computer. Looking at the long cable, a member of Dr. Engelbart's team remarked that the device looks
like a mouse and the name stuck even today. The development of personal computers stimulated the
development of mouse. Various designs were developed by Xerox, Macintosh, Apple, Video game
develop~rs and even at NASA for flight devices. Figure 2.4 shows the inside details of a typical Opto-
mechamcal mouse commonly used in practice.

Encoder □ Photo transistor


,-.-....-.------

~
LED

Y- Roller

Photo
X- Roller

RLED
Electronic ir uit

Figure 2.4 Construction of an O,ptomechanical mouse

a~ Scanned with OKEN Scanner


Innovations are constantly being done on making mouse moi:e and more user friendly an
interactive. Nota~le among these include optical mouse without ball, wireless (tail free) mouse
Internet mouse with scroll wheel between buttons to name a few. Track ball is an inverted mo e
wherein the user rolls the ball to move the cursor. These are used in Laptop computers and game
stations.

2.2.2 Display Devices

Computer monitor is an important output device in the graphics system as the pi tur i
finally displayed on it. Applications such as CAD/CAM, animation, entertainment have different
requirements for the output picture in terms of resolution, color realism and dynamic picture updat .
Monitors, thus, need to have functional characteristics like high resolution, good pictur quality
realism in image rendering (color, shading) and fast dynamic display.

Currently display monitors based on two different technologies are used. The ar Cath
Ray Tube (CRT) and Liquid Crystal Display (LCD) technology. Desktop graphics tern ha -n
using CRT monitors for the last 3 decades but the soenario is changing fast toward d ktop 1 D
monitors. Laptop computers have LCD monitors since their inception a decade ago.

In what follows, a brief overview of CRT and LCD monitors for graphic ·n
presented from the functional (user) considerations.

Q; Scanned with OKEN Scanner


2.6 Comput r Graphi and Produ t Mod lingfor JWf ~M

2.2.2.1 CRT Display Monitors


RT) t chnology in which the screen is
Th monitor pritwrrily u the Cathode Ray Tube ~ e t enerate a spot which is
O
oated with hi h tlu r ence hos hor. Beam of electrons stnke th e screenh g istent phosph or the
di pla d b hanging lectric signals applied to the CRT tube. Due to t ~l~ers bas been used ~ince
image dr wn by the electron spot appears to stay on the screen. CRT tecbn gy
alm "t th in eption of computer graphics in mid 60s.

CRT monitors fall into three categories as under·

• Direct View Storage Tube (DVST) Graphics displays


• Calligraphic refresh Graphics displays
• Raster Refresh Graphics displays

DVST is conceptually the simplest and oldest of the CRT displays. The screen ~a~ high
persistence phosphor causing the image to remain on screen for a very long time. How~ver this 18 also
a disadvantage as it is not possible to selectively erase a picture or part thereof. T~e entrre screen ~eeds
to be flooded, erasing the whole picture in the process. The DVST dis~lay pr~v_ide~ excellent picture
quality, flicker free operation and accurate line drawing but the level of mteractlvity 1s poor•

In comparison with DVST, the Calligraphic refresh display has a low persistent phosphor
screen. The image drawn by the electronic spot on the screen needs to be refreshed often (at least 30
times a second) to maintain the persistence of vision. The calligraphic displays are often called as
Random Scan or Vector displays. They are basically line drawing displays.

For their operation, Calligraphic displays essentially need a Display Buffer and a Display
controller in addition to the CRT (Figure 2.5). Picture processor routines implemented in hardware
compute data on coordinates, transformations, projections etc and stores in the buffer all the
informatic,n of the picture to be drawn. The display controller steps through the buffer to display
vectors in the picture and at the end of the refresh cycle automatically reset to the top of the buffer to
step through again. Needless to say that if the picture i~ too complex (many vectors) or the refresh rates
fast, the display will cause flicker. Special techniques are needed in the design of the buffer to address
such problems.

-
I

Computer Picture Display Display Vector CRT


CPU
- Processor
- Buffer
- -
,I Controller Generator Display

F .~ure 2.5 Conceptual modules for a calligraphic refresh display

Calligraphic displays provide capabi~ities of dynamic picture update i.e. the content of the
buffer can b~ up~ated on the fly dur~g refresh. Both DVST and Calligraphic displays were
monochromatic. With the advent of color d1spl~ys, Raster ~aphics displays have became more popular
in the last two decades. Today Raster graphics color displays are commonly used on all desktop
graphics systems.

(l} Scanned with OKEN Scanner


n 1. ·I ,· (?Ir omput , ,r Jr rph · \' 2.7
2.2.2.2 Raster Graphi · R'" Di pin.·

A B

· Figure 2.6 Raster Approximation of a line


d .
The P,~ocess of approximating the graphics entity (Line, Circle) by discrete pixels is t as
· Rastesrization. Due to rasterization, all lines will appear to have a stair step effect. These are call as
aliases or jaggies. Raterizing algorithms need to take care of the aliasing effect to create reasona e
approximations of lines. Typical raterization algorithms will be discussed further in this chapter un
Graphics software.

Frame Buffer

Frame buffer is the part of computer memory which drives the raster. Conceptuall fram
buffer can be considered as a matrix which has one memory bit for each pixel on the creen. F' gur - ·
shows a single plane frame buffer for a black and white CRT graphics device.
II

II 1 I DAC
- I
Register -

rame Buffer RT Ra t r Di pla

Figure 2. 7 Single bit plane frame buffer raster RT di play

Q; Scanned with OKEN Scanner


=
-
- I

-- 'I

- I
Register

I 0
I 1
l 0 j I
,-..-
,-..-

23 DAC I j
Frame Buffer I I

CRT Raster Display

Figure 2.8 A 3 bit plane grey level frame buffer

A similar arrangement can be used for a color raster. There are three primary colors Red (R)
Green (G), and Blue (B). Figure 2.9 shows the 3 bit plane color frame ~uffer arrangement. Each bit
plane drives one color gun R, G, or B. The pixel on screen will be controlled. by the 3 bit word based
on the combination of R, G and B colors. Table 2.1 shows the color combinations and the resulting
colors for a 3 bit plane color frame buffer

Table 2.1
Color Combinations in 3 bit plane frame buffer

No Color Red Green Blue


1 Black 0 0 0
2 Red 1 0 0
3 Green 0 I 0
4 Blue 0 0 I
5 Yellow 1 1
6 :yan 0
0 l
7 Magent 1
I 0
8 White l
l 1 I

0 1 Scanned with OKEN Scanner


Bast . of omput r raphic 2.9
R it

=== 3
~

~- - 11

0 DA ' -
!Jiu
_,_..
,..- ........

--
~- -
--
II

0
DA

DA
r en I
I
- ~ ,..._ -

~~
..- -
r-
--
-r-
-r--

-r-
,.......
Red -

~ RT Rater Di play
--Fram Buffer

Figure 2.9 Simple color frame buffer raster CRT djsplay

Figure 2.8 and 2.9 show how a 3 bit plane frame buffer can effectively change the inten ity
(grey level) and col?r of ~he pixel. The two conc~pts are integrated to change both color and inten ity
in a color raster deVIce. Figure 2.10 shows a 24 bit color frame buffer. For each primary color R G B,
8 bit planes are implemented. Thus each color has 28 intensity levels. These 8 bit binary words drive
each color gun through
24
individual 8 bit DAC. Further the three primary color intensities are combined
8
to yield (2 )3 = 2 = 16,777,216 possible colors

II
N=8 8 bit Register
~

~
- II 1
8 bit
~ oI1 I.- -- Io I1
~ -

DAC Blue

f"""-,,"-
--...r--,..
N=8 ..............

=
-
:01i1---
I
1011:
8 bit
--{DAC Green~
-- -~ V
/
/
-■

./
./

CRT Ra ter Displa


N= 8
- I
8 bit
~0111--- 1011 DAC •I Red

Frame Buffer

Figure 2.10 A 24 bit plane color frame buffer raster CRT display

Thus a 24 bit plane frame buffer is capable of producing 16 million olor . Thi tb full
color frame buffer.

Q; Scanned with OKEN Scanner


2.10 Computer Graphic and Product A;fod ling for CAD/CAM
.. ku tables This facilitates
1 100
The full olor fram buf£ r an b , pand d by 1 ing co or P ·. h
customization wh r in gr f I r fr m th p ibl pal tte can be chosen at a tune by t e user.
To achie e dynami pi a I ti, pi I in ·oup of 16, 32, 64 etc are accessed i.e. all

bit plane for a pi; 1 ar a d


bufli r p1 id - apability to manipulate the color and inten_sity of each
Th r ult th ra ter RT di plays a e capable of producing real hfe
individual pix 1 f th
dynami pi tur r qmr mput r graphics and animation.

2.2.2.3 LCD Monitors


Though CRT technology is quite mature and widely in use for the past 30 years, it ~as some
b i limitation . The CRT monitors are quite bulky and consume lot of power. They are smtable for
d bop applications only.

Liquid crystal display (LCD) technology was developed in the last 15 years a s an alternative
to the CRT. In · the initial days LCD technology was limited to monochromatic displays which are
widely used in calculators and digital watches. However in the last few years LCD color monitors h ave
been developed which are used in laptop computers and home TVs.

In what follows, the principle of operation of LCD monitors is presented from user' s
perspective

The LCD principle

CRT LCD primarily use_s the pr~ciple of Polarization of light to display objects. Like the raster '
, the LCJ? screen (momtor) consists of an array of tiny pixels (segments) that can be manipulated
to effect the display.

~ -,------.;~~:--~~E---f-+-------E~--t-:_,?._---4-~_J Polarizer
Glass

~ ~...c..-::::::=--L::=~~=::L..~~~_L:___L-L~LJ Electrode
r----_____:===-----====-----====---==-__:==-_J Color Filter

Liquid Crystals

Alignment Layer
Electrode
Glass

_ ___..__-'---L-L_-L.___.L__L_~L.L..~~L_j Analyzer (Polarizer)


Figure 2.11 Construction of a Liquid Crystal Display

Q1 Scanned with OKEN Scanner


Basi s of omputer Graphics 2.11
. .11 th tru ti r n. Ith s o/ariz rand an Analyzer on the
top and b ·· · ·
n. h ' mbly h e1 ctr de for upplyjng
I

oltag durin
u 1 lly p rp ndi ular to c ch other. The
liquid rystal
m in onta t w jth o ed , ur f: e having
fi.: d ri nt ti

Figure 2.12 Alignment of liquid crystal molecules

Figure 2.12 shows the process of alignment of the liquid crystal molecules. It sh " th
structural arrangement of molecules when no voltage is applied. It can be seen that the m le\; l
provide a Twisted structural arrangement from top to bottom. Figure 2.13 shows the path of li
through the LCD under no Voltage condition. Polarized light enters the LCD from top and
through the spacing of the molecular arrangement. In turn, the light gets twi t d b 90°. I fin
passes out of the Analyzer at bottom which in effect, is another polarizer. Sin e th ligh
through the display, it looks transparent. When the voltage is applied the molecule trai ht n ut f
their helix pattern and get aligned along the direction of voltage as shown in Figure .1 . Th lariz
light now does not get twisted and so cannot pass through the analyzer. The LCD ,egm nt thu, l ·
opaque.

(l; Scanned with OKEN Scanner


2 -12 omput r r ph; s nd Produ t M d !in for 'A 0 'A M

0
C)
C) Twist
C)

No Light

No Voltage Voltage Applied

Figure 2.13 Path of light with and without Voltage

For a color LCD, each pixel consists of 3 color sub pixels Red(R), Green (G) and Blue (B)
similar to the color CRT. These are arranged very closely on a LCD monitor. The pixels are controlled
by a matrix of Thin Film Transistors (TFT). For each sub part of a pixel (R, G, B) there is a TFT to
control the color and intensity. The TFT associated with each sub pixel controls the voltage applied to
the equalizers (Figure 2.13) and thus changes the orientation of the molecules. The voltage control
makes it possible to orient the molecules in millions of directions with fine .control and thus produce
corresponding intensities in the respective color tones. As a single pixel consists of 3 primary colors,
the overall visual effect is the hundreds of thousands of different colors.

Advantages and limitations

LCD monitors offer many advantages compared to ·a CRT display. Important among them are
as under
• Very light weight
• Sleekness and portability
• Very low power consumption
• o electromagnetic fields
• Longer life

LCD monitor, however, have a poor viewing range ( 45°). High r olution a t· tr· di
· H · h d ·
are expens1 ve. owever wit a vances m techno1ogy, thes will o n b ov r O 1 1
LCD 1 . sp ays
ma
the future of the graphics display . m · mom tor are

a~ Scanned with OKEN Scanner


Ba, i , of 'omput r raphi s 2 13
2.

th 0 t
). re en ble h
k

u fr m
rmatio d om
r . 1 di play 1 o ithm re oft un
1 di pla perfi rman . he hird c mponen
tan . r vt ie programmer utilitie to write application so an e
graph1 m d 1 data t other oftware for integration.

In what followmathematical basis of the viewing pipeline and ra ter can grap
algorithm ar presented. Product data standard is discussed at length in Chapter 9.

.3.1 Viewing Pipeline Transformations

The objective of Viewing Pipeline ·algorithms is to primarily transform•object models in 3D orld


into pictures on the graphics system device (monitor). Figure 2.14 shows the conceptual representati
of the viewing pipeline transformations. It primarily comprises of three modules as under

• Projection Transformations
• Windowing and Clipping .
• Window to viewport mapping

Various modules of the viewing pipeline are discussed one by one.

II
Monitor
y Viewing Pipeline

B Q ~rojection [Windowing
I
Window to
View port E1J
!Transformations and Clipping
X ~apping
z Object

Figure 2.14 Viewing Pipeline

2 3.1.1 Modeling World

In computer graphics, user models ~he objects (scene) in the computational / m th ~ati al
3
world. The modeling space is a bounded space in R defined b~ th~ user. In _omput r g_r pht d
CAD/ CAM, Right Handed Cartesian Co-ordinate system shown m Figure 2.1 1 u d. It 1 an
the World Co-ordinate System - WCS.

Q1 Scanned with OKEN Scanner


2 14

_,_.,,.IP ll"I io tion


. wing transformation. Projection operatio im
th fir t and mo t importdant :tie 20 image on the viewing plane onceptual]y hat
. d 1 in worl to 1 s . . e
tran "D miing th . D obJ t mo e . h apshot of an obJect usmg a camera. In c rnp t
. . ·1ar to taking t e sn . . er
r ~ ti n p ratton I m~ d to effect this operatton
a ,rtual am era 1 u e

View
y

Camera

z X

Figure 2.15 World Coordinate System (WCS) with Virtual Camera

Figure 2.1 5 shows the Virtual Camera located in the world. User ·defines the location an
orientation of the camera in the WCS. The camera looks at the objects and based on the type f
projection desired (Parallel / Perspective), it creates projection of the object on the viewing plan
(Figure 2.15). The projected image of the object created on the view plane is 2D in nature an i
represented on the view plane in its local coordinate system (Xp - Yp). The 3D object mod 1 ·
represented in world (WCS) in terms of its Faces, Edges and Vertices etc.

Fundamentally, the object faces, edges, vertices and their interconnections (tenned a
top~l~gy) do not ch~g~ during t?e process of.projection. The object vertex is represented in a
1
posrtton vector P ~ th its co?rdmates x, Y, z i.e P(x, y, z). During projection it gets tran form d t
Pp(Xp, rp) on th ~ view plane m Xr - Yr coordinate system. All vertices of the ob1ect ar tran fomi d
accordmgly dur th
.
th e obJect
· •·
on the view plane.
· J •
m~ e proJectton. onnectmg them as per the object topology creates th proJecnon
• f
°

8.
Mathemati al ha i of p 0 · t •
an
J .
4.Techniques of geometric d r1 Je 10.n tran form~t:Jon
° modeling of 3D obJect
. . . Ch pter
ts presented in details JD ;
are di cussed at length in Chapters an
d

o~ Scanned with OKEN Scanner


2J

I t
----------- -- -' t

'- -
Window Clipping

Figure 2.16 Windowing and Clipping Transformation

By adjusting the size of the window with reference to the projected image
pi tur n displa can be changed. During operation, the user dynamically drag
win do to hange the size of image on display. This operation is termed as Zoomin .

. 1. indow to Viewport Mapping

This transformation essentially aims at mapping the contents of the window on


plane on o a specific part termed as Viewport on the display device (monitor). Thi op ra
out in two steps as under.
• Window to Normalized Device Coordinate (NDC) space
• NDC space to Viewport

These are explained one by one.

indow to NDC space

During the projection transformations, vertices of the 3D object ar m p


plane (Xp-Yp) plane. Figure 2.1 7 shows a typical projected point PP( P n th
the window defined by comers (Xwt Yw1 ) and (xw2 Yw2). The point Pp _p
ormalized Devi e oordinate (NDC) frame defined by - Y . Th m pp
b

o~ Scanned with OKEN Scanner


2.16 Computer Graphic and Product Modeling /or CAD/CAM

( w2 Yw2) Y N ~~
--- --- ----- ---• ' -- - ----,(1 , 1)

\ ~y,. l) . - -- - - - -- - _,

Window Xp (0, 0) NDC

Figure 2.17 Wintlow to NDC Transformation

NDC to Viewport Mapping

Display monitor is a raster refresh display. It is, in essence, a matrix of pixels (m x n) as per
the resolution of the screen. Figure 2.18 shows the raster screen and its display coordinate system Xo _
Yo. It is important to note that the origin of the display coordinate system is at the Top Left comer of
the screen. The coordinate system is integer in nature due to the pixel matrix on the screen. Since the
resolution of the monitor may be variable as per the specific one used, the viewing pipeline maps the
window contents to NDC for general transformations. NDC to vie""J)ort mapping is specific to the
display. ·

Orim·,n.----~------_.Xn
(Xvi Yv1)
t--------JO, 1) ,--------,
I . I
1
I
V1ewport 1
I
I I
L----------
. (xv2 Yv2)
t-------_J (m, n)
... Yo
(0, 0)
Device Coordinate System

Figure 2.18 NDC to Device Coordinate System Transformation

Viewport is_a spe~ific rectangular area on the device wherein the contents of window are
finally mapped. It 1s specified by diagonal comers (x 1 y ) and (x y ) A ·11 tr ti
considering that NDC space is mapped to the entire scree~ 'cd/. ) th v2, v2 • s ~ I us a on
on the display (Figure 2.18) will be given by VIce ' e transformed pomt pd (xd Yd)
Xd = X0 .ffi
Yd = (1 - Yo),n
2.2
where (m, n) is the monitor resolution in Xo _ y _
0

The viewing pipeline thus transforms a · t P( )• .


Pd(~ Yd) in the 2D image world 0 ~ the device. pom x, Y, 2 m 3D obJect world (WCS) to the point

o~ Scanned with OKEN Scanner


Ba. i ·s of omput r raphic 2.17
2.3.2 Ra te can I phi

. di t li . tl
ra t I di 1 l y ,· ~1·1111·1· to
l . f .
dar b l1 t Th · 0
m tn x o pixels which can be made
n . 1 . thm 1tphi di pl y w'tll thus, b pprox1m · t d to the re lu ion of the
h d · .n £ r dr wit g gtaphi primitiv like ine, ircle et are u ·u lly implemented in
ar · to m1pro th d f di play.

In hat follows ra t r scan algon·tht·ns c. •


101
L'me dr awmg
. will
. be presented.

2•3•2· Lme Drawing Algorithms

. Ra_sterization is the process of determining which pixels should be made bright to provide be
;yJ~~Xllllation f~r drawin~ ~ desired lin~. Figure 2.6 shows various situations of rasterization. For
0
. _ntal, _Vertie~/ or 45 lines, the ch01ce of raster elements (Pixels) is obvious. However for other
bne onentation s (Figure 2.6 B) it needs some decision.

The ~eneral requirements for line drawing are as under

• Straight lines must appear as Straight lines.


• They must start and end accurately.
• Lines should have constant brightness along their length.
• Speed of drawing lines should be fast.

_ It is very difficult to satisfy all the above requirements simultaneously. As a result


compromises are sought in drawing lines which give reasonable accuracy, brightness and speed in
drawing. Figure 2.19 shows two alternate ways of drawing a line. The candidate pixels are shown by ..
Both options however, provide , uneven brightness. Special algorithms are needed to handle such
problems.

Figure 2.19 Rasterization of a straight line

Two most widely used algori~hms for raster lin~ drawing ar Digital Diffi r ntial Analyz r
(DDA) algorithm and Bresenham's algorithm. These are dt cu sed belo •

o~ Scanned with OKEN Scanner

You might also like