Mechanical BE (Machine Drawing & Computer Graphics-II)

Page 1

I ns t i t ut eofManage me nt & Te c hni c alSt udi e s

MACHINE DRAWING & COMPUTER GRAPHI CS

II

500

BACHELORI NMECHANI CALENGI NEERI NG www. i mt s i n s t i t u t e . c o m


IMTS (ISO 9001-2008 Internationally Certified)

MACHINE DRAWING & COMPUTER GRAPHICS

MACHINE DRAWING & COMPUTER GRAPHICS FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS CONTENTS:

UNIT-I

01-09

SECTIONAL VIEWS Introductions ,Need for sectioning ,Hatching ,Inclination of hatching lines ,Spacing hatching lines ,Hatching of larger areas ,Hatching of adjacent parts ,Sketch and of ful1 section, ,Half sections ,Types of half section,Partial or local sections, ,Revolved or super imposed, ,Removed sections ,Offset sections.

UNIT – II

10-27

LIMITS, FITS AND TOLERANCES Introduction Definition of various term used in limits Hole basis system, Shaft basis system ,Types of fits, fits Shaft and Hole –Terminology Clearance ,classification of fits, Selection of fit and applications ,Types of Tolerances,Form and position,Indication of tolerance and fits on the drawing

UNIT-III

28-46

KEYS AND SURFACE FINISH Introduction ,Classification of keys,Sunk key,Saddle key,

Flat

key,Gib

head

key,Feather key,Peg key,Single head key,Double head key,Spline shaft,Woodruff FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


key,Pin key,Cone key,Definitions,Nominal surface,Roughness,Waviness,Lay,Sampling length,Production method and surface quality,Symbol for lay,Indication of surface roughness for various machining operations,Surface texture symbol with all the characteristics,System of Indication surface texture symbols on drawing

UNIT-IV

47-63

SCREW THREADS AND THREADED FASTENERS Introduction,Nomenclature of

Screw threads,Basic profiles or forms of screw

threads,Left hand thread,Right hand thread,Internal thread,External thread,V-Thread – whit worth thread,Square thread,Designation of threads,Bolt and nut,Drawing of hexagonal bolt and nut,Drawing of square head bolts,Riveted head,Types of rivet heads

UNIT- V

64-79

A Survey of Computer Graphics - Overview of Graphics Systems: Video Display Devices – Raster-Scan Systems – Random-Scan Systems – Input Devices – Hard-Copy Devices

UNIT- VI

80-101

Output Primitives: Points and Lines – Line Drawing Algorithms - Loading the Frame Buffer – Circle-Generating Algorithms – Ellipse-Generating Algorithms – Other Curves – Parallel Curve Algorithms – Pixel Addressing and Object Geometry – Filled-Area Primitives - Character Generation – Attributes of Output Primitives : Line Attributes – Curve Attributes – Color and Grayscale Levels – Area-Fill Attributes – Character Attributes – Antialiasing.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


UNIT-VII

102-129

Two-Dimensional Geometric Transformations : Basic Transformations – Matrix Representations and Homogeneous Coordinates – Composite Transformations - Other Transformations – Two-Dimensional Viewing : The Viewing Pipeline – Viewing Coordinate Reference Frame – Windows-to-Viewport Coordinate Transformation – Clipping Operations – Point Clipping – Line Clipping: Cohen-Sutherland Line Clipping – Liang-Barsky Line Clipping – Polygon Clipping: Sutherland-Hodgeman Polygon Clipping – Weiler-Atherton Polygon Clipping – Curve Clipping – Text Clipping – Exterior Clipping.

UNIT-VIII

130-151

Three-Dimensional Concepts: Three-Dimensional Display Methods - Three-Dimensional Geometric and Modeling Transformations: Translation – Rotation – Scaling – Other Transformations – Composite Transformations - Three-Dimensional Viewing: Viewing Pipeline – Viewing Coordinates – Projections – Clipping.

UNIT-IX

152-176

Graphical User Interfaces and Interactive Input Methods: The User Dialogue – Input of Graphical Data – Input Functions – Interactive Picture – Construction Techniques. VisibleSurface Detection Methods: Classification of Visible-Surface Detection Algorithms – Back-Face Detection – Depth-Buffer Method. Basic Illumination Models - Color Models and Color Applications: Properties of Light – Standard Primaries and the Chromaticity Diagram – Intuitive Color Concepts – RBG Color Model – YIQ Color Model – CMY Color Model – HSV Color Model.

UNIT QUESTIONS:

177-186

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT - I SECTIONAL VIEWS

INTRODUCTION The orthographic views viz., front, top and side views, the visible edges and faces are indicated by continuous lines, while its interior hollow portions, and invisible outer edges and faces are indicated by dashed lines. If the interior construction of the object is complex, there will be a network of mass of dashed lines in the orthographic views as shown in fig 1.1.in order to avoid this complication and to remove the hidden lines; one or more views are represented “in section”.

Fig1.1 Network of Dashed Lines

In section, the object is imagined as cut apart by planes so as to expose its interior. This imaginary process of cutting the object is called sectioning. The imaginary plane which cuts the object is called the section plane or cutting plane.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

1


MACHINE DRAWING & COMPUTER GRAPHICS

NEED FOR SECTIONING The sectional views are necessary 1. To show the internal features more clearly. 2. To remove hidden lines. 3. To avoid complication and ambiguity. 4. For ease of understanding.

HATCHING

Fig1.2 Sectioning

The sectional views of an object comprises of both sectioned and unsectioned surfaces. To differentiate between the sectioned and the unsectioned surfaces on the sectional views, a series of thin inclined lines,called section lines, parallel to themselves and inclined usually at 45ยบ to the horizontal, or to the main axis of the object, are drawn within the region of the cut surface as shown in fig 1.2. this process of executing parallel section lines is called hatching. The section lines, sometimes are also called as hatching lines.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

2


MACHINE DRAWING & COMPUTER GRAPHICS

3

INCLINATION OF HATCHING LINES The simplest form hatching, which will be usually adequate for general purposes, involves drawing of continuous thin parallel lines inclined at 45ยบ to the outlines as shown in fig 1.3

Fig 1.3 Other type of Hatching Lines When the out line of the sectioned surfaces are themselves inclined at 45ยบ, the 45ยบ hatching lines will become parallel to the outlines and thus over shadows the cut surface. In such cases, hatching lines are drawn horizontal as shown

in fig.

SPACING BETWEEN HATCHINE LINES

Fig 1.4 Spacing between Hatching Lines

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

The hatching must be done in such a way that the sectioned surface does not appear as dark as the outlines of the object. This can be accomplished by drawing hatching hatching lines as thin lines with the appropriate spacing between them. A spacing of 2mm between the hatching lines will be appropriate for the general work. HATCHING OF LARGER AREAS Hatching of larger areas should be done only at the outer lines forming the boundary leaving blank space at the middle as shown in fig 1.5.

Fig1.5 Hatching of a Large Area Hatching of adjacent parts

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

4


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 1.6 Hatching more than Two Adjacent Parts When two different parts are joined together as in the case riveted lap joint, then these 2 parts are to be cross hatched at 45ยบ but in opposite directions as shown in fig 1.6. When three are more parts in contact such as riveted butt joints are to sectioned, then two of the adjacent parts should be cross hatched at an angle of 45ยบ, but in opposite directions and the remaining parts are to be hatched at different angles such as 30ยบ or 60ยบ and at different spacing .when thin sections like sheet metal, Gasket, washer etc., are to be shown in section, they are shown totally black leaving thin space between adjacent parts.

SKETCH AND OF FULL SECTION When a section plane passes through the object so as to cut it completely, the sectional view is called full sectional view or simply sectional view.

Fig 1.7 Full Section HALF SECTION When an object is symmetrical about one its axis, the drawing of its full sectional view involves repetition of hatching work on both the sides of its symmetrical axis which requires

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

5


MACHINE DRAWING & COMPUTER GRAPHICS

considerable labour and time. In such cases, only one half of the object is shown in section while its other half will be shown as unsectioned. Such a view which shows one half in section and the other half as unsectioned is called half sectional view.

Fig1.8

TYPES OF HALF SECTION The different types of half section about its horizontal or vertical axis depending on the portion of the interior details of the object to be shown in section.

1. Front view with right half in section 2. front view with top half in section top view with section 3. top view with front half in section 4. left view with front half in section

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

6


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 1.9 Half Section

PARTIAL OR LOCAL SECTION In local section, only a small portion of the object surrounding the feature is assumed to be removed and the boundary of the section is shown by irregular lines, as showing in fig 1.10

Fig 1.10 Partial or Local Sections

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

7


MACHINE DRAWING & COMPUTER GRAPHICS

REVOLVED OR SUPERIMPOSED SECTION Revolved section is obtained by revolving the section through 90ยบ, so that the section is made to align with the longitudinal view of the object as shown in fig 1.11

Fig 1.11 Revolved Section

REMOVED SECTION When the section is to be shown on enlarged scale for the purpose of dimensioning, then the section cannot be aligned with any of the views. Instead, the section is drawn away from the view along the extension of the cutting plane line as shown in fig 1.12

Fig 1.12 Removed Section

OFFSET SECTION The section planes are usually assumed to pass through the axis of symmetry or the principal axis of the object. But when it becomes necessary to show still more details about

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

8


MACHINE DRAWING & COMPUTER GRAPHICS

the object, then the cutting plane is made to offset, so that it passes through different locations as shown in fig 1.13

Fig 1.13 Offset Section

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

9


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT – II LIMITS, FITS AND TOLERANCES Introduction The maximum and minimum permissible sizes within which the actual machined size lies are called limits. The functional relationship between the two adjacent parts achieved by the specified tolerance is called fit. The amount of variation permitted for a basic size is called tolerance.

Definition of various terms used in limits

Fig 2.1 illustrates the various terms Basic size It is defined as the theoretical size of a part, derived from the design after rounding off to the nearest whole millimeter. The tolerances are always specified to the basic size. In fig 2.1 the dimension 30mm is the basic size. The basic size is also represented as “zero line”. Actual size It is defined as the size actually obtained by machining. It is found by actual measurement using measuring instruments. In fig 2.1 the actual size of the diameter of the shaft is Ø29.925mm.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

10


MACHINE DRAWING & COMPUTER GRAPHICS

Limits The two extreme permissible sizes between which the actual size lies are called limits. Maximum limits It is the allowable maximum size of the component, which lies above the Basic size.

Minimum limit It is the allowable minimum size of the component, which lies below the Basic size.

Tolerance It is defined as the amount of variation permitted to a basic size. The difference between the maximum and minimum limits of a basic size is called tolerance. Tolerance = maximum limit – minimum limit

Deviation It is defined as the difference between the actual size or limit sizes, either maximum or minimum, and the corresponding basic size.

Actual deviation It is the algebraic difference between the actual measured size and the corresponding basic size.

Upper deviation It is defined as the algebraic difference between the maximum limit of size and the corresponding basic size.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

11


MACHINE DRAWING & COMPUTER GRAPHICS

Lower deviation It is defined as the algebraic difference between the minimum limit of size and the corresponding basic size. Tolerance zone It is the zone or area that lies between the upper limit and the lower limit. The actual size of the component that lies in the tolerance zone alone will be accepted.

Hole basis system In hole basis system, the basic size of a hole is kept constant and size of the shaft is varied above or below the zero line, so as to get a desired class of fit.

This system is popular in industries, as the standard tools such drills, reamers etc., are available for producing holes. For the holes, the lower deviation is zero and the minimum size of hole is equal to the design size, which is taken as the base for computing all the other limit dimensions. The limit dimensions on the hole and the shaft are computed by selecting suitable clearances and tolerances on the shaft and the hole.

Fig shows the clearance and transistion fits in the basis system. fig 2.2 A shows the tolerance zone for the hole having its lower limit equal to the basic size. The zero line is drawn through the lower limit since the lower deviation is zero. Both the limit dimensions of the shaft lie below the zero line for the clearance fit as shown in fig 2.2 B while they are above the zero line for the interference fit as shown in fig 2.2 C.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

12


MACHINE DRAWING & COMPUTER GRAPHICS

13

Fig 2.2 Hole Basis System Shaft basis system In this system, the different types of fits are obtained by associating holes of varying limit dimensions with a single shaft, whose upper deviation is zero. When the upper deviation of the shaft is zero, the maximum limit of the shaft will be equal to its basic size, which is taken as the base for computing all other limit dimensions. The limit dimensions on the hole and the shaft are computed by selecting suitable clearance and tolerances on the shaft and the hole.

Fig shows the clearance and transition fits in the shaft basis system. Fig 2.3 A shows the tolerance zone for the shaft having its maximum limit equal to the basic size. The zero line is drawn through the maximum limit since its upper deviation is zero. Both the limit dimensions of the hole lie above the zero line for the clearance fit as shown in fig 2.3 B. While they are below the zero line for the interference fit as shown in

Fig 2.3 C.

Fig 2.3 Shaft Basis System

TYPES OF FITS FITS A machine is built by assembling all its constituting parts. During assembling sometimes a part may be required to be filled into another part. In such cases, and during the working of the machine they may or may not be intended to have a relative motion between them. If there should be a relative motion between the two parts, they must be filled loose, or tight otherwise. The fitting of one part in to the other, either loose or tight depends on the

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

relationship existing between their mating surfaces which in turn depends on the dimensional differences between the parts. The relationship existing between the mating surfaces of the parts because of the differences in their dimensions is called fit. SHAFT AND HOLE — TERMINOLOGY In mechanical engineering practice, generally a rod of circular cross section and a circular hole are termed as shaft and hole respectively. In the system of fits and tolerances, for the sake of simplicity even the non circular sections and also the space containing or contained by the two parallel faces of any part such as, the thickness of a key and the width of a keyway or a slot, are also referred as ‘shaft’ and ‘hole’ respectively. CLEARANCE It is defined as the difference between the dimensions of the hole and the shaft assigned intentionally to obtain a particular type of a fit. It may be positive or negative. When the shaft size is smaller than the hole size it will be positive and will be negative when the shaft size is bigger than the hole size. The value of the clearance will be maximum when the hole size is maximum and the shaft size is minimum. It will be minimum when the shaft size is maximum and the hole size is minimum. CLASSIFICATION OF FITS A fit is established when one part is inserted into the other, The type of fit Obtained between the two parts is governed by the dimensional deviations assigned for the basic size of the shaft and the hole. For a given basic size, the deviations assigned and the performance are interdependent. But since the performance is the ultimate objective, the deviations assigned for a basic size must satisfy the performance intended. But the performance itself is of varied type like, a shaft fitting tightly into a hole, or capable of just rotation, or sliding loosely in it. So, for a given basic size, we can have different performances. Therefore to obtain different performances we need to fix different deviations for the basic size of the shaft and the hole. Each set of deviations for the given basic size results in a particular type of performance For example, for the shaft to rotate in a hole, obviously its dimensions should be less than the hole. Alternately, when a shaft is to be held rigidly in a hole, its sizes should be greater than that of the hole, so that when the shaft is driven in to the hole, the outer surface of the shaft interferes with the inner surface of the hole, In the former, since there is a positive clearance between the two sizes, the fit is called clearance fit, while in the latter, because the surfaces interfere, the fit is called interference fit. A fit resulting due to the variations in the dimensions between that of the clearance fit and the interference fit is called transition fit. Thus the types of fits are 

Clearance,

Interference and

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

14


MACHINE DRAWING & COMPUTER GRAPHICS

15

Transition fits.

CLEARANCE FIT It is defined as the fit established when a positive clearance exists between the hole and the shaft. It is obtained by selecting the maximum and minimum limits of the shaft and the hole so that the clearance due to the difference between the dimensions of the smallest possible hole and the largest possible shaft is always positive. There are different classes in this type of fit depending on the clearance and the specific operating conditions of the given mating parts. They vary with the shaft speed, shaft bearing load, lubricating oil grade, temperature and the length of the mating surfaces.

Fig 2.4

Figure 2.4 shows a clearance fit. The clearance between and the largest possible shaft is

the smallest possible hole

=  29.95 —  29.90 = 0.05 mm. Figure shows the

conventional representation of a clearance fit, where the tolerance zone of the hole lies above that of the shaft. INTERFERENCE FIT It is defined as the fit established when a negative clearance exist between the sizes of the hole and the shaft. It is obtained by selecting the maximum and minimum limits of the shaft and the hole so that there is an interference of the surfaces and the clearance due to the difference between the dimensions of the largest possible hole and the smallest possible shaft is always negative. Interference fits are obtained by several methods, for instance, a shaft may be driven into the hole with a considerable force, or heating the part having the hole in order to increase the diameter of the hole, or by cooling the shaft and thus decreasing its diameter.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 2.5 Figure 2.5 shows an interference fit. The difference between the dimensions of the largest possible hole and the smallest possible shaft is =  30.25 —  30.30 = — 0.05mm. Figure shows the conventional representation of an interference fit, where the tolerance zone of the hole lies entirely below that of the shaft. The interference fit is obtained by driving a shaft into the hole with a considerable force. When the force applied is heavy the interference fit is called heavy force fit, and when a lighter force is used to drive the shaft into the hole, it is called light force fit. The interference fit can also be obtained by heating and subsequent cooling. The part containing the hole is heated so that the diameter of the hole will increase due to material expansion, and then after inserting the shaft in the hole, on cooling the hole will shrink to hold the shaft rigidly. TRANSITION FIT It is defined as the fit established when the dimensions of the hole and the shaft are such that there exists a positive clearance or a negative clearance when the shaft is fitted into the hole. It is obtained by selecting the maximum and minimum limits for the shaft and the hole such that there exists a positive clearance when the smallest possible shaft is fitted into the largest possible hole, or a negative clearance when the largest possible shaft is forced into the smallest possible hole.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

16


MACHINE DRAWING & COMPUTER GRAPHICS

17

Figure 2.6 shows a transition fit. Figure shows the fitting of the smallest possible shaft of  30.55 mm in the largest possible whole of  30.60mm allowing a positive clearance of  30.60 —  30.55 = 0.05mm. Figure 2.6 shows the fitting of the largest possible shaft of  30.65mm in the smallest possible whole of  30.50mm gives an interference fit

of 

30.50 — 30.65 = — 0.15mm. Figure2.6 shows conventional representation of transition fits in which the tolerance zones of the hole and the shaft overlap. SELECTION OF FITS AND APPLICATIONS A wide range of fits may be obtained by various combinations of tolerance grades and fundamental deviations for both the shafts and the holes. But many of the possible combinations may not be of practical use. Majority of common engineering requirements may be satisfied on the basis of restricted selection of tolerance grades resulting in economy and ease of standardisation, yet leading to universally applicable and recommended fits. IS : 2709 – 1982 offers a comprehensive guide for the selection of fits. The most commonly used fits for general classes of work are given in the following tables.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

18

Commonly used type of fits I. For Holes Type of Fit

Class of Shaft

H7

H8

H9

-

-

-

-

c

-

-

-

d

-

d8*

d8*, d9, d10

e

e7*

e8

e8, e9*

Easy running fit

f

f6*

f7

f7, f8*

Normal running fit

g

g5*

g6

-

h

h5*

h6

h7, h8*, h9

Clearance

b

Transition

js

js5*

js6

H11

Remarks

H6*

a

a11 b11

Large clearance fit and widely used

-

c11

Slack running fit

d8*, d9, d10

d9

Loose running fit

Close running fit or sliding fir, also spigot and location fit h11

Precision sliding fit. Also fine spigot and location fit.

js7*

Push fit for very accurate location with easy assembly and disassembly

k

k5*

k6

k7*

Light keying fit (true transition) for keyed shafts, non-running locked pins, etc.,

m

m5*

m6*

m7*

Medium keying fit

n

n5*

n6

n7*

Heavy keying fit (for tight assembly mating surfaces)

P7*

Light press fit with easy dismantling for nonferrous parts. Standard press fit with easy dismantling for ferrous and non-ferrous parts assembly

r7*

Medium drive fit with easy dismantling for ferrous parts assembly Light drive fit with easy dismantling for ferrous parts assembly

s7*

Heavy drive fit for ferrous parts permanent or semipermanent assembly standard press fit for nonferrous parts

P

Interference

With Holes

r

s

P5*

r5*

s5*

P6

r6

s6

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

t

t5*

t6*

u

19

t7*

Force fit on ferrous parts for permanent assembly

u7*

Heavy force fit or shrink fit

* Second preference fits. Commonly used type of fits

II. For Shafts

Clearance

Type of Fit

Class of Shaft

H5*

H6

H7

H8*

H9

H11

Remarks

A

A11

B

B11

C

C11

Slack running fit

Large clearance fit and widely used

D11*

Loose running fit

D

D9*

D10

D10

E

E8*

E8*

E9

Easy running fit

F

F7*

F8

F8*

Normal running fit

G

H

js

Transition

With Shafts

G6*

H6*

js6*

Close running fit or sliding fir, also spigot and location fit

G7

H7

js7

H8

H8

H8, H9

H11

Precision sliding fit. Also fine spigot and location fit.

js8*

Push fit for very accurate location with easy assembly and disassembly

K

K6*

K7

K8*

Light keying fit (true transition) for keyed shafts, nonrunning locked pins, etc.,

M

M6*

M7*

M8*

Medium keying fit

N8*

Heavy keying fit (for tight assembly mating surfaces)

N

N6*

N7

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Interference

P

R

S

T

P6*

R6*

S6*

T6*

20

P7

Light press fit with easy dismantling for non-ferrous parts. Standard press fit with easy dismantling for ferrous and non-ferrous parts assembly

R7

Medium drive fit with easy dismantling for ferrous parts assembly Light drive fit with easy dismantling for ferrous parts assembly

S7

Heavy drive fit for ferrous parts permanent or semipermanent assembly standard press fit for nonferrous parts

T7

Force fit on ferrous parts for permanent assembly

* Second preference fits.

TYPES OF TOLERANCES Straightness Tolerance This type of form tolerance shown in Figure 2.7 refers to the axis of the cylindrical part, because the tolerance frame is connected to the dimension line which indicates the diameter of the cylindrical part. The tolerance value ď Ś 0.08 mm means that the axis of the cylinder must be contained in a cylindrical zone of diameter 0.08 mm as shown in Figure 2.7.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 2.7 Flatness Tolerance This type of form tolerance shown in Figure 2.8 refers to surface, because the leader line connecting the tolerance frame has its arrow resting on a surface. The tolerance value 0.08 mm means that the indicated surface should be contained between two parallel planes 0.08 mm apart.

Fig 2.8 Circularity Tolerance This type of form tolerance shown in Figure 2.9 refers to circularity, because the leader line connecting the tolerance frame has its arrow resting on the conical surface of the part. The tolerance value 0.1 mm means that the circumference of each cross section should be contained between two co-planar concentric circles 0.1 mm apart.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

21


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 2.9 Cylindricity Tolerance This type of form tolerance shown in Figure 2.10 refers to the cylindricity, because the leader line connecting the tolerance frame has its arrow resting on the cylindrical surface of the part. The tolerance value 0.1 mm means that the considered cylindrical surface should be contained between two coaxial cylinders 0.1 mm apart.

Fig 2.10

Profile Tolerance of a Line This type of form tolerance shown in Figure 2.11 refers to a profile because the leader line connecting the tolerance frame has its arrow resting on the profile of a surface. The tolerance value 0.04 mm means that the considered profile must be contained between two lines enveloping circles of diameter 0.04 mm, the centres of which are situated on a line having the correct geometrical profile.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

22


MACHINE DRAWING & COMPUTER GRAPHICS

23

Fig 2.11

Profile Tolerance of Any Surface This type of form tolerance shown in Figure 2.12 refers to the profile of a double curved surface because the leader line connecting the tolerance frame has its arrow resting on the profile of a double curved surface. The toleranced value

0.02 mm means that the

considered surface should be contained between two double curved surfaces enveloping spheres of diameter 0.02 mm, the centres of which are situated on a surface having the correct geometrical form.

Fig 2.12

Parallelism Tolerance This type of tolerance refers to the orientation of the axis of a feature with reference to a datum linc. The tolerance shown in Fig.2.13 refers to the orientation of the axis of the upper hole with reference to the axis of the lower hole which is considered as datum, The upper axis should be contained In a cylindrical tolerance zone of diameter 0.03 mm parallel to the lower axis A.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 2.13

Perpendicularity Tolerance This type of tolerance refers to the orientation of the axis (or a line) of a feature Perpendicular to a datum surface. The axis of the cylinder to the dimension of which the tolerance frame is connected as shown in Figure should be contained between two Parallel straight lines 0.1 mm apart, lying in a plane perpendicular to the datum plane as shown in Figure 2.14.

Fig 2.14

FORM & POSITION The tolerance for the sizes, called linear tolerances, are specified only to ensure that the actual manufacturing sizes are well within the acceptable limits. However, they have no control either over the geometry of the surface or its location, i.e., for example, a shaft may have its diameter well within the specified limits of size, but may not be truly circular. Similarly, a square slot may not have its surfaces exactly perpendicular, or, a hole may not have its centre correctly located. Thus it necessitates to specify the permissible deviations not only for its sizes but also for the geometrical variations in the form of the surfaces and the

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

24


MACHINE DRAWING & COMPUTER GRAPHICS

variations for their locations.

25

The geometry variations are called form variation and the

location variations are called position variation. Specifying of the permissible variations for both form and position using symbols and letter is called geometrical tolerancing. According to the characteristic form of the feature to be toleranced and the manner in which it is dimensioned, the tolerance zero that must be considered will be from any one of the following : (a) Area within a circle. (b) Area between two concentric circles. (c) Area between two parallel lines. (d) Space within a sphere. (e) Space within a cylinder or between coaxial cylinders. (f) Space between two parallel surfaces. (g) Space within a parallelepiped. The geometrical tolerances are indicated by specifying the form tolerances using symbols shown in Table and tolerance value in numerical values in the same unit of linear dimensions and positional tolerances referring the datum feature identified by a letter symbol. These indications are written in a rectangular frame which is divided into tow, sometimes, three compartments as shown in Figure. These compartments are filled in from left to right in the following order. (a) The symbol for the characteristic to be toleranced as shown in Table. (b) Tolerance value in the same unit used for linear dimensions. This value may be preceded by the shape identification symbols such as , , R, S, S, SR if required. (c) The letter identifying the referred datum feature.

TABLE Geometric Characteristic Symbols

FORM OF TOLERANCES

Characteristics to be Toleranced

Symbol

Straightness Form of Single Features

Flatness Circularity (Roundness)

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Cylindricity Profile of any line Profile of any surface Parallelism Perpendicularity (Squareness) Orientation of Related Features

Angularity

POSITIONAL TOLERANCES

Runout Position Position of Related Features

Concentricity and Coaxiality Symmetry

INDICATION OF TOLERANCE AND FITS ON THE DRAWINGS The different methods of indication of tolerance and fits on the drawings by using letter symbols and numerical values are shown in Figures.

Indications of Fits by Letter and Grade Symbols When it is required to indicate the fits by letter and grade symbol, the tolerance symbol for the hole must be placed before that of the shaft as shown in Figure2.15 A , or the tolerance symbol for the hole must be placed above that of the shaft as shown in Figure 2.15 B, and the symbols being preceded by the basic size indicated once only.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

26


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 2.15

When it is also necessary to specify the numerical values of the deviations, they should be written in brackets as shown in Figure2.15 C.

Indication of Fits by Numerical Values The methods of indicating the fits by the numerical values are shown in Figure 2.16 A. The dimensions for each of the components of the assembled parts should be preceded by the name as shown in Figure 2.16 B, or item reference as shown in Figure, the dimension for the hole being placed in both the cases above the shaft.

Fig 2.16

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

27


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT III KEYS AND SURFACE FINISH

Introduction The common method to connect a shaft and a part is to drive a small piece of metal, known as key between the shaft and the hole made in the part mounted over it. The key will be driven such that it sits partly into the shaft and partly into the part mounted on it. To introduce the key, axial grooves, called key ways are cut both in the shaft and the part mounted on it as shown in the fig 3.1. The key is fitted between the shaft and the part mounted over it as shown in fig 3.1 . While transmitting the power, the key will be subjected to shear and crushing forces.

Keys are extensively used to hold pulleys, gears, couplings, clutches, sprockets, etc., and the shafts rigidly so that they rotate together. They are also used to mount the milling cutters, riding wheels, etc., on their spindles.

Fig 3.1

Classification of Keys Keys are classified into two types, (i) Taper keys and (ii) Parallel or feather keys.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

28


MACHINE DRAWING & COMPUTER GRAPHICS

Taper key: A taper key is of rectangular cross section having uniform width and tapering thickness. The taper keys are used to transmit only the turning moment between the shaft and the hub without any relative rotational and axial motion between them.

The examples of tapered keys are, i.

Taper sunk key

ii.

Saddle key,

iii.

Flat key and

iv.

Gib-head key.

Parallel Key (or) Feather key : A parallel key or feather key is also of rectangular cross section of uniform width and thickness throughout. Parallel keys are used to transmit the turning moment between the shaft and the hub along with the provision to allow a small sliding axial motion between them wherever required.

The examples of the parallel keys are, (i) Parallel sunk key, (ii) Peg key, (iii) Single head key, (iv) Double head key and (v) Spline shaft.

The woodruff key, cone key and pin key are the special purpose keys are used for specific applications.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

29


MACHINE DRAWING & COMPUTER GRAPHICS

Sunk Taper Key A sunk taper key shown in fig 3.2 is of rectangular or square cross section of uniform width having its bottom surface straight and top surface tapered. The key is driven between the shaft and the hub with half of its thickness to fit in the flat key way made in the shaft and the other half having the tapered surface to fit in the tapered key way made in the hub. This type of key is generally used to transmit heavy loads. The proportions of the key are as follows.

Fig 3.2

If D = diameter of the shaft in mm, W = width of the key and T = thickness of key, Width of key = 0.25 D+ 2mm Nominal Thickness = 0.66 W Standard Taper = 1:100

Hollow Saddle Key A hollow saddle key is of uniform width but tapering in thickness having its upper side flat and the underside hollow so as to sit on a shaft as shown in fig 3.3. Since the saddle key

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

30


MACHINE DRAWING & COMPUTER GRAPHICS

holds the shaft and the part mounted on it only by friction, it is not suitable for heavy loads. This key is used when there is frequent alterations in the position of the key on the shaft is expected.

Fig 3.3

The proportions of the keys are as follows: If D = diameter of the shaft in mm, W=width of the key and T = thickness , Width of key = 0.25 D+ 2mm Nominal Thickness = 0.33 W Standard Taper = 1:100

Flat Saddle Key A flat saddle key is similar to a hollow saddle key, except that it’s underneath surface is flat. The key sits over the flat surface formed on the shaft and fits into the key way in the

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

31


MACHINE DRAWING & COMPUTER GRAPHICS

hub as shown in fig 3.4. When the shaft rotates, the key will be wedged between the flat surface on the shaft and the key way in the hub, and thus holds them to rotate together. This key cannot be used for heavy loads and will not be suitable for shafts which frequently change their direction of rotation.

Fig 3.4 The proportions of this key are as follows: If D = diameter of the shaft in mm, W=width of the key and T = thickness of the key, Width of key = 0.25 D+ 2mm Nominal Thickness = 0.33 W Standard Taper = 1:100

Gib – Head key When a tapered sunk key is used, it can be removed by striking at its exposed thin end. If this end is not accessible, a head called gib is provided integral with the sunk taper key at its thicker end as shown in fig 3.5 . When a gib –head key is to be removed, a wedge is forced vertically in the gap between the head of the key and the vertical face of the hub.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

32


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 3.5

The proportions of the key are as follows. If D = diameter of the shaft in mm, W=width of the key and T = thickness of key,

Width of key = 0.25 D+ 2mm Height of Gib-Head =1.75 T Nominal Thickness = 0.66 W Width of Gib- Head = 1.5 T Standard Taper = 1:100

Feather Key or Parallel Key A feather key or parallel key permits an axial sliding movement for the wheel over a shaft when both of them are rotating together. This facility will be required in several power transmission applications, such as , for example, in gear boxes, loose pulleys, clutches, universal and flexible types of coupling, etc. in a gear box, for example, any one of the driven gears have to be moved axially over the driven shaft so as to engage with the driving gear to obtain different speeds.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

33


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 3.6

A feather key is rectangular or square cross section with uniform width and thickness as shown in fig 3.6. The ends of a feather key are usually rounded and the key will be sunk into the shaft for half of its thickness so that it fits snugly into the key way recess in it with a press fit. The press fit prevents the key from moving axially over the shaft when the driven wheel slides on it. In cases of higher power transmission, the feather key instead of press fit will be secured to the shaft by countersunk set screws. The proportions of the key are as follows: If D = diameter of the shaft in mm, W=width of the key and T = thickness of key, Width of key = 0.25 D+ 2mm Nominal thickness = 0.66 W

Peg Key A peg key is a feather type of key having a peg provided in the centre of the top face of the key as shown in

Fig 3.7. The peg fits in the hole drilled in the key way in the hub.

The key is a sliding fit in the key way of the shaft. The proportions of the key are as follows. If D = diameter of the shaft in mm, W=Width of the key and T = Thickness of key,

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

34


MACHINE DRAWING & COMPUTER GRAPHICS

H= Thickness of peg, Width of key = 0.25 D+ 2mm Thickness of peg = 0.5 T Nominal thickness = 0.66 W

Fig 3.7

Single Head Key A single head key is also a feather type of key provided with a gib head at one of its ends as shown in fig 3.8 . The key is connected to the hub by a screw. The key is a sliding fit in the shaft. The proportions of the key are as follows. If D = diameter of the shaft in mm, T = Thickness of key, h = height of the head, b= width of the head. Width of key = 0.25 D+ 2mm Height of the head = 1.75 T Nominal thickness = 0.66 W Width of the head = 1.5 T

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

35


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 3.8 Single Head Key

Double Head Key A double head key is also a feather type of key having integral gib head at its ends as shown in fig 3.9 . It fits tight in the hub and slides along with it in the key way in the shaft. Its proportions are as follows.

Fig 3.9 If D = diameter of the shaft in mm, T = Thickness of key, H = height of the head, B = width of the head. Width of key = 0.25 D+ 2mm Height of the head = 1.75 T Nominal thickness = 0.66 W Width of the head = 1.5 T

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

36


MACHINE DRAWING & COMPUTER GRAPHICS

Spline Shaft A spline shaft has a series of lengthwise rectangular grooves extending for a small portion of its length leaving an equal number of feathers in between them as shown in fig 3.10. These feathers engage with corresponding recesses provided in the hub. As compared to a keyed joint, a splined joint offers the following advantage; transmission of heavier loads, accurate centering of hub, increased strength of the joint.

Fig 3.10 Spline Shaft

Woodruff A woodruff key shown in fig 3.11 differs from those dealt earlier in that, it is not primarily intended to withstand shear forces and is used in light classes of work for holding the hub over the shaft so as to prevent it from slipping. It has a uniformly thick curved-base disc of shape somewhat less than a semicircle. It fits into a similarly shaped key way in the tapered shaft or the spindle.

Fig 3.11 Woodruff Key

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

37


MACHINE DRAWING & COMPUTER GRAPHICS

The hub of the wheel has a tapered bore to suit the tapered shaft. The wheel is driven on the tapered shaft until it fits tightly over it. When a nut is then tightened –up hard against the outer face of the hub, the key grips the hub by the wedging action and locks it on the tapered shaft. The pressure exerted by the nut therefore relieves the shear stress. The proportions of the key are as follows. If

D= diameter of the shaft in mm, d = diameter of the key, h= height of the key, b= width of the key. Width of key = 0.25 D Diameter of key = 4 W Height of key = 1.75 W

Pin Key

Fig 3.12 Pin Key

A pin key shown in the fig 3.12 is either a plain or a tapered rod driven in the hole partly drilled in the shaft and partly in the hub. Pin keys are used generally to hold small toothed wheels, hand wheels, levers, etc., on the spindles to prevent them from slipping. Sometimes a pin key is also used with shrunk- on wheel hub. In such cases, the hub of the wheel is board with a hole equal to or less than the diameter of the shaft. The hub is then heated to expand slightly and is driven on the shaft when it is still hot. As the hub cools, it contracts and grips the shaft. To provide an extra positive hold a pin key is also used. The proportions of the key are as follows.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

38


MACHINE DRAWING & COMPUTER GRAPHICS

If D= diameter of the shaft, d = diameter of the pin, Diameter of pin = 0.2 D Taper 1:50

Cone Key Cone key are used when pulleys having holes larger than shaft are to mounted on them. A cone key consists of three segments of a hollow conical bush as shown in fig 3.13. The hub of the pulley will have a tapered bore to suit that of the cone key. The segments of the cone key are driven between the shaft and the hub so as to hold them from slipping by the friction grip.

Fig 3.13 Cone Key

DEFINITION Nominal Surface The surface of an object is its exterior boundary. A surface that has been finished by any one of the machining processes contains numerous small peaks and valleys that deviate from the theoretical geometrically perfect surface, called nominal surface, Fig 3.14 .

Fig 3.14

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

39


MACHINE DRAWING & COMPUTER GRAPHICS

Roughness The cutting edges of the cutting tools and the abrasive grains of the grinding tools cause the texture of the surface to consist of surface irregularities. The spacing and the size of these valleys and peaks of the surface irregularities depend on the degree of sharpness of cutting tools and fineness of the abrasive grain. Roughness, as shown in Fig 3.14 B, is the microirregularity-of a surface produced by the cutting action of the edges of the tool or abrasive grains.

Waviness The waviness, as shown in Fig 3.14 C, is the surface undulations of larger magnitudes, i.e., surface irregularities with larger sizes and spacing than the roughness. Waviness may result from machine or work deflections, vibrations, warping, strains, or other causes. Roughness may be Considered as being superposed on a wavy surface as shown Figure.

Lay Lay is the predominant direction of tool marks that make a characteristic pattern on a machined Surface. The direction of lay is determined by the production method employed.

Sampling Length Sampling Length is a particular length of the profile decided for the evaluation of the surface irregularities on any chosen portion of the machined surface. This length is also known as cut-off length.

The sampling length is selected depending upon the type of

machining process as indicated in Table. It is recommended to choose smaller value for the finer grade and larger value for the coarser grade for a given machining process when more than one values are given.

Production Method And Surface Quality The value of surface roughness which is the arithmetical mean deviation from the mean line of the profile, is expressed in micrometer. Table shows the recommended values of surface roughness. it indicated in the specified place in the surface texture symbol. if the

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

40


MACHINE DRAWING & COMPUTER GRAPHICS

surface roughness is obtained by any production method other than machining the value surface roughness ,say 12.5 micrometer, is indicated in the basic symbol as shown in fig3.15 . if the surface roughness is obtained by removing the material by machining, the value of surface roughness, say 12.5 micrometer, should be indicated as shown in fig3.15 .if the surface roughness is to be obtained without the removal of the material or when it results from the previous production process, the value of surface roughness say 12.5 micrometer, should be indicated as shown in fig 3.15

Fig 3.15 Indication of Surface Roughness Values in Surface Texture Symbol

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

41


MACHINE DRAWING & COMPUTER GRAPHICS

Table 3.1 Surface Roughness Expected from Different Manufacturing Process

SYMBOL FOR LAY The direction of lay is represented in the symbol form, from the following series recommended by the Bureau of Indian Standards : =

┴XMCR

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

42


MACHINE DRAWING & COMPUTER GRAPHICS

43

Fig 3.16

Table illustrates the interpretation of these recommended symbols.

The lay is

indicated on to the right of the surface texture symbol as shown in Fig 3.16. Unless otherwise specified the surface roughness is measured across the direction of lay.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

INDICATION OF SURFACE ROUGHNESS FOR VARIOUS MACHINING OPERATIONS When it s required to produce the final surface texture by a particular machining method, this should be indicated in words like MILLED, REAMED, LAPPED, HONED, etc., on the horizontal extension of the longer leg of the symbol as shown in Fig 3.17.

Fig 3.17

When the surfaces are to receive additional treatment or coating, the type of treatment or coating like, CHROME PLATED, ENAMELLED, OXIDISED, CARBURISED, SAND BLASTED, etc., should be indicated on the same extension line as shown in Fig 3.17. Unless otherwise stated, as mentioned the numerical value of roughness applies to the surface texture after treatment of the coating.

When it is necessary to indicate the surface texture both before and after treatment, it should be explained by a suitable note or by specifying the value or grade of the surface texture before coating on the finished surface and the name of the coating and the value or grade of surface texture after coating on the symbolic thick chain line which represents the additional treatment as shown in Fig 3.17. The surface roughness grade N10 shown in Fig 3.17 is the texture required before coating and the surface texture of Nil is required after chrome plating.

SURFACE TEXTURE SYMBOL WITH ALL THE CHARACTERISTICS Fig 3.18 shows a surface texture symbol with all the characteristics of the surface

corresponding grade number may be indicated.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

44


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 3.18

SYSTEM OF INDICATION SURFACE TEXTURE SYMBOLS ON DRAWING The surface texture symbol along with the inscriptions should be orientated such that they may be read from the bottom or right hand edge of the drawing sheet as explained in aligned system of dimensioning, which is the general system used for dimensioning the drawings.

Fig 3.19 shows the different methods of indicating the surface texture symbol on the drawing. The surface texture symbol may be placed with its apex touching the line representing the surface, or on the leader line terminating in an arrow on the surface, or on the extension line of the surface as shown in Figure.

Fig 3.19

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

45


MACHINE DRAWING & COMPUTER GRAPHICS

If it is not practicable to orient the surface texture symbol so as to be read from the bottom or right hand edge of the drawing sheet, it may be drawn in any position provided it does not carry any indication of machining method or machining allowances as shown in Fig. 3.19. Note that the roughness values are written so as to be read from the right hand edge of the drawing sheet.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

46


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT-IV

INTRODUCTION A Screw is a cylinder or a conical rod with a helical groove cut on it. Its function is to transform the input motion of rotation into output motion of translation. A screw thread is a continuous helical ridge formed by cutting a helical groove on a cylinder or conical shank. Basically screw threads are used to fasten the parts together, or to transmit motion and so power, or for the relative adjustments of the adjacent parts. To perform these specific functions, threads of different profiles are used.

SCREW THREAD TERMINOLOGY The following definitions refer to the various terms used in screw threads. The various elements of a screw thread are shown in fig.4.1. The external thread is the thread cut on the outer surface of a rod. The internal thread is the thread cut on the inner surface of a hole.

Fig 4.1

ROOT: It is the bottom portion of the surface of a thread, either flat or rounded which joins the sides of the adjacent threads. CREST: It is the top portion of the surface of a thread, either flat or rounded which joins the sides of the same thread.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

47


MACHINE DRAWING & COMPUTER GRAPHICS

FLANK: It is the surface of a thread that connects the crest with the root and also it offers the surface contact with its counterpart. ANGLE OF THE THREAD: It is the angle included between the sides of the two adjacent threads and is measured on an axial plane.

DEPTH OF THE THREAD: It is distant between the crest and the root of a thread which is measured normal to the axis on an axial plane. It is designated as h3.

NOMINAL DIAMETER: It is the diameter of the cylindrical rod on which the threads are cut. This diameter specifies the size of the screw.

MAJOR DIAMETER: It is the diameter of an imaginary coaxial cylinder which bounds the crests of an external thread or the roots of an internal thread. D and d denote the major diameters of the internal and external threads respectively. MINOR DIAMETER: It is the diameter of an imaginary coaxial cylinder which bounds the roots of an external threads, or the crests of an internal threads. D1 and d3 denote the minor diameters of the internal and external threads respectively. PITCH DIAMETER: It is the diameter of the thread at which an imaginary coaxial cylinder that can passed so as to cut the thread so that the width of the cut thread will be equal to the width of the groove.D2 and d2 denote the pitch diameters of internal and external threads respectively. HEIGHT OF THE FUNDAMENTAL TRIANGLE:

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

48


MACHINE DRAWING & COMPUTER GRAPHICS

The imaginary equilateral triangle which bounds a V-thread is called a fundamental triangle. Its height, H is measured normal to the axis on an axial plane. PITCH: It is the distance from a point on a screw thread to a corresponding point on the next thread, measured parallel to the axis. It may be indicated as the distance from crest to crest, or from root to root, but former is the convention. LEAD: It is the axial distance advanced by a nut for its one full turn over a threaded rod. It is also defined as the product of the pitch and number of starts. Basic profiles or forms of screw threads The profile of a screw thread is based on whether it functions as a fastening device or a power transmission element. The profile is triangular, known as V thread in the former, and square or its modified in the latter. Thus the two basic profiles, or forms of screw threads are: (i) V threads (ii) Square thread.

V-Threads Bureau of Indian Standards(BIS) adopts ISO metric thread profile as a basic profile of screw threads. The V-threads is in the form of symmetrical “V” ,the angle of thread is 60˚. The roots of both the internal and external threads are rounded, while the crests are parallel to the axis of the screw.

Fig 4.2

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

49


MACHINE DRAWING & COMPUTER GRAPHICS

Square thread The square thread has its flanks at right angle to the axis, so that they are parallel to each other. For the same nominal diameter, the pitch of the square thread is more than that of the V-thread, hence the square thread provides more axial movement. The depth and the thickness of the thread are equal and equal to half the pitch.

The square thread is generally used for high power transmission such as screw jack, vice, lead screw of lathe etc.,

Fig 4.3 Left hand threads A left hand thread is one which advances into the nut, when turned in a counter clockwise direction, and the slope of the lines representing the thread will be downward from left to right. An abbreviation LH is used to indicate the left hand thread. unless otherwise specified, a thread should be considered as a right hand thread.

Practical application of these threads is made in coupler-nut or turn-buckle.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

50


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 4.4

Right hand threads:

Fig 4.5

A right hand threads is one which advances into the nut, when turned in a clockwise direction. It can be seen from the above fig. that when the axis of screw is vertical, the lines representing the thread will have slope downwards from right to left.

Internal Thread The internal thread is a continuous helical ridge formed by cutting a helical groove on inside of a cylinder or conical shank. The conventional representation of the Internal Thread shown in Fig.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

51


MACHINE DRAWING & COMPUTER GRAPHICS

External Thread The external thread is a continuous helical ridge formed by cutting a helical groove on outside of a cylinder or conical shank. The conventional representation of the External Thread shown in Fig.

4.8 V-Threads

Fig 4.6 Whitworth thread

This thread was introduced by Sir Joseph Whitworth and was standardized as British Standard thread, abbreviated as BSW. The profile of this thread with standard proposition is shown in fig 4.6. It has a thread angle of 55째 and is rounded off at the crest and root which renders it less liable to damage than a sharp V thread.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

52


MACHINE DRAWING & COMPUTER GRAPHICS

Square Thread The basic form of a square thread is shown in fig 4.7. The flanks or the sides of this thread are perpendicular to the axis of the thread. The depth and the thickness of the thread is equal to half the pitch.

Fig 4.7

Standard form of square thread:

Fig 4.8

The profile of the square thread adopted by the Bureau of Indian Standards in fig 4.8 . The depth of the external thread is equal to half the pitch. The sharp corners at the root of the external threads are rounded off to the radius R-0.25 mm The depth of the internal threads is equal to 0.5P+0.25mm. The sharp corners at the crest of the internal threads are chamfered to 0.25mm*45째.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

53


MACHINE DRAWING & COMPUTER GRAPHICS

54

DESIGNATION OF THREADS Threads are designated by thread, the major diameter and the

V-threads of ISO profile are

indicating the type of pitch.

designated

by

the

and

the

letter M followed by the major

diameter

pitch, the two being separated by x

symbol. For example,

V-threads of major diameter 10 mm

and pitch 1.25 mm is

designated as M10 x l.25 as shown

in Fig 4.9.

Sometimes

when

the

V-

threads

are

designated without indicating the

pitch,

for

example

Ml0 as shown in Figure, it will mean

that the threads are

cut with coarse pitch, whose value is to be obtained from the relevant Indian Standard fig 4.9 Fig. 4.9 Codes.

Multistart threads are designated by specifying the number of starts as shown in Figure.

The screw threads are always considered as right hand unless otherwise specified. When left hand threads are to be designated the abbreviation LH must be used as shown in Figure.

The square threads are designated by the ď ż symbol as shown in Fig 4.10. The trapezoidal threads are designated by the letters Tr as shown in Fig 4.11.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Fig 4.10

Fig 4.11

BOLTS AND NUTS A bolt is a fastening element comprising of a head at one end and a threaded portion over its cylindrical shank at the other end. The parts to be fastened temporarily by bolts and nuts, admit the bolts through the holes in them having suitable clearances. The projected threaded end of the bolt in turn now admits the washer and nut, an internally threaded member, which after sufficient turn offers necessary clamping grip. Bolts and nuts of various shapes are used for different purposes but the hexagonal head and square head are very common. Although the square shape provides a better spanner grip than the hexagon, but needs one-fourth of a turn to bring it into the same position for inserting spanner again, whereas a hexagon need only one-sixth of a turn and hence preferred. Although an octagonal shape would require one-eighth of a turn, the spanner grip reduces a it is more liable to slip. In general, the hexagonal bolts and nuts are preferred for fastenings in machines wherever the space and other conditions permit. The square head bolts are used instead of hexagonal bolts when frequent loosening and tightening is required, for example, on job holding devices like, vices, tools posts in machines, etc.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

55


MACHINE DRAWING & COMPUTER GRAPHICS

56

DRAWING OF HEXAGONAL BOLT AND NUT In machine drawing practice, hexagonal bolts and nuts are drawn all most in all the drawings. Drawing of these to the actual dimensions involves laborious drafting work arid unnecessary time. Since the bolts and nuts are standard items, they need not be drawn in the assembly drawings to accurate sizes, instead they are drawn conventionally to empirical proportions listed in Table. All the. proportions are expressed in terms of the major diameter of the bolt and nut.

Step by Step Procedure: I Step : Draw the shank of the bolt equal to the given diameter d and length. The thickness of bolt head equal to 0.8d and the thickness of nut equal to 0.9d are marked. Measure the width across corners equal to 2dand complete the three faces of the bolt head and the nut in thin lines.

The right view of the bolt and nut assembly is drawn as follows. With any point C 1 on the axis as centre and radius equal to d, draw a thin circle. Draw the vertical diameter 1-2 of this circle. With 1 and 2 as centres and radius equal to d cut the circle on either side of the vertical axis and inscribe the hexagon. The chamfer circle is drawn as a thick circle with the centre C1 and radius C1E. TABLE 4.1 Empirical Proportions of Hexagon and Square Head Bolt & Nut Detail

Proportion

Nominal Diameter

d = Size of Bolt or Nut, mm

Width Across Flats

s = 1.5d + 3 mm

Width Across Corners

e = 2d

Thickness of Bolt Head

k = 0.8 d

Thickness of Nut

m = 0.9 d

Root Diameter

d1 = d – (2 X Depth of Thread) or = d (4 X Thickness of Lines) Or

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

57

= 0.9 d (approximate) Length of Bolt

l = As specified

Thread Length

b = 2d + 6 mm (for l < 150 mm) = 2d + 12 mm (for l > 150 mm)

Radius of Bolt End

r = d (for spherical ends)

Chamfer of Bolt End

z = Depth of Thread X 45 or

O

= 0.1 d (Approximate) Chamfer Angle of Bolt Head &

O

= 30

Nut

II Step : The chamfer arcs in the three face view of bolt head and nut are drawn as O

follows. Through the corner B, draw a line at 30 to the axis of the bolt or nut to cut it at O1, With O1 as centre and radius O1A draw the chamfer arc in the centre face. The chamfer arcs on the two side faces are drawn as follows. Draw the perpendicular bisector of BC to cut BO 1 at O2. With O2 as centre and radius O2D draw the chamfer arc. Repeat the construction on the other side face.

III Step : The chamfer lines on he side faces of the three face views of the bolt head O

and nut are drawn as follows. Through the points P and Q draw lines inclined at 30 to the O

flat face of the bolt head or nut. The end of the bolt is chamfered to 0.1 d X 45 .

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

The threaded portion of the shank is indicated by drawing two thin lines at a distance equal to d1 = 0.9d. The root circle in the right view is represented by a thin three-fourth of a circle drawn with centre CT and diameter O.9d. The two face view of the bolt head and the nut is projected from the side view. If the side view is not drawn, then the distance across the flats is measured equal to 1.5d + 3mm. The chamfer arcs in the two face view are drawn as follows. Project P to get X. Mark Y the midpoint of FG. Draw the perpendicular bisector of XY and FG to intersect each other at 0 3.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

58


MACHINE DRAWING & COMPUTER GRAPHICS

With centre 03 and radius 03Y draw the chamfer arc. Repeat the construction on the other face.

DRAWING OF SQUARE HEAD BOLT The square head bolt and nut are drawn to the proportions shown in Table. I Step: Draw the shank of the bolt equal to the given diameter d and the length of the bolt. The thickness of the bolt head equal to 0.8d and the thickness of the nut equal to 0.9d are marked. The right view of the bolt and the nut assembly is drawn as follows. With any point C1 on the axis as centre and diameter equal to 1.5d + 3mm draw the chamfer circle. Draw a square circumscribing the chamfer circle with its sides inclined at 45째 to the axis. Project the corners 1 and 2 to get points P. Draw a thick circle with diameter to indicate the nominal diameter.

II Step: The chamfer arcs in the view across the corners of the bolt and nut are drawn as follows. Through the corner P, draw a line inclined at 30째 to the axis. Draw the perpendicular bisector of PQ to intersect the 30째 line at O. With O as centre and radius. OR draw the chamfer arc. Repeat the construction on the other face.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

59


MACHINE DRAWING & COMPUTER GRAPHICS

III Step: The chamfer line is drawn at 30째 to the flat face of the bolt head and nut. The threaded portion on the shank of the bolt is indicated conventionally by drawing two thin lines spaced at a distance equal to the root diameter d, O.9d. The root circle in the right view is represented by a thin three-fourth of a circle drawn with centre C1 and diameter 0.9d. The end of the bolt is chamfered to 0.1d x 45째.

RIVETED HEAD A riveted joint is a permanent type of fastener used to join the metal plates or rolled steel sections together. Riveted joints are extensively used in structural works such as bridges and roof trusses and in the construction of pressure vessels such as storage tanks, boilers, etc. Although welded joints are best suited to several of these applications than the riveted joints, however, riveted joints are ideal in cases where the joints will be subjected to pronounced vibrating loads. Riveted joints are also used when a non-metallic plate and a metallic plate are to be connected together. They are also used when the joints are not expected to be heated while joining as in welding, which may cause warping and tempering of the finished surfaces of the joints. The disadvantages of riveted joints are (i) more metal is removed while making of the holes, which weakens the working cross sections along the line of centres of the rivet holes, and (ii) weight of the rivets increases the weight of the riveted members. Differences between a Bolt and a Rivet As a fastener, a rivet resembles a bolt, but differs from it in the shape and the application as well. Although the shape of a rivet is similar to that of a bolt, unlike the bolts, its shank end is not threaded. With regards to the application, it is used as a Permanent fastener to withstand shear forces acting perpendicular to its axis, whereas a bolt is used as a temporary fastener to Withstand axial tensile forces.

Rivet A rivet is a round rod made either from mild steel or nonferrous materials such as copper, aluminium, etc., with a head of any one of the shapes shown in Figure, formed at one end during its manufacture and its tail end being slightly tapered as shown in Figure. The length of the shank of the rivet must be sufficient enough to accommodate the connecting plates and also provide enough material for forming a head at its shank end. In general, the

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

60


MACHINE DRAWING & COMPUTER GRAPHICS

length of the shank of the rivet will be equal to sum of the thicknesses of the connecting plates plus 1.5 to 1.7 times the diameter of the rivet.

If

l = length of the shank of the rivet d = diameter of rivet t = thickness of each of the connecting plates

then, l =ďƒĽ

TYPES Various types of rivet heads for use in general engineering work and boiler work as recommend by the Bureau of Indian Standards are shown in Figure. The different proportions of these rivet heads are given in terms of the nominal diameter d of the rivet. The rivet heads to be used for general purposes for diameters below 12 mm are specified in the Indian Standard Code IS: 2155-1962 and for diameters between 12 and 48 mm are specified in the Indian Standard Code IS: 1929-1961. The rivet heads to be used for boiler work are specified in the Indian Standard Code IS: 1928-1961. The rivet heads to be used for ship building are specified in the Indian Standard Code IS : 4732-1968.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

61


MACHINE DRAWING & COMPUTER GRAPHICS

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

62


MACHINE DRAWING & COMPUTER GRAPHICS

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

63


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT-V COMPUTER GRAPHICS INTRODUCTION Computers have become a powerful tool for the rapid and economical production of pictures. Graphics capabilities for both two-dimensional and three-dimensional applications are now common on general purpose computers. Various devices are available for data input on graphics workstations.

OBJECTIVES At the end of this unit, you should be able to 

Know the introductory concepts of computer graphics and the survey of computer graphics

Familiar with the various video display devices

Have a thorough study about the raster and random scan systems

Study the various graphical input devices.

A SURVEY OF COMPUTER GRAPHICS Computers have become a powerful tool for the rapid and economical production of pictures. Computer graphics used routinely in science, engineering, medicine, business, industry, government, art, entertainment, advertising, education, and training.

Computer-Aided Design CAD, computer-aided design methods are now routinely used in the design of buildings, automobiles, aircraft, watercraft, spacecraft, computers, textiles. Objects are first displayed in a wireframe outline form that shows the overall shape and internal features of objects. Wireframe displays also allow designers to quickly see the effects of interactive adjustments to design shapes. Animations are often used in CAD applications. Real-time animations using wireframe displays on a video monitor are useful for testing performance of a vehicle or system. Wireframe displays allow the designer to see into the interior of the vehicle and to watch the

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

64


MACHINE DRAWING & COMPUTER GRAPHICS

behavior of inner components during motion. Animations in virtual-reality environments are used to determine how vehicle operators are affected by certain motions. The manufacturing process is also tied in to the computer description of designed objects to automate the construction of the product. A circuit board layout, for example can be transformed into a description of the individual processes needed to construct the layout. Architects use interactive graphics methods to lay out floor plans. The positioning of rooms, doors, windows, stairs, shelves, counter, and other building features. Working from the display of a building layout on a video monitor, an electrical designer can try out arrangements for wiring, electrical outlets, and fire warning systems. With virtual-reality systems, designers can even go for a simulated “walk” through the rooms or round the outsides of buildings.

Presentation Graphics Another major application area is presentation graphics, used to produce illustrations for reports or to generate 35-mm slides or transparencies for use with projectors. Presentation graphics is commonly used to summarize financial, statistical, mathematical, scientific, and economic data for research reports, managerial reports, consumer information bulletins, and other types of reports. Typical examples of presentation graphics are bar charts, line graphs, surface graphs, pie charts, and other displays showing relationships between multiple parameters.

Computer Art Artists use a variety of computer methods, including special-purpose hardware, artist’s paintbrush programs (such as Lumena), other paint packages (such as PixelPaint and SuperPaint), specially developed software, symbolic mathematics packages (such as mathematica), CAD packages, desktop publishing software, and animation packages that provide facilities for designing object shapes and specifying object motions. Paintbrush program allows artists to “paint” pictures on the screen of a video monitor. The picture is usually painted electronically on a graphics tablet (digitizer) using a stylus, which can stimulate different brush strokes, brush widths, and colors. To create pictures the artist uses a combination of three-dimensional modeling packages, texture mapping, drawing programs, and CAD software. For “mathematical” art the artist uses a combination of mathematical functions, fractal procedures, Mathematica software, ink-jet printers, and other

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

65


MACHINE DRAWING & COMPUTER GRAPHICS

system to create a variety of three-dimensional and two-dimensional shapes and stereoscopic image pairs. Entertainment Computer graphics methods are now commonly used in making motion pictures, music videos, and television shows. Graphics objects can be combined with the live action or graphics and image processing techniques can be used to produce a transformation of one person or object into another (morphing). Education and Training Models of physical systems, physiological systems, population trends, or equipment, such as the color-coded diagram help trainees to understand the operation of the system. Examples of specialized systems are the simulators for practice sessions or training of ship captains, aircraft pilots, heavy-equipment operators, and air traffic-control personnel. Some simulators have no video screens; for example, a flight simulator with only a control panel for instrument flying. Visualization Producing graphical representations for scientific, engineering, and medical data sets and processes is generally referred to as scientific visualization. Business visualization is used in connection with data sets related to commerce, industry, and other nonscientific areas. Image Processing In computer graphics, a computer is used to create a picture. Image processing, on the other hand, applies techniques to modify or interpret existing pictures, such as photographs and TV scans. Two principal applications of image processing are (1) improving picture quality and (2) machine perception of visual information, as used in robotics. Medical applications also make extensive use of image-processing techniques for picture enhancements, in tomography and in simulations of operations. Tomography is a technique of X-ray photography that allows cross-sectional views of physiological systems to be displayed. Both computed X-ray tomography (CT) and position emission tomography (PET) use projection methods to reconstruct across sections from digital data. These techniques are also used to monitor internal functions and show cross sections during surgery. Other medical imaging techniques include ultrasonics and nuclear medicine scanners. With ultrasonics, high frequency sound waves, instead of X-rays, are used to

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

66


MACHINE DRAWING & COMPUTER GRAPHICS

generate digital data. Nuclear medicine scanners collect digital data from radiation emitted from ingested radionuclides and plot color-coded images. The last application is generally referred to as computer-aided surgery. Twodimensional cross sections of the body are obtained using imaging techniques. Then the slices are viewed and manipulated using graphics methods to simulate actual surgical procedures and to try out different surgical cuts. Graphical User Interfaces It is common now for software packages to provide a graphical interface. A major component of a graphical interface is a window manager that allows a user to display multiple-window areas. Each window can contain a different process that can contain graphical or nongraphical displays. Interfaces also display menus and icons for fast selection of processing operations or parameter values. An icon is a graphical symbol that is designed to look like the processing option it represents.

VIDEO DISPLAY DEVICES Typically, the primary output device in a graphics system is a video monitor. The operation of most video monitors is based on the standard cathode-ray tube (CRT) design. Refresh Cathode-Ray Tubes A beam of electrons (cathode rays) emitted by an electron gun, passes through focusing and deflection systems that direct the beam toward specified positions on the phosphor-coated screen. The phosphor then emits a small spot of light at each position contacted by the electron beam. Because the light emitted by the phosphor fades very rapidly, some method is needed for maintaining the screen picture. One way to keep the phosphor glowing is to redraw the picture repeatedly by quickly directing the electron beam back over the same points. This type of display is called a refresh CRT. Persistence is defined as the time it takes the emitted light from the screen to decay to one-tenth of its original intensity. Lower-persistence phosphors require higher refresh rates to maintain a picture on the screen without flicker. A phosphor with low persistence is useful for animation; a high-persistence phosphor is useful for displaying highly complex, static pictures.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

67


MACHINE DRAWING & COMPUTER GRAPHICS

The maximum number of points that can be displayed without overlap on a CRT is referred to as the resolution. A more precise definition of resolution is the number of points per centimeter that can be plotted horizontally and vertically, although it is often simply stated as the total number of points in each direction. High-resolution systems are often referred to as high-definition systems. Another property of video monitors is aspect ratio. This number gives the ratio of vertical points to horizontal. The following diagram shows the basic design of a magnetic deflection CRT.

Figure 1: Basic design of a magnetic deflection CRT

Raster Scan Displays The most common type of graphics monitor employing a CRT is the raster-scan display, based on television technology. In a raster-scan system, the electron beam is swept across the screen, one row at a time from top to bottom. As the electron beam moves across each row, the beam intensity is turned on and off to create a pattern of illuminated spots. Picture definition is stored in a memory area called the refresh buffer or frame buffer. This memory area holds the set of intensity values for all the screen points. Stored intensity values are then retrieved from the refresh buffer and “painted� on the screen one row (scan line) at a time. Each screen point is referred to as a pixel or pel (shortened forms of picture element). Home television sets and printers are examples of other systems using raster-scan methods. In a simple black-and-white system, each screen point is either on or off, so only one bit per pixel is needed to control the intensity of screen positions. For a bi-level system, a bit value of 1 indicates that the electron beam is to be turned on at that position, and a value of 0 indicates that the beam intensity is to be off. On a black-and-white system with one bit per

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

68


MACHINE DRAWING & COMPUTER GRAPHICS

pixel, the frame buffer is commonly called a bitmap. For systems with multiple bits per pixel, the frame buffer is often referred to as a pixmap. Refreshing on raster-scan displays is carried out at the rate of 60 to 80 frames per second, although some systems are designed for higher refresh rates. Sometimes, refresh rates are described in units of cycles per second, or Hertz (Hz), where a cycle corresponds to one frame. At the end of each scan line, the electron beam returns to the left side of the screen to begin displaying the next scan line. The return to the left of the screen, after refreshing each scan line, is called the horizontal retrace of the electron beam. And at the end of each frame (displayed in1/80th to 1/60th of a second), the electron beam returns (vertical retrace) to the top left corner of the screen to begin the next frame. The following figure shows the raster scan system that displays an object as a set of discrete points across each scan line.

Figure 2: Raster scan system that displays an object as a set of discrete points across each scan line

Random Scan Displays When operated as a random-scan display unit, a CRT has the electron beam directed only to the parts of the screen where a picture is to be drawn. Random-scan monitors draw a picture one line at a time and for this reason are also referred to as vector displays (or strokewriting or calligraphic displays). A pen plotter operates in a similar way and is an example of a random-scan, hard-copy device.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

69


MACHINE DRAWING & COMPUTER GRAPHICS

Refresh rate on a random-scan system depends on the number of lines to be displayed. Picture definition is now stored as a set of line-drawing commands in an area of memory referred to as the refresh display file. Sometimes the refresh display file is called the display list, display program, or simply the refresh buffer. Random-scan systems are designed for line drawing applications and cannot display realistic shaded scenes.

Color CRT Monitor A CRT monitor displays color pictures by using a combination of phosphors that emit different-colored light. The two basic techniques for producing color displays with a CRT are the beam-penetration method and the shadow-mask method. The beam-penetration method for displaying color pictures has been used with random-scan monitors. Two layers of phosphor, usually red and green, are coated onto the inside off the CRT screen, and the displayed color depends on how far the electron beam penetrates into the phosphor layers. A beam of slow electrons excites only the outer red layer. A beam of very fast electrons penetrates through the red layer and excites the inner green layer. At intermediate beam speeds, combination of red and green light is emitted to show two additional colors, orange and yellow. Shadow-mask methods are commonly used in raster-scan systems (including color TV) because they produce a much wider range of colors than the beam-penetration method. A shadow-mask CRT has three phosphor color dots at each pixel position. One phosphor dot emits a red light, another emits a green light, and the third emits a blue light. This type of CRT has three electron guns, one for each color dot, and a shadow-mask grid just behind the phosphor-coated screen. The three electron beams are deflected and focused as a group onto the shadow mask, which contains a series of holes aligned with the phosphor-dot patterns. When the three beams pass through a hole in the shadow mask, they activate a dot triangle, which appears as a small color spot on the screen. The phosphor dots in the triangles are arranged so that each electron beam can activate only its corresponding color dot when it passes through the shadow mask. Color CRTs in graphics systems are designed as RGB monitors. These monitors use shadow-mask methods and take the intensity level for each electron gun (red, green, and blue) directly from the computer system without any intermediate processing. An RGB color system with 24 bits of storage per pixel is generally referred to as a full-color system or a truecolor system. The following figure shows a random scan system that draws the component lines of an object in any order specified.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

70


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 3: A random scan system that draws the component lines of an object in any order specified

Direct-View Storage Tube An alternative method for maintaining a screen image is to store the picture information inside the CRT instead of refreshing the screen. A direct-view storage tube (DVST) stores the picture information as a charge distribution just behind the phosphorcoated screen. Two electron guns are used in DVST. One, the primary gun, is used to store the picture pattern; the second, the flood gun, maintains the picture display. A DVST monitor has both disadvantages and advantages compared to the refresh CRT. Because no refreshing is needed, very complex pictures can be displayed at very high resolutions without flicker. Disadvantages of DVST systems are that they ordinarily do not display color and that selected parts of a picture cannot be erased. The following figure shows the operation of a delta-delta shadow mask CRT.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

71


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 4: Operation of a delta-delta shadow mask CRT

Flat-Panel Displays The term flat-panel display refers to a class of video devices that have reduced volume, weight, and power requirements compared to a CRT. A significant feature of flatpanel displays is that they are thinner that CRTs and we can hang them on walls or wear them on our wrists. We can separate flat-panel displays into two categories: emissive displays and nonemissive displays. The emissive displays (or emitters) are devices that convert electrical energy into light. Plasma panels, thin-film electroluminescent displays, and light-emitting diodes are examples of emissive displays. Nonemmissive displays (or nonemitters) use optical effects to convert sunlight or light from some other source into graphics patterns. The most important example of a nonemissive flat-panel display is a liquid-crystal device. Plasma panels, also called gas-discharge displays, are constructed by filling the region between two glass plates with a mixture of gases that usually includes neon. Thin-film electroluminescent displays are similar in construction to a plasma panel. The difference is that the region between the glass plates is filled with a phosphor, such as zinc sulfide doped with manganese, instead of a gas. A third type of emissive device is the light-emitting diode (LED). A matrix of diodes is arranged to form the pixel positions in the display, and picture definition is stored in a refresh

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

72


MACHINE DRAWING & COMPUTER GRAPHICS

buffer. As in scan-line refreshing of a CRT, information is read from the refresh buffer and converted to voltage levels that are applied to the diodes to produce the light patterns in the display. Liquid-crystal displays (LCDs) are commonly used in small systems, such as calculators and portable, laptop computers. The term liquid crystal refers to the fact that these compounds have a crystalline arrangement of molecules, yet they flow like a liquid. Three-Dimensional Viewing Devices Graphics monitors for the display of three-dimensional scenes have been devised using a technique that reflects a CRT image from a vibrating, flexible mirror. A Genisco Space Graph uses a vibrating mirror to project three dimensional objects into a 25cm by 25cm by 25cm volume. Stereoscopic and Virtual Reality Systems Stereoscopic views provide a three-dimensional effect by presenting a different view to each eye of an observer so that scenes appear to have depth. One way to produce a stereoscopic effect is to display each of the two views with a raster system on alternate refresh cycles. Stereoscopic viewing is also a component in virtual-reality systems. An interactive virtual reality environment can also be viewed with stereoscopic glasses and a video monitor instead of a headset. RASTER SCAN SYSTEMS Interactive raster graphics systems typically employ several processing units. In addition to the central processing unit, or CPU, a special-purpose processor, called the video controller or display controller, is used to control the operation of the display device. Video Controller A fixed area of the system memory is reserved for the frame buffer, and the video controller is given direct access to the frame-buffer memory. Frame-buffer locations, and the corresponding screen positions, are referenced in Cartesian coordinates. The coordinate origin is defined at the lower left screen corner. The screen surface is then represented as the first quadrant of a two-dimensional system, with positive x values increasing to the right and positive y values increasing from bottom to top. (On some personal computers, the coordinate origin is referenced at the upper left corner of the screen, so the y values are inverted.) Scan lines are then labeled from ymax at the top of the screen to 0 at the bottom. Along each scan line, screen pixel positions are labeled from 0 to x max.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

73


MACHINE DRAWING & COMPUTER GRAPHICS

Two registers are used to store the coordinates of the screen pixels. Initially, the x register is set to 0 and the y register is set to ymax. The value stored in the frame buffer for this pixel position is then retrieved and used to set the intensity of the CRT beam. Then the x register is incremented by 1, and the process repeated for the next pixel on the top scan line. This procedure is repeated for each pixel along the scan line. A number of other operations can be performed by video controller, besides the basic refreshing operations. For various applications, the video controller can retrieve pixel intensities from different memory areas on different refresh cycles. In high-quality systems, for example, two frame buffers are often provided so that one buffer can be used for refreshing while the other is being filled with intensity values. Then the two buffers can switch roles. This provides a fast mechanism for generating real-time animations, since different views of moving objects can be successively loaded into the refresh buffers. Finally, some systems are designed to allow the video controller to mix the frame-buffer image with an input image from a television camera or other input device. The following figure shows the architecture of a simple raster graphics system.

Figure 5: Architecture of a simple raster graphics system Raster Scan Display Processor The organization of a raster system containing a separate display processor, sometimes referred to as a graphics controller or a display coprocessor. The purpose of the display processor is to free the CPU from the graphics chores. In addition to the system memory, a separate display-processor memory area can also be provided. A major task of the display processor is digitizing a picture definition given in an application program into a set of pixel-intensity values for storage in the frame buffer. This digitization process is called scan conversion.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

74


MACHINE DRAWING & COMPUTER GRAPHICS

One way to do this is to store each scan line as a set of integer pairs. One number of each pairs indicates an intensity value, and the second number specifies the number of adjacent pixels on the scan line that are to have that intensity. This technique, called runlength encoding, can result in a considerable saving in storage space if a picture is to be constructed mostly with long runs of a single color each. The disadvantages of encoding runs are that intensity changes are difficult to make and storage requirements actually increase as the length of the runs decreases. RANDOM SCAN SYSTEMS Graphics commands in the application program are translated by the graphics package into a display file stored in the system memory. This display file is accessed by the display processor to refresh the screen. The display processor cycles through each command in the display file program once during every refresh cycle. Sometimes the display processor in a random-scan system is referred to as a display processing unit or a graphics controller. The following figure shows the architecture of a random scan system with a display processor.

Figure 6: Architecture of a random scan graphics system with a display processor

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

75


MACHINE DRAWING & COMPUTER GRAPHICS

INPUT DEVICES Keyboards An alphanumeric keyboard on a graphics system is used primarily as a device for entering text strings. The keyboard is an efficient device for inputting such nongraphic data as picture labels associated with a graphics display. Cursor-control keys and function keys are common features on general-purpose keyboards. Function keys allow users to enter frequently used operations in a single keystroke, and cursor-control keys can be used to select displayed objects or coordinate positions by positioning the screen cursor. Other types of cursor-positioning devices, such as a trackball or joystick, are included on some keyboards.

Mouse A mouse is small hand-held box used to position the screen cursor. Wheels rollers on the bottom of the mouse can be used to record the amount and direction of movement. Another method for detecting mouse motion is with an optical sensor. The mouse is moved over a special mouse pad that has a grid of horizontal and vertical lines. The optical sensor detects movement across the lines in the grid.

Trackball and Spaceball As the name implies, a trackball is a ball that can be rotated with the fingers or palm of the hand. While a trackball is a two-dimensional positioning device, a spaceball provides six degrees of freedom. Unlike the trackball, a spaceball does not actually move.

Joystick A joystick consists of a small, vertical lever (called the stick) mounted on a base that is used to steer the screen cursor around. Most joysticks select screen positions with actual stick movement; others respond to pressure on the stick. The distance that the stick is moved in any direction from its center position corresponds to screen-cursor movement in that direction.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

76


MACHINE DRAWING & COMPUTER GRAPHICS

Data Glove Data glove can be used to grasp a “virtual” object. The glove is constructed with a series of sensors that detect hand and finger motions. Digitizer A common device for drawing, painting, or interactively selecting coordinate positions on an object is a digitizer. These devices can be used to input coordinate values in either a two-dimensional or a three-dimensional space. One type of digitizer is the graphics tablet (also referred to as a data tablet), which is used to input two-dimensional coordinates by activating a hand cursor or stylus at selected positions on a flat surface. A hand cursor contains cross hairs for sighting positions, while a stylus is a pencil-shaped device that is pointed at positions on the tablet. Acoustic (or sonic) tablets use sound waves to detect a stylus position. Either strip microphones or point microphones can be used to detect the sound emitted by an electrical spark from a stylus tip. The position of the stylus is calculated by timing the arrival of the generated sound at the different microphone positions. An advantage of two-dimensional acoustic tablets is that the microphones can be placed on any surface to form the “tablet” work area. Image Scanner Drawings, graphs, color and black-and-white photos, or text can be stored for computer processing with an image scanner by passing an optical scanning mechanism over the information to be stored.

Touch Panel As the name implies, touch panels allow displayed objects or screen positions to be selected with the touch of a finger. A typical application of touch panels is for the selection of processing options that are represented with graphical icons. Optical touch panels employ a line of infrared light-emitting diodes (LEDs) along one vertical edge and along one horizontal edge of the frame.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

77


MACHINE DRAWING & COMPUTER GRAPHICS

Light Pen Pencil-shaped devices are used to select screen positions by detecting the light coming from points on the CRT screen. They are sensitive to the short burst of light emitted from the phosphor coating at the instant the electron beam strikes a particular point. An activated light pen, pointed at a spot on the screen as the electron beam lights up that spot, generates an electrical pulse that causes the coordinate position of the electron beam to be recorded. Although light pens are still with us, they are not as popular as they once were since they have several disadvantages compared to other input devices that have been developed. And prolonged use of the light pen can cause arm fatigue. Voice Systems Speech recognizers are used in some graphics workstations as input devices to accept voice commands. The voice-system input can be used to initiate graphics operations or to enter data. These systems operate by matching an input against a predefined dictionary of words and phrases. A dictionary is set up for a particular operator by having the operator speak the command words to be used into the system.

HARD-COPY DEVICES We can obtain hard-copy output for our images in several formats. The quality of the pictures obtained from a device depends on dot size and the number of dots per inch, or lines per inch, that can be displayed. To produce smooth characters in printed text strings, higherquality printers shift dot positions so that adjacent dots overlap. Impact printer press formed character faces against an inked ribbon onto the paper. A line printer is an example of an impact device. Nonimpact printers and plotters use laser techniques, ink-jet sprays, xerographic processes (as used in photocopying machines), electrostatic methods, and electro thermal methods to get images onto paper. Character impact printers often have a dot-matrix print head containing a rectangular array of producing wire pins, with the number of pins depending on the quality of the printer.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

78


MACHINE DRAWING & COMPUTER GRAPHICS

In a laser device, a laser beam creates a charge distribution on a rotating drum coated with a photoelectric material, such as selenium. Toner is applied to the drum and then transferred to paper. Ink-jet methods produce output by squirting ink in horizontal rows across a roll of paper wrapped on a drum. The electrically charged ink stream is deflected by an electric field to produce dot-matrix patterns. An electrostatic device places a negative charge on the paper, one complete row at a time along the length of the paper. Then the paper is exposed to a toner. The toner is positively charged and so is attracted to the negatively charged areas. Electro thermal methods use heat in a dot-matrix print head to output patterns on heat-sensitive paper.

SUMMARY In this unit the major hardware and software features of computer graphics systems are surveyed. The predominant graphics display device is the raster refresh monitor. Flat panel display technology is commonly used and replaces raster displays in the near future. For graphical input, keyboards, button boxes and dials are used to input text, data values. Hard copy devices for graphics workstations include standard printers and plotters.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

79


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT-VI OUTPUT PRIMITIVES AND ATTRIBUTES OF OUTPUT PRIMITIVES

INTRODUCTION Each output primitive is specified with input coordinate data and other information about the way that objects are to be displayed. The discussion is about picture generation procedures by examining device-level algorithms for displaying two-dimensional output primitives with particular emphasis on scan conversion methods for raster graphics systems. This unit describes the output primitives and the attributes of the output primitives. OBJECTIVES At the end of this unit, you should be able to 

Know the line drawing, circle drawing and ellipse drawing algorithms

Have a overview of the attributes of the output primitives

Have a thorough study about the antialiasing techniques

Study the process of character generation.

OUTPUT PRIMITIVES Graphics programming packages provide functions to describe a scene in terms of these basic geometric structures, referred to as output primitives. Each output primitive is specified with input coordinate data and other information about the way that objects are to be displayed. Additional output primitives that can be used to construct a picture include circles and other conic sections, quadric surfaces, spline curves and surface, polygon color areas, and character strings.

Points and Lines Point plotting is accomplished by converting a single coordinate position furnished by an application program into appropriate operations for the output device in use. With a CRT monitor, for example, the electron beam is turned on to illuminate the screen phosphor at the

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

80


MACHINE DRAWING & COMPUTER GRAPHICS

selected location. For a black-and-white raster system, on the other hand, a point is plotted by setting the bit value corresponding to a specified screen position within the frame buffer to 1. Line drawing is accomplished by calculating intermediate positions along the line path between two specified endpoint positions. An output device is then directed to fill in these positions between the endpoints. For analog devices, such as a vector pen plotter or a random-scan display, a straight line can be drawn smoothly from one endpoint to the other. To load a specified color into frame buffer at a position corresponding to column x along scan line y, we will assume we have available a low-level procedure of the form setPixel (x, y)

To retrieve the current frame-buffer intensity setting for a specified location.We accomplish this with the low-level function

getPixel (x, y)

Line Drawing Algorithms The Cartesian slope-intercept equation for a straight line is y=m.x+b With m representing the slope of the line and b as the y intercept. Given that the two endpoints of a line segment are specified at positions (x 1, y1) and (x2, y2). We can determine values for the slope m and y intercept b with the following calculations: m = y2 - y1 / x2 - x1

b = y1 – m. x1

For any given x interval ∆x along a line, we can compute the corresponding y interval ∆y

∆y = m ∆x

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

81


MACHINE DRAWING & COMPUTER GRAPHICS

Similarly, we can obtain the x interval ∆x corresponding to a specified ∆y as ∆x = ∆y / m

DDA Algorithm The digital differential analyzer (DDA) is a scan-conversion line algorithm based on calculating either ∆y or ∆x.

#include “device.h” #define ROUND (a) ( (int) (a+0.5) ) Void lineDDA (int xa, int ya, int xb, int yb) { int dx – xb – xa, dy = yb – ya, steps, k; float xIncrement, yIncrement, x = xa, y = ya;

if (abs (dx) > abs (dy) ) steps = abs (dx); else steps = abs (dy); xIncrement = dx / (float) steps; yIncrement = dy / (float) steps;

setPixel (ROUND (x), ROUND (y) ); for (k=0; k<steps; k++); { x += xIncrement; y +=yIncrement; setPixel (ROUND(x), ROUND(y) );

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

82


MACHINE DRAWING & COMPUTER GRAPHICS

} }

The DDA algorithm is a faster method for calculating pixel positions.

Bresenham’s Line Algorithm An accurate and efficient raster line-generating algorithm, developed by Bresenham, scan converts line using only incremental integer calculations that can be adapted to display circles and other curves. The vertical axes show scan-line positions, and the horizontal axes identify pixel columns.

1. Input the two line endpoints and store the left endpoint in (x 0, y0). 2. Load (x0, y0) into the frame buffer; that is, plot the first point. 3. Calculate constants ∆x, ∆y, 2∆y, and 2∆y - 2∆x, and obtain the starting value for the decision parameter as p0 = 2∆y - ∆x 4. At each xk along the line, starting at k = 0, perform the following test: If pk < 0, the next point to plot is (xk + 1, yk )

pk+1 = pk + 2∆y

otherwise, the next point to plot is (xk + 1, yk + 1) and

pk+1 = pk + 2∆y - 2∆x

5. Repeat step 4 ∆x times.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

83


MACHINE DRAWING & COMPUTER GRAPHICS

Loading the Frame Buffer When straight line segments and other objects are scan converted for display with a raster system, frame-buffer positions must be calculated. Scan-conversion algorithms generate pixel positions at successive unit intervals. This allows us to use incremental methods to calculate frame-buffer addresses. As a specific example, suppose the frame-buffer array is addressed in row-major order and that pixel positions vary from (0, 0) at the lower left screen corner to (x max, ymax) at the top right corner. For a bilevel system (1 bit per pixel), the frame-buffer bit address for pixel position (x,y) is calculated as

addr(x, y) = addr(0, 0) + y(xmax + 1) + x

Moving across a scan line, we can calculate the frame-buffer address for the pixel at (x + 1, y) as the following offset from the address for position (x, y):

addr(x + 1, y) = addr(x, y) +1

Stepping diagonally up to the next scan line from (x, y), we get to the frame-buffer address of (x + 1, y + 1) with the calculation addr (x + 1, y + 1) = addr(x, y) + xmax + 2

where the constant xmax + 2 is precomputed once for all line segments.

Circle Generating Algorithms Since the circle is a frequently used component in pictures and graphs, a procedure for generating either full circles or circular arcs is include in most graphics packages.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

84


MACHINE DRAWING & COMPUTER GRAPHICS

Properties of Circles A circle is defined as the set of points that are all at a given distance r from a center position (xc, yc). this distance relationship is expressed by the Pythagorean theorem in Cartesian coordinates as

2

2

(x - xc) + (y - yc) = r

2

Expressing the circle equation in parametric polar form yields the pair of equations

x = xc + r cosθ y = yc + r sinθ

Midpoint Circle Algorithm To apply the midpoint method, we define a circle function: 2

2

fcircle(x, y) = x + y - r

2

Any point (x, y) on the boundary of the circle with radius r satisfies the equation fcircle(x, y) = 0. If the point is in the interior of the circle, the circle function is negative. And if the point is outside the circle, the circle function is positive. To summarize, the relative position of any point (x, y) can be determined by checking the sign of the circle function:

fcircle(x, y)={ < 0, if (x, y) is inside the circle boundary = 0, if (x, y) is on the circle boundary > 0, if (x, y) is outside the circle boundary

1. Input radius r and circle center (x c, yc) and obtain the first point on the circumference of a circle centered on the origin as

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

85


MACHINE DRAWING & COMPUTER GRAPHICS

(x0, y0) = (0, r)

2. Calculate the initial value of the decision parameter as

p0 = 5/4 – r

3. At each xk position, starting at k=0, perform the following test: If pk < 0, the next point along the circle centered on (0, 0) is (x k + 1, yk) and

pk + 1 = pk + 2xk + 1 + 1

Otherwise, the next point along the circle is (x k + 1, yk – 1) and

pk + 1 = pk + 2xk + 1 + 1 – 2y k + 1

where 2xk + 1 = 2xk + 2 and 2y k + 1 = 2y k – 2.

4. Determine symmetry points in the other seven octants. 5. Move each calculated pixel position (x, y) onto the circular path centered on (x c, yc) and plot the coordinate values:

x = x + xc,

y = y + yc

6. Repeat steps 3 through 5 until x ≥ y.

Ellipse Generating Algorithms

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

86


MACHINE DRAWING & COMPUTER GRAPHICS

87

An ellipse is an elongated circle.

Properties of Ellipse An ellipse is defined as the set of points such that the sum of the distances from two fixed positions (foci) is the same for all points. If the distances to the two foci from any point P = (x, y) on the ellipse are labeled d1 and d2, then the general equation of an ellipse can be stated as

d1 + d2 = constant Midpoint Ellipse Algorithm 2

We define an ellipse function from (x - xc / rx) + (y - yc / ry )

2

= 1 with (xc, yc) = (0, 0)

as

2

2

2

2

2

2

fellipse(x, y) = ry x + rx y - rx ry

which has the following properties:

fellipse(x, y) ={ < 0, if (x, y) is inside the ellipse boundary = 0, if (x, y) is on the ellipse boundary > 0, if (x, y) is outside the ellipse boundary

1. Input rx, ry, and ellipse center (xc, yc), obtain the first point on an ellipse centered on the origin as

(x0, y0) = (0, ry)

2. Calculate the initial value of the decision parameter in region 1 as

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

2

2

88

2

p10 = ry – rx ry + ¼ r x

3. At each xk position in region 1, starting at k = 0, perform the following test: If p1 k < 0, the next point along the ellipse centered on (0, 0) is (x k + 1, y k)and

2

2

p1k + 1 = p1k + 2ry xk + 1 + ry

Otherwise, the next point along the circle is (x k + 1, y k – 1) and

2

2

2

p1k + 1 = p1k + 2ry xk + 1 - 2rx yk + 1 + ry

with

2

2

2

2

2

2

2ry x k + 1 = 2ry x k + 2ry , 2rx y k + 1 = 2rx y k - 2rx

2

2

and continue until 2ry x ≥ 2rx y

4. Calculate the initial value of the decision parameter in region 2 using the last point (x0, y0) calculated in region 1 as

2

2

2

2

2

2

p20 = ry (x0 + ½) + rx (y0 – 1) - rx ry

5. At each yk position in region 2, starting at k = 0, perform the following test: If p2 k > 0, the next point along the ellipse centered on (0, 0) is (x k, yk – 1) and

2

2

p2k + 1 = p2k - 2rx yk + 1 + r x

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

89

Otherwise, the next point along the circle is (x k + 1, yk – 1) and

2

2

2

p2k + 1 = p2k + 2ry x k + 1 - 2rx yk + 1 + r x

Using the same incremental calculations for x and y as in region 1. 6. Determine symmetry points in the other three quadrants. 7. Move each calculated pixel position (x, y) onto the elliptical path centered on (x c, yc) and plot the coordinate values:

x = x + xc,

y = y + yc

2

2

8. Repeat the steps for region 1 until 2ry x ≥ 2rx y

Other Curves Various curve functions are useful in object modeling, animation path specifications, data and function graphing, and other graphics applications. Commonly encountered curves include conics, trigonometric and exponential functions, probability distributions, general polynomials, and spline functions. A straightforward method for displaying a specified curve function is to approximate it with straight line segments. Straight-line or curve approximations are used to graph a data set of discrete coordinate points.

Conic Sections In general, we can describe a conic section (or conic) with the second-degree equation: 2

2

Ax + By + Cxy +Dx + Ey + F = 0 where values for parameters A, B, C, D, E, and F determine the kind of curve we are to display. Given this set of collections, we can determine the particular conic that will be 2

generated by evaluating the discriminant B – 4AC:

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

90

2

B – 4AC {< 0, generates an ellipse (or circle) = 0, generates a parabola > 0, generates a hyperbola

Polynomials and Spline Curves A polynomial function of nth degree in x is defined as

y = ∑ akx

k

= a0 + a1x + … + an-1x

n-1

+ anx

n

where n is a nonnegative integer and the ak are constants, with an ≠ 0. We get a quadratic when n = 2; a cubic polynomial when n = 3; a quartic n = 4 and a straight line when n =1. Parallel Curve Algorithms We can either adapt a sequential algorithm by allocating processors according to curve partitions. A parallel midpoint method for displaying circles is to divide the circular arc from 90° to 45° into equal sub arcs and assign a separate processor to each sub arc. Pixel positions are then calculated throughout each sub arc, and positions in the other circle octants are then obtained by symmetry. A parallel ellipse midpoint method divides the elliptical arc over the first quadrant into equal sub arcs and parcels these out to separate processors. Pixel positions in the other quadrants are determined by symmetry. Each processor uses the circle or ellipse equation to calculate curve-intersection coordinates.

Pixel Addressing and Object Geometry Several coordinate references associated with the specification and generation of a picture. Object descriptions are given in a world-reference frame, chosen to suit a particular application, and input world coordinates are ultimately converted to screen display positions. Another approach is to map world coordinates onto screen positions between pixels, so that we align object boundaries with pixel boundaries instead of pixel centers.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Screen Grid Coordinates A screen coordinate position is then the pair of integer values identifying a grid intersection position between two pixels. With the coordinate origin at the lower left of the screen, each pixel area can be referenced by the integer grid coordinates of its lower left corner. We identify the area occupied by a pixel with screen coordinates (x, y) as the unit square with diagonally opposite corners at (x, y) and (x + 1, y + 1).this pixel-addressing scheme has several advantages: It avoids half-integer pixel boundaries, it facilitates precise object representations, and it simplifies the processing involved in many scan-conversion algorithm and in other raster procedures.

Maintaining Geometric Properties of Displayed Objects When we convert geometric descriptions of objects into pixel representations, we transform mathematical points and lines into finite screen areas. For an enclosed area, input geometric properties are maintained by displaying the area only with those pixels that are interior to the object boundaries. The rectangle defined with the screen coordinate vertices, for example, is larger when we display it filled with pixels up to and including the border pixel lines joining the specified vertices. Filled Area Primitives A standard output primitive in general graphics packages is a solid-color or patterned polygon area. Other kinds of area primitives are sometimes available, but polygons are easier to process since they have linear boundaries. There are two basic approaches to area filling on raster systems. One way to fill an area is to determine the overlap intervals for scan lines that cross the area. Another method for area filling is to start from a given interior position and paint outward from this point until we encounter the specified boundary conditions. The scan-line approach is typically used in general graphics packages to fill polygons, circles, ellipses, and other simple curves.

Scan-Line Polygon Fill Algorithm For each scan line crossing a polygon, the area-fill algorithm locates the intersection points of the scan line with the polygon edges. These intersection points are then sorted from

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

91


MACHINE DRAWING & COMPUTER GRAPHICS

left to right, and the corresponding frame-buffer positions between each intersection pair are set to the specified fill color. A scan line passing through a vertex intersects two polygon edges at that position, adding two points to the list of intersections for the scan line. The topological difference between scan line y and scan line y' is identified by noting the position of the intersecting edges relative to the scan line. For scan line y, the two intersecting edges sharing a vertex are on opposite sides of the scan line. But for scan line y', the two intersecting edges are both above the scan line. Thus, the vertices that require additional processing are those that have connecting edges on opposite sides of the scan line. One way to resolve the question as to whether we should count a vertex as one intersection or two is to shorten some polygon edges to split those vertices that should be counted as one intersection. Inside-Outside Tests We apply the odd-even rule, also called the odd parity rule or the even-odd rule, by conceptually drawing a line from any position P to a distance point outside the coordinate extends of the object and counting the number of edge crossings along the line. If the number of polygon edges crossed by this line is odd, then P is an interior point. Otherwise, P is an exterior point. Another method for defining interior regions is the nonzero winding number rule, which counts the number of times the polygon edges wind around a particular point in the counterclockwise direction, this count is called the winding number, and the interior points of a two-dimensional object are defined to be those that have a nonzero value for the winding number.

Scan-Line Fill of Curved Boundary Areas In general, scan-line fill of regions with curved boundaries requires more work than polygon filling, since intersection calculations now involve nonlinear boundaries. We only need to calculate the two scan-line intersections on opposite sides of the curve. Symmetries between quadrants (and between octants for circles) are used to reduce the boundary calculations. Similar methods can be used to generate a fill area for a curve section. The interior region is bounded by the ellipse section and a straight-line segment that closes the curve by joining the beginning and ending positions of the arc.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

92


MACHINE DRAWING & COMPUTER GRAPHICS

Boundary-Fill Algorithm Another approach to area filling is to start at a point inside a region and paint the interior outward toward the boundary. If the boundary is specified in a single color, the fill algorithm proceeds outward pixel by pixel until the boundary color is encountered. This method, called the boundary-fill algorithm, is particularly useful in interactive painting packages, where interior points are easily selected. A boundary-fill procedure accepts as input the coordinates of an interior point (x, y), a fill color, and a boundary color. Starting from (x, y), the procedure tests neighboring positions to determine whether they are of the boundary color. If not, they are painted with fill color, and their neighbors are tested. This process continues until all pixels up to the boundary color for the area have been tested.

Flood-Fill Algorithm Sometimes we want to fill in (or recolor) an area that is not defined within a single color boundary. We can paint such areas by replacing a specified interior color instead of searching for a boundary color value. This approach is called a flood-fill algorithm. We start from a specified interior point (x, y) and reassign all pixel values that are currently set to a given interior color with the desired fill color. If the area we want to paint has more than one interior color, we can first reassign pixel values so that all interior points have the same color.

Character Generation Letters, numbers, and other characters can be displayed in a variety of sizes and styles. The overall design style for a set (or family) of characters is called a type-face. Examples of a few common typefaces are courier, Helvetica, New York, Palatino, and Zapf Chancery. The term font referred to a set of cast metal character forms in a particular size and format, such as 10-point Courier italic or 12-point Palatino Bold. The terms font and typeface are often used interchangeably. Typefaces (or fonts) can be divided into two broad groups: serif and sans serif. Serif type has small lines or accents at the ends of the main character strokes, while sans-serif type does not have accents. Serif type is generally more readable; that is, it is easier to read in longer blocks of text. Sans-serif type is said to be more legible. Since sans-serif characters can be quickly recognized, this typeface is good for labeling and short headings.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

93


MACHINE DRAWING & COMPUTER GRAPHICS

A simple method for representing the character shapes in a particular typeface is to use rectangular grid patterns. The set of characters are then referred to as a bitmap font (or bitmapped font). Another, more flexible, scheme is to describe character shapes using straight-line and curve sections, as in PostScript, for example. In this case, the set of characters is called an outline font. Bitmap fonts are the simplest to define and display: The character grid only needs to be mapped to a frame-buffer position. ATTRIBUTES OF OUTPUT PRIMITIVES Any parameter that affects the way a primitive is to be displayed is referred to as an attribute parameter. Some attribute parameters, such as color and size, determine the fundamental characteristics of a primitive. Others specify how the primitive is to be displayed under special conditions. Examples of attributes in this class include depth information for three-dimensional viewing and visibility or detectability options for interactive object-selection programs. Line Attributes Basic attributes of a straight line segment are its type, its width, and its color. In some graphics packages, line can also be displayed using selected pen or brush options. Line Type Possible selections for the line-type attribute include solid lines, dashed lines, and dotted lines. We modify a line-drawing algorithm to generate such lines by setting the length and spacing of displayed solid sections along the line path. A dash line could be displayed by generating an interdash spacing that is equal to the length of the solid sections. A dotted line can be displayed by generating very short dashes with the spacing equal to or greater than the dash size. Pixel counts for the span length and interspan spacing can be specified in a pixel mask, which is a string containing the digits 1 and 0 to indicate which positions to plot along the line path. Line Width A heavy line on a video monitor could be displayed as adjacent parallel lines, while a pen plotter might require pen changes. We set the line-width attribute with the command: setLinewidthScaleFactor (lw)

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

94


MACHINE DRAWING & COMPUTER GRAPHICS

Line-width parameter lw is assigned a positive number to indicate the relative width of the line to be displayed. A value of 1 specifies a standard-width line. Values greater than 1 produce lines thicker than the standard. We can adjust the shape of the line ends to give them a better appearance by adding line caps. One kind of line cap is the butt cap obtained by adjusting the end positions of the component parallel lines so that the thick line is displayed with square ends that are perpendicular to the line path. Another line cap is the round cap obtained by adding a filled semicircle to each butt cap. The circular arcs are centered on the line endpoints and have a diameter equal to the line thickness. A third type pf line cap is the projecting square cap. Here, we simply extend the line and add butt caps that are positioned one-half of the line width beyond the specified endpoints. A meter join is accomplished by extending the outer boundaries of each of the two lines until they meet. A round join is produced by capping the connection between the two segments with a circular boundary whose diameter is equal to the line width. A bevel join is generated by displaying the line segments with butt caps and filling in the triangular gap where the segments meet.

Pen and Brush Options With some packages, lines can be displayed with pen or brush selections. Operations in this category include shape, size, and pattern. Lines generated with pen (or brush) shapes can be displayed in various widths by changing the size of the mask.

Line Color When a system provides color (or intensity) options, a parameter giving the current color index is included in the list of system-attribute values. We set the line color value in PHIGS with the function

setPolylineColourIndex (lc)

Nonnegative integer values, corresponding to allowed color choices, are assigned to the line color parameter lc. A line drawn in the background color is invisible.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

95


MACHINE DRAWING & COMPUTER GRAPHICS

Curve Attributes Parameters for curve attributes are the same as those for line segments. We can display curves with varying colors, widths, dot-dash patterns, and available pen or brush options. Pixel masks display dashes and interdash spaces that vary in length according to the slope of the curve. Raster curves of various widths can be displayed using the method of horizontal or vertical pixel spans. Where the magnitude of the curve slope is less than 1, we plot vertical spans; where the slope magnitude is greater than 1, we plot horizontal spans. Another method for displaying thick curves is to fill in the area between two parallel curve paths, whose separation distance is equal to the desired width.

Color and Grayscale Levels General-purpose raster-scan systems, for example, usually provide a wide range of colors. For CRT monitors, these color codes are then converted to intensity-level settings for the electron beams. In a color raster system, the number of color choices available depends on the amount of storage provided per pixel in the frame buffer. Also, color information can be stored in the frame buffer in two ways: We can store color codes directly in the frame buffer, or we can put the color codes in a separate table and use pixel values as an index into this table.

Color Tables A user can set color-table entries in a PHIGS applications program with the function

setColourRepresentation (ws, ci, colorptr) Parameter ws identifies the workstation output device; parameter ci specifies the color index, which is the color-table position number (0 to 255 for the example); and parameter colorptr points to a trio of RGB color values (r, g, b) each specified in the range from 0 to 1. There are several advantages in storing color codes in a lookup table. Use of a color table can provide a “reasonable� number of simultaneous colors without requiring large frame buffers.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

96


MACHINE DRAWING & COMPUTER GRAPHICS

Grayscale With monitors that have no color capability, color functions can be used in an application program to set the shades of gray, or grayscale, for displayed primitives. Numeric values over the range from 0 to 1 can be used to specify grayscale levels, which are then converted to appropriate binary codes for storage in the raster. This allows the intensity settings to be easily adapted to systems with differing grayscale capabilities. An alternative scheme for storing the intensity information is to convert each intensity code directly to the voltage value that produces this gray-scale level on the output device in use. When multiple output devices are available at an installation, the same color-table interface may be used for all monitors. Area Fill Attributes Options for filling a defined region include a choice between a solid color or a patterned fill and choices for the particular colors and patterns. These fill options can be applied to polygon regions or to areas defined with curved boundaries.

Fill Styles Areas are displayed with three basic fill styles: hollow with a color border, filled with a solid color, or filled with a specified pattern or design. A basic fill style is selected in a PHIGS program with the function

setInteriorStyle (fs) Values for the fill-style parameter fs include hollow, solid, and pattern. Another value for fill style is hatch, which is used to fill an area with selected hatching patterns—parallel lines or crossed lines. Other fill options include specifications for the edge type, edge width, and edge color of a region. Pattern Fill We select fill patterns with

setInteriorStyleIndex (pi)

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

97


MACHINE DRAWING & COMPUTER GRAPHICS

where pattern index parameter pi specifies a table position.

For fill style pattern, table entries can be created on individual output devices with

setPatternRepresentation (ws, pi, nx, ny, cp)

Parameter pi sets the pattern index number for workstation code ws, and cp is a twodimensional array of color codes with nx columns and ny rows. A reference position for starting a pattern fill is assigned with the statement

setPatternReferencePoint (position)

Parameter position is a pointer to coordinates (xp, yp) that fix the lower left corner of the rectangular pattern. The process of filling an area with a rectangular pattern is called tiling and rectangular fill patterns are sometimes referred to as tiling patterns.

Soft Fill Modified boundary-fill and flood-fill procedures that are applied to repaint areas so that the fill color is combined with the background colors are referred to as soft-fill or tint-fill algorithms. As an example of this type of fill, the linear soft-fill algorithm repaints an area that was originally painted by merging a foreground color F with a single background color B, where F ≠B.

Character Attributes The appearance of displayed characters is controlled by attributes such as font, size, color, and orientation.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

98


MACHINE DRAWING & COMPUTER GRAPHICS

99

Text Attributes There is the choice of font (or typeface), which is a set of character with a particular design style such as New York, Courier, Helvetica, London, Times Roman, and various special symbol groups. The characters in a selected font can also be displayed with assorted underlining styles (solid , dotted , double), in boldface, in italics, and in

or shadow

styles. Character height is defined as the distance between the baseline and the capline of characters. Text size can be adjusted without changing the width-to height ratio of characters with

setCharacterHeight (ch)

Parameters ch is assigned a real value greater than 0 to set the coordinate height of capital letters: the distance between baseline and capline in user coordinates. The width only of text can be set with the function setCharacterExpansionFactor (cw)

where the character-width parameter cw is set to a positive real value that scales the body width of characters. Spacing between characters is controlled separately with

setCharacterSpacing (cs)

where the character-spacing parameter cs can be assigned any real value. The orientation for a displayed character string is set according to the direction of the character up vector:

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

setCharacterUpVector (upvect)

Parameter upvect in this function is assigned two values that specify the x and y vector components. A precision specification for text display is given with

setTextPrecision (tpr)

where text precision parameter tpr is assigned one of the values: string, char, or stroke.

Marker Attributes A marker symbol is a single character that can be displayed in different colors and in different sizes. We select a particular character to be the marker symbol with

setMarkerType (mt)

where marker type parameter mt is set to an integer code. Typically codes for marker type are the integers 1 through 5, specifying, respectively, a dot (路), a vertical cross (+), an asterisk (*), a circle (o), and a diagonal cross (X).

Antialiasing Displayed primitives generated by the raster algorithm have a jagged, or stairstep, appearance because the sampling process digitizes coordinate points on an object to discrete integer pixel positions. This distortion of information due to low-frequency sampling (under sampling) is called aliasing. We ca improve the appearance of displayed raster lines by applying antialiasing methods that compensate for the under sampling process.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

100


MACHINE DRAWING & COMPUTER GRAPHICS

SUMMARY

In this unit the various attributes that control the appearance of displayed primitives are discussed. The basic line attributes are line type, line color and line width. To reduce the size of the frame buffer, some raster systems use a separate color lookup table. Characters can be displayed in difference colors, sizes and orientations. Marker symbols can be displayed using selected characters of various sizes and colors. The appearance of raster primitives can be improved by applying antialiasing procedures that adjust pixel intensities.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

101


MACHINE DRAWING & COMPUTER GRAPHICS

102

UNIT-VII TWO-DIMENSIONAL GEOMETRIC TRANSFORMATIONS INTRODUCTION Design applications and facility layouts are created by arranging the orientations and sizes of the component parts of the scene. Animations are produced by moving he objects in a scene along animation paths. Changes in orientation, size and shape are accomplished with geometric transformations that alter the coordinate descriptions of objects. The basic geometric transformations are translation, rotation and scaling. Other transformations include reflection and shear.

OBJECTIVES At the end of this unit, you should be able to 

Understand the basic transformations namely translation, rotation and scaling

Know the other transformations namely reflection and shear

Familiar with the window and viewport transformations

Have a thorough study about line clipping and polygon clipping algorithms

Study the text clipping, curve clipping and exterior clipping.

BASIC TRANSFORMATIONS Changes in orientation, size and shape of an object are accomplished with geometric transformations that alter the coordinate descriptions of objects.

Translation 

A translation is applied to an object by repositioning it along a straight path from one coordinate location to another.

We translate a two-dimensional point by adding translation distances,t x and ty to ’

the original coordinate position(x,y)to move the point to a new position(x ,y ).

X =x+tx

y=y+ty

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

103

The translation distance pair(t x,ty)is called a translation vector or shift vector.

x1

x1’

P=

P’=

x2 ,

x2’

tx T= ty

 This allows us to write the two-dimensional translational equations in the matrix form:

P’=P+T

 Translation is a rigid-body transformation that

moves

objects without deformation.  Every point on the object is translated by the same amount. The following figure shows the translation of an object.

Figure 7: Translation of an object

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Rotation

 A two-dimensional rotation is applied to an object by repositioning it along a circular path in the xy plane.

 To generate a rotation, we specify a rotation angle θ and the position (xr,yr)of the rotation point(or pivot point) about which the object is to be rotated.

 Positive values for the rotation angle define counterclockwise rotations about the pivot point.

 Negative values rotate objects in the clockwise direction. This transformation can also be described as a rotation about rotation axis that is perpendicular to the xy plane and passes through the pivot point.  The rotation equation is expressed in the matrix form:

P’=R.P

Where the rotation matrix is

cosθ –sinθ R= sinθ cosθ

The following figure shows the rotation of an object.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

104


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 8: Rotation of an object

Scaling

 A scaling transformation alters the size of an object.

 This operation can be carried out for polygons by multiplying the coordinate values(x,y)of each vertex by scaling factors sx and sy to produce the transformed coordinates(x’,y’):

X’=x.sx ,

y’=y.sy

 Scaling factor sx scales objects in the x direction, while s y scales in the y direction. The transformation equation can also be written in the matrix form:

X’

sx 0 =

Y’

x .

0 sy

y

Or

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

105


MACHINE DRAWING & COMPUTER GRAPHICS

P’=S.P

When sx and sy are assigned the same value, a uniform scaling is produced that maintains relative object proportions.

Unequal values for sx and sy result in a differential scaling that is often used in design applications. The following figure shows the scaling operation where a square is converted to a rectangle.

Figure 9: Scaling operation

3.3 MATRIX REPRESENTATIONS AND HOMOGENEOUS COORDINATES Many graphics applications involve sequence of geometric transformations. An animation, for example, might require an object to be translated and rotated at each increment of the motion. Each of the basic transformations can be expressed in the general matrix form:

P’=M1.P + M2

With coordinate positions p and p’ represented as column vectors.

To produce a sequence of transformations such as scaling followed by rotation then translation, we must calculate the transformed coordinate’s one step at a time.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

106


MACHINE DRAWING & COMPUTER GRAPHICS

First coordinate positions are scaled, then these scaled coordinates are rotated, and finally the rotated coordinates are translated.

To express any two-dimensional transformation as a matrix multiplication, we represent each Cartesian coordinate position (x,y)with the homogeneous coordinate triple(xh,yh,h), where

X= xh

,

y= yh

h

h

A general homogeneous coordinate representation can also be written as (h.x,h.y,h).

The term homogeneous coordinates is used in mathematics to refer to the effect of this representation on Cartesian equations.

When a Cartesian point (x,y)is converted to a homogeneous representation (xh,yh,h),equations containing x and y , such as f(x,y)=0, become homogeneous equations in the three parameters xh,yh, and h. This just means that if each of the three parameters is replaced by any value v times that parameter; the value v can be factored out of the equations. For translation we have

P’= T(tx,ty).P

Rotation transformation equations about the coordinate origin are written as

P’=R(θ).P

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

107


MACHINE DRAWING & COMPUTER GRAPHICS

A scaling transformation relative to the coordinate origin is

P’=S(sx,sy).P

COMPOSITE TRANSFORMATIONS

With the matrix representations, we can set up a matrix for any sequence of transformations as a composite transformation matrix by calculating the matrix product of the individual transformations. Forming products of transformation matrices is often referred to as a concatenation, or composition, of matrices.

Translation If two successive translation vectors (tx1,ty1) and(tx2,ty2)are applied to a coordinate position P, the final transformed location P’ is calculated as

P’=T(tx2,ty2).{T(tx1,ty1).P} ={T(tx2,ty2).T(tx1,ty1)}.P

Where P and P’ are represented as homogeneous-coordinate column vectors.

T(tx2,ty2).T(tx1,ty1)=T(tx1+tx2,ty1+ty2)

Rotation

Two successive rotations applied to point to produce the transformed position

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

108


MACHINE DRAWING & COMPUTER GRAPHICS

P’=R(θ2).{R(θ1).P} ={R(θ2).R(θ1)}.P

By multiplying the two rotation matrices, we can verify that two successive rotations are additive:

R(θ2).R(θ1)=R(θ1+θ2)

So that the final rotated coordinates can be calculated with the composite rotation matrix as

P’=R(θ1+θ2).P

Scaling

Concatenating transformation matrices for two successive scaling operations produces the following composite scaling matrix:

Sx2 0 0

sx1 0 0

sx1.sx2 0

0 sy2 0 . 0 sy1 0 =

0 01

0 0 1

0

0 sy1.sy2 0

0

0

1

Or

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

109


MACHINE DRAWING & COMPUTER GRAPHICS

S(sx2,sy2).S(sx1,sy1)=S(sx1.sx2,sy1.sy2)

General Pivot Point Rotation

We can generate rotations about any selected pivot point (x r,yr) by performing the following sequence of translate–rotate-translate operations:

Translate the object so that the pivot-point position is moved to the coordination origin.

Rotate the object about the coordinate origin.

Translate the object so that the pivot point is returned to its original position.

T(xr,yr).R(θ).T(-xr,-yr)=R(xr,yr,θ)

The following figure shows a transformation sequence for rotating an object about a specified pivot point using the rotation matrix R of transformation.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

110


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 10 : Transformation sequence for rotating an object about a specified pivot point using the rotation matrix R of transformation

General Fixed Point Scaling

A transformation sequence to produce scaling with respect to a selected fixed position (xf,yf)using a scaling function that can only scale relative to the coordinate origin.

 Translate object so that the fixed point coincides with the coordinate origin.  Scale the object with respect to the coordinate origin.  Use the inverse translation of step1 to return the object to its original position.

T(xf,yf).S(sx,sy).T(-xf,-yf)=S(xf,yf,sx,sy) The following figure shows a transformation sequence for scaling an object with respect to a specified fixed position using the scaling matrix.

Figure 11 : Transformation sequence for scaling an object with respect to a specified fixed position using the scaling matrix

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

111


MACHINE DRAWING & COMPUTER GRAPHICS

The following figure shows how a square is converted to a parallelogram using the composite transformation matrix.

Figure 12 : A square is converted to a parallelogram using the composite transformation matrix OTHER TRANSFORMATION Basic transformations such as translation, rotation and scaling are included in most graphics packages. Some packages provide a few additional transformations that are useful in certain applications. Two such transformations are reflection and shear.

Reflection A reflection is a transformation that produces a mirror image of an object. The mirror image for a two-dimensional reflection is generated relative to an axis of reflection by rotating the 0

object180 about the reflection axis.

Reflection about the line y=0, the axis, is a accomplished with the transformation matrix

1 0 0

0 -1 0

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

112


MACHINE DRAWING & COMPUTER GRAPHICS

0 0 1

This transformation keeps x values the same, but “flips” the y values of coordinate positions.

A reflection about the y axis flips x coordinates while keeping y coordinates the same. The matrix for this transformation is

-1 0 0

0 1 0

0 0 1

We flip both the x and y coordinates of a point by reflecting relative to an axis that is perpendicular to the xy plane and that passes through the coordinate origin. This transformation, referred to as a reflection relative to the coordinate origin, has the matrix representation:

-1 0 0

0 -1 0

0 0 1

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

113


MACHINE DRAWING & COMPUTER GRAPHICS

If we choose the reflection axis as the diagonal line y=x, the reflection matrix is

0 1 0

1 0 0

0 0 1

We can derive this matrix by concatenating a sequence of rotation and coordinateaxis reflection matrices.

To obtain a transformation matrix for reflection about the diagonal y=-x, we could concatenate matrices for the transformation sequence:

0

 Clockwise rotation by 45 .  Reflection about the y-axis. 0

 Counterclockwise rotation by 45 .

The resulting transformation matrix is

0 -1 0

-1 0 0

0 0 1

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

114


MACHINE DRAWING & COMPUTER GRAPHICS

Reflection about any line y=mx+b in the xy plane can be accomplished with a combination of translate-rotate-reflect transformations. The following figure shows the reflection transformation.

Figure 13: Reflection of an object about x axis

Figure 14: Reflection of an object about y axis Shear A transformation that distorts the shape of an object such that the transformed shape appear as if the object were composed of internal layers that had been caused to slide over each other is called shear. Two common shearing transformations are those that shift coordinate x values and those that shift y values.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

115


MACHINE DRAWING & COMPUTER GRAPHICS

An x-direction shear relative to the x-axis is produced with the transformation matrix

1 shx 0

0 1

0

0 0

1

This transforms coordinate position as

X’=x+ shx, y’=y

We can generate x-direction shears relative to other reference lines with

1 shx -shx.yref

0 1

0

0 0

1

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

116


MACHINE DRAWING & COMPUTER GRAPHICS

With coordinate positions transformed as

X’=x+ shx(y- yref), y’=y

A y-direction shear relative to the line x=x ref is generated with the transformation matrix

1

0

0

Shy 1 -Shy.xref

0

0

1

This generates transformed coordinate positions X’=x, y’= Shy(x-xref)+y This transformation shifts a coordinate position vertically by an amount proportional to its distance from the reference line x=xref. The following figure shows how a unit square is transformed to a shifted parallelogram using shearing.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

117


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 15: Unit square is transformed to a shifted parallelogram using shearing

THE VIEWING PIPELINE 

A world-coordinate area selected for display is called a window. An area on a display device to which a window is mapped is called a viewport.

The window defines what is to be viewed; the viewport defines where it is to be displayed.

The mapping of a part of a world-coordinate scene to device-coordinates is referred to as a viewing transformation. Sometimes the two-dimensional viewing transformation is simply referred to as the window-to-viewport transformation or the windowing transformation.

The term window originally referred to an area of a picture that is selected for viewing. Window-manager systems to refer to any rectangular screen area that can be moved about, resized, and made active or inactive.

A two-dimensional viewing-coordinate system in the world-coordinate plane, and define a window in the viewing coordinate system.

The viewing coordinate reference frame is used to provide a method for setting up arbitrary orientations for rectangular windows.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

118


MACHINE DRAWING & COMPUTER GRAPHICS

By changing the position of the viewport, we can view objects at different positions on the display area of an output device. Panning effects are produced by moving a fixed-size window across the various objects in a scene.

Viewports are typically defined within the unit square(normalized coordinates). This provides a means for separating the viewing and other transformations from specific output-device requirements, so that the graphics package is largely device-independent. The following figure shows the two dimensional viewing transformation pipeline.

Figure 16: Two dimensional viewing transformation pipeline

VIEWING COORDINATE REFERENCE FRAME

This coordinate system provides the reference frame for specifying the worldcoordinate window. A viewing-coordinate origin is selected at some world position: P0= x0,y0

To specify a world vector V that defines the viewing yv direction. Vector V is called the view up vector. Given V, we can calculate the components of unit vectors v= vx,vy

And u= ux,uy for the viewing yv and xv axes respectively.

These unit vectors are used to form the first and second rows of the rotation matrix R that aligns the viewing xvyv axes with the world xwyw axes.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

119


MACHINE DRAWING & COMPUTER GRAPHICS

The composite two-dimensional transformation to convert world coordinates to viewing coordinates is

MWC,VC=R.T 

Where T is the translation matrix that takes the viewing origin point P0 to the world origin and R is the rotation matrix that aligns the axes of the two reference frames.

WINDOW-TO-VIEWPORT COORDINATE TRANSFORMATION

A point at position (xw,yw)in the window is mapped into position(xv,yv)in the associated viewport.

xv-xvmin

xw-xwmin

= xvmax-xvmin

yv-yvmin

xwmax-xwmin

yw-ywmin

= yvmax-yvmin

ywmax-ywmin

Solving these expressions for the viewport position (xv,yv),we have

xv=xvmin+(xw-xwmin)sx

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

120


MACHINE DRAWING & COMPUTER GRAPHICS

121

yv=yvmin+(yw-ywmin)sy

where the scaling factors are

xvmax-xvmin sx = xwmax-xwmin

yvmax-yvmin sy = ywmax-ywmin

A set of transformations that converts the window area into the view port area.

Perform

a

scaling

transformation

using

a

fixed-point

position

of

(xwmin,ywmin)that scales the window area to the size of the viewport. 

Translate the scaled window area to the position of the viewport.

Any number of output devices can be open in a particular application, and another window-to-viewport transformation can be performed for each open output device. This mapping, called the workstation transformation is accomplished by selecting a window area in normalized space and viewport area in the coordinates of the display device.

CLIPPING OPERATIONS

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

A picture that are either inside or outside of a specified region of space is referred to as a clipping algorithm or clipping.

The region against which an object is clipped is called a clip window.

Types of Clipping o

Point clipping

o

Line clipping(straight-line segments)

o

Area clipping(polygons)

o

Curve clipping

o

Text clipping

POINT CLIPPING The clip window is a rectangle in standard position,we save a point P=(x,y)for display if the following inequalities are satisfied:

Xwmin≤ x≤ xwmax

ywmin≤ y≤ ywmax

where the edges of the clip window(xwmin,xwmax,ywmin,ywmax)can be either the worldcoordinate window boundaries or viewport boundaries. Point clipping can be applied to scenes involving explosions or sea foam that are modeled with particles (points) distributed in some region of the scene. LINE CLIPPING A line with both endpoints inside all clipping boundaries, such as the line from P1 to P2, is saved. A line with both endpoints outside any one of the clip boundaries is outside the window. All other lines cross one or more clipping boundaries, and may require calculation of multiple intersection points. For a line segment with endpoints(x 1,y1)and(x2,y2)and one or both endpoints outside the clipping rectangle, the parametric representation

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

122


MACHINE DRAWING & COMPUTER GRAPHICS

X=x1+u(x2-x1)

y=y1+u(y2-y1), 0≤ u≤ 1

If the value of u for an intersection with a rectangle boundary edge is outside the range 0 to 1 , the lines does not enter the interior of the window at that boundary.

If the value of u is with in the range from 0 to 1, the line segment does indeed cross into the clipping area. Cohen-Sutherland Line Clipping Every line endpoint in a picture is assigned a four-digit binary code, called region code that identifies the location of the point relative to the boundaries of the clipping rectangle. Each bit position in the region code is used to indicate one of the four relative coordinate positions of the point with respect to the clip window: to the left, right, top or bottom. Bit 1 : Left Bit 2 : Right Bit 3 : Below Bit 4 : Above A value of 1 in any bit position indicates that the point is in that relative position; otherwise, the bit position is set to 0. If a point is within the clipping rectangle, the region code is 0000. Region-code bit values can be determined with the following two steps: o

Calculate differences between endpoint coordinates and clipping boundaries.

o

Use the resultant sign bit of each difference calculation to set the corresponding value in the region code.

Bit 1 : sign bit of x-xwmin

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

123


MACHINE DRAWING & COMPUTER GRAPHICS

Bit 2 : sign bit of xwmax-x Bit 3 : sign bit of y-ywmin Bit 4 : sign bit of ywmax-y A method that can be used to test lines for total clipping is to perform the logical and operation with both region codes. If the result is not 0000, the line is completely outside the clipping region. A line with endpoint coordinates(x1,y1) and (x2,y2), the y coordinate of the intersection point with a vertical boundary can be obtained with the calculation. Y = y1 + m(x - x1) Where, m=(y2 - y1) / (x2 – x1) Similarly for the intersection with a horizontal boundary, the x coordinate can be calculated as, X = x1 + (y - y1) / m

Liang-Barsky Line Clipping

The parametric equation of a line segment is of the form, X = x1 + u∆ x Y = y1 + u∆ y,

0≤ u≤ 1

Where, ∆ x = x2 – x1 ∆ y = y2 – y1. The point clipping parametric equations in Liang-Barsky is of the form, Xwmin ≤ x1 + u∆x ≤ xwmax Ywmin ≤ y1 + u∆ y ≤ ywmax

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

124


MACHINE DRAWING & COMPUTER GRAPHICS

Each of these four inequalities can be expressed as

Upk ≤ qk ,

k=1,2,3,4

Where parameters p and q are defined as, P1 = -∆x,

q1 = x1 - xwmin

P2 = ∆x,

q2 = xwmax – x1

P3 = -∆y,

q3 = y1 - ywmin

P4 = ∆y,

q4 = ywmax – y1

The two conditions are qk < 0,

line lies completely outside the boundary

qk

line lies inside the boundary.

0,

pk < 0, line proceeds from outside to inside boundary pk

0, line proceeds from inside to outside boundary.

For a nonzero value of pk , we can calculate the value of u that corresponds to the point where the infinitely extended line intersects the extension of boundary k as,

U = qk / pk

The following figure shows line clipping against a rectangular clip window.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

125


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 17: line clipping against a rectangular clip window.

POLYGON CLIPPING

o

A polygon boundary processed with a line clipper may be displayed as a series of unconnected line segments, depending on the orientation of the polygon to the clipping window.

o

Polygon clipping requires an algorithm that will generate one or more closed areas that are then scan converted for the appropriate area fill. The output of a polygon clipper should be a sequence of vertices that defines the clipped polygon boundaries.

Sutherland-Hodgeman Polygon Clipping

We can correctly clip a polygon by processing the polygon boundary as a whole against each window edge. This could be accomplished by processing all polygon vertices against each clip rectangle boundary. The four possible cases when processing vertices in sequence around the perimeter of a polygon are: If the first vertex is outside the window boundary and the second vertex is inside, both the intersection point of the polygon edge and the second vertex are added to the output vertex list.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

126


MACHINE DRAWING & COMPUTER GRAPHICS

If both input vertices are inside the window boundary, only the second vertex is added to the output vertex list. If the first vertex is inside and second vertex is outside only the intersection is added to output list. If both the input vertices are outside, nothing is added to the output list.

Weiler-Atherton Polygon Clipping

This clipping procedure was developed as a method for identifying visible surfaces, and so it can be applied with arbitrary polygon-clipping regions. The basic idea in this algorithm is that instead of always proceeding around the polygon edges as vertices are processed, we sometimes want to follow the window boundaries. For clockwise processing of polygon vertices, the following rules are applied: For an outside-to-inside pair of vertices, follow the polygon boundary. For an inside-to-outside pair of vertices, follow the window boundary in a clockwise direction. The following figure shows polygon clipping.

Figure 18: Polygon Clipping CURVE CLIPPING 

Curve clipping procedures will involve nonlinear equations and requires more processing than for objects with linear boundaries.

The bounding rectangle for a circle or other curved object can be used to test for overlap with a rectangular clip window.

If the bounding rectangle for the object is completely inside the window, we save the object. If the rectangle is determined to be completely outside the window, we discard

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

127


MACHINE DRAWING & COMPUTER GRAPHICS

the object. If either case fails for circle we test coordinate extends of individual coordinates.

TEXT CLIPPING

This clipping technique will involve characters. If all the string is inside a clip window we keep it otherwise we discard it. It is called all-or-none stringclipping.

An entire character string that overlaps a boundary is to use the all-or-none character-clipping.

A final method for text clipping is to clip the components of individual characters.

If an individual character overlaps a clip window boundary, clip off the parts of the character that are outside the window. The following figure shows the process of text clipping.

Figure 19: Text Clipping

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

128


MACHINE DRAWING & COMPUTER GRAPHICS

EXTERIOR CLIPPING

If we want to clip a picture to the exterior of a specified region, the picture parts to be saved are those that are outside the region. This is referred to as exterior clipping. A typical example of the application of exterior clipping is in multiple-window systems.

Exterior clipping is also used in other applications that require overlapping pictures.

This technique can also be used for combining graphs, maps or schematics.

Procedures for clipping objects to the interior of concave polygon windows can also make use of external clipping.

SUMMARY

The basic geometric transformations are translation, rotation and scaling. Other transformations include reflection and shear. Transformations between Cartesian coordinate systems are accomplished with a sequence of translate-rotate transformations. The viewing transformation pipeline includes constructing the world coordinate scene using modeling transformations, transferring world coordinates to viewing coordinates, mapping the viewing coordinate descriptions of objects to normalized device coordinates and finally mapping to device coordinates. Line clipping, polygon clipping, curve clipping, exterior clipping and text clipping are also discussed.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

129


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT-VIII THREE-DIMENSIONAL CONCEPTS INTRODUCTION Graphics packages often provide routines for displaying internal components or cross sectional views of solid objects. Some geometric transformations are more involved in three-dimensional space than in two dimensions. Two-dimensional rotations are always around an axis that is perpendicular to the xy plane. Viewing transformations in three dimensions are much more complicated because we have many more parameters to select when specifying how a three-dimensional scene is to be mapped to a display device. Methods for geometric transformations and object modeling in three dimensions are extended from two-dimensional methods by including the z coordinate. OBJECTIVES

At the end of this unit, you should be able to 

Understand the three dimensional display methods

Know the three dimensional transformations namely translation, rotation, scaling, reflection and shear

Familiar with the viewing pipeline and viewing coordinates

Have a thorough study about clipping and projections

THREE DIMENSIONAL DISPLAY METHODS

To obtain a display of a three dimensional scene that has been modeled in world coordinates, we must first set up a coordinate reference for the camera.

This co-ordinate reference defines the position and orientation for the plane of the camera film.

Object descriptions are then transferred to the camera reference coordinates and projected onto the selected display plane.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

130


MACHINE DRAWING & COMPUTER GRAPHICS

Parallel projection

One method for generating a view of a solid object is to project points on the object surface along parallel lines onto the display plane.

In a parallel projection, parallel lines in the world-coordinate scene project into parallel projection on the two dimensional display plane.

This technique is used in engineering and architectural drawings to represent an object with a set of views.

Perspective projection

Another method for generating a view of a three-dimensional scene id to project points to the display plane along converting paths.

In a prospective projection, parallel lines in a scene that are not parallel to the display plane are projected into converging lines.

Scenes displayed using perspective projections appear more realistic.

Parallel lines appear to converge to a distant point in the background, and distant objects appear smaller than closer to the viewing position.

Depth Cueing 

Depth information is important so that we can easily identify, for a particular viewing direction, which direction, which is the front and which is the back of displayed objects.

A simple method for generating depth with wire frame displays is to vary the intensity of objects according to their distance from the viewing position.

The lines closest to the viewing position are displayed with the highest intensities, and lines farther away are displayed with decreasing intensities.

Another application of depth cueing is modeling the effect of the atmosphere on the perceived intensity of objects.

Visible Line and Surface Identification 

Clarify depth relationships in a wire frame display.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

131


MACHINE DRAWING & COMPUTER GRAPHICS

The simplest method is to highlight the visible lines or to display them in a different color.

Another technique, commonly used for engineering drawings, is to display the no visible lines as dashed lines.

Another approach is to simply remove the no visible lines.

Some visible-surface algorithms establish visibility pixel by pixel across the viewing plane; other algorithms determine for object surfaces as a whole.

Surface Rendering 

Surface properties of objects include degree of transparency and how rough or smooth the surfaces are to be.

Procedures can then be applied to generate the correct illumination and shadow regions for the scene.

Surface-rendering methods are combined with perspective and visible-surface identification to generate a degree of realism in a displayed scene.

Exploded and Cutaway Views 

Exploded and cutaway views of such objects can then be used to show the internal structure and relationship of the object parts.

An alternative to exploding an object into its component parts is the cutaway view, which removes part of the visible surfaces to show internal structure.

Three Dimensional and Stereoscopic Views 

Another method for adding a sense of realism to a computer-generated scene is to display objects using either three-dimensional or stereoscopic views.

Stereoscopic devices present two views of a scene. 

One for the left eye.

Other for the right eye.

The two views are generated by selecting viewing positions that correspond to the two eye positions of a single viewer.

THREE-DIMENSIONAL GEOMETRIC AND MODELING TRANSFORMATION

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

132


MACHINE DRAWING & COMPUTER GRAPHICS

 Methods for geometric transformations and object modeling in three dimensions are extended from two-dimensional methods by including considerations for the z coordinate.

Translation 

In a three-dimensional homogeneous coordinate representation, a point is translated from position P=(x,y,z) to position P’=(x’,y’,z’)with the matrix operation

x’

1 0 0 tx

x

y’ = 0 1 0 ty . y z’

0 0 1 tz

z

1

0001

1

P’=T+P

Parameters tx, ty, tz specifying translation distances for the coordinate directions x,y,z are assigned any real values.

The matrix representation in Eq.1 is equivalent to the three equations

x’= x + tx;

y’= y + ty;

z’= z + tz;

An object is translated in three dimensions by transforming each of the defining points of the object.

Rotation 

To generate a rotation transformation for an object we must designate an axis of rotation (about which the object is to be rotated) and the amount of angular rotation.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

133


MACHINE DRAWING & COMPUTER GRAPHICS

The easiest rotation axes to handle are those that are parallel to the coordinate axes.

Positive rotation angles produce counterclockwise rotations about a coordinate axis.

Coordinate-Axes Rotations

The two dimensional z-axis rotation equations are easily extended to three dimensions:

x’=xcos a - ysin a y’=xsin a + ycos a z’=z Parameter a specifies the rotation angle. 

We get equations for an x-axis rotation:

y’=ycos a – zsin a z’=ysin a + zcos a x’=x

x’

which can be written in the homogeneous coordinate form

1 0

0

0

x

y’ = 0 cos a –sin a 0 . y z’

0 sin a cos a 0

1

0 0

0

1

z 1

P’=Rx (a).P

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

134


MACHINE DRAWING & COMPUTER GRAPHICS

The transformation equation for a y-axis rotation:

z’= zcos a – xsin a x’= zsin a + xcos a y’=y

The matrix representation for y-axis rotation is

x’

cos a 0 sin a 0

y’ = z’ 1

0

1

0

x

0 .y

-sin a 0 cos a 0 0

0

0

1

z 1

P’=Ry (a).P

General Three-Dimensional Rotations

In the special case where an object is to be rotated about an axis that is parallel to one of the coordinate axes, we can attain the desired rotation with the following transformation sequence.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

135


MACHINE DRAWING & COMPUTER GRAPHICS

136

1. Translate the object so that the rotation axis coincides with the parallel coordinate axis. 2. Perform the specified rotation about axis. 3. Translate the object so that the rotation axis is moved back to its original position.

When an object is to be rotated about an axis that is not parallel to one of the coordinate axis, we need to perform some additional transformations.

Given the specifications for the rotation axis and the rotation angle, we can accomplish the required rotation in five steps. 1. Translate the object so that rotation axis passes through the coordinate origin. 2. Rotate the object so that the axis of rotation coincides with one of the coordinate axis. 3. Perform the specified rotation about that coordinate axis. 4. Apply inverse rotation to bring the rotation axis back to its original orientation. 5. Apply the inverse translation to bring the rotation axis back to its original position.

Scaling

The matrix expression for the scaling transformation of a position P=(x,y,z)relative to the coordinate origin can be written as

x’ y’ =

Sx 0 0 0

x

0 Sy 0 0 . y

z’

0 0 Sz 0

z

1

0 0 0 1

1

(1)

P’=S.P 

Where scaling parameters Sx,Sy and Sz are assigned any positive values.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Explicit expressions for the coordinate transformations for scaling relative to the origin are

x’=x.Sx y’=y.Sy

z’=z.Sz

Scaling an object with transformation (1) changes the size of the object and repositions the object relative to the coordinate origin.

We preserve the original shape of an object with a uniform scaling (Sx=Sy=Sz).

Scaling with respect to a selected fixed position (Xf,Yf,Zf) can be represented with the following transformation sequence:

1. Translate the fixed point to the origin. 2. Scale the object relative to the coordinate origin using Eq.(1). 3. Translate the fixed point back to its original position.

Sx 0 0 (1-Sx)Xf 0 Sy 0 (1-Sy)Yf T(Xf,Yf,Zf).S(Sx,Sy,Sz).T(-xf,-Yf,-Zf)= 0 0 0

0 0 Sy (1-Sz)Zf

1

(2) 

We form the inverse scaling matrix for either Eq.(1) or Eq.(2) by placing the scaling parameters Sx,Sy and Sz with their reciprocals.

The inverse matrix generates an opposite scaling transformation, so the concatenation of any scaling matrix and its inverse produces the identity matrix. The following figure shows the process of scaling an object relative to a selected fixed point which is equivalent to the sequence of transformations.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

137


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 20: Scaling an object relative to a selected fixed point

OTHER TRANSFORMATION

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

138


MACHINE DRAWING & COMPUTER GRAPHICS

In addition to translation, rotation and scaling, there are various additional transformations that are often useful in three dimensional graphics applications namely reflection and shear.

Reflection

 A three dimensional reflection can be performed relative to a selected reflection axis or with respect to a selected reflection plane.  Reflections relative to a given axis are equivalent to 180 degree rotations about that axis.  Reflections with respect to a plane are equivalent to 180 degree rotations in fourdimensional space.  This transformation changes the sign of the z coordinates, leaving the x and ycoordinate values unchanged.  The matrix representation for this reflection of points relative to the xy plane is

1 0 0 0 RFz= 0 1 0 0 0 0 -1 0 0 0 0 1

Shear

Shearing transformations can be used to modify object shapes.

They are also useful in two dimensional viewing for obtaining general projection transformations.

In three dimensions, we can also generate shears relative to the z-axis.

An example of three-dimensional shearing ,the following transformation produces a zaxis shear:

1 0 a 0

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

139


MACHINE DRAWING & COMPUTER GRAPHICS

SHz= 0 1 b 0 0 0 1 0 0 0 0 1

Parameters a and b can be assigned any real values.

The effect of this transformation matrix is to alter x-and y-coordinate values by an amount that is proportional to the z value, while leaving the z coordinate unchanged. The following figure shows how a unit cube is sheared by transformation matrix with a = 1 and b = 1.

Figure 21: unit cube is sheared by transformation matrix with a = 1 and b = 1

COMPOSITE TRANSFORMATIONS

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

140


MACHINE DRAWING & COMPUTER GRAPHICS

 We form a composite three-dimensional transformation by multiplying the matrix representations for the individual operations in the transformation sequence.  This concatenation is carried out from right to left, where the rightmost matrix is the first transformation to be applied to an object and the leftmost matrix is the last transformation.  A sequence of basic, three-dimensional geometric transformations is combined to produce a single composite transformation, which is then applied to the coordinate definition of an object.

VIEWING PIPELINE The steps for computer generation of a view of a three-dimensional scene are analogous to the processes involved in taking a photograph. To take a snapshot, we first need to position the camera at a particular point in space. Then we need to decide on the camera orientation. When we snap the shutter, the scene is cropped to the size of the window of the camera and light from the visible surface s is projected onto the camera film. Once the scene has been modeled, world coordinate positions are converted to viewing coordinates. Next, projection operations are performed to convert the viewing coordinate description of the scene to coordinate positions on the projection plane, which will then be mapped to the output device. Objects outside the specified viewing limits are clipped from further consideration and the remaining objects are processed through visible surface identification and surface rendering procedures to produce the display within the device viewport. The following figure shows the general three dimensional transformation pipeline from modeling coordinates to final device coordinates.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

141


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 22: General three dimensional transformation pipeline from modeling coordinates to final device coordinates.

VIEWING COORDINATES Generating a view of an object in three dimensions is similar to photographing the object. We can walk around and take its picture from any angle, at various distances and with varying camera orientations. The type and size of the camera lens determines which parts of the scene appear in the final picture. Specifying the View Plane We choose a particular view for a scene by first establishing the viewing coordinate system also called the view reference coordinate system. A view plane or projection plane is then set up perpendicular to the viewing zv axis. World coordinate positions in the scene are transformed to viewing coordinates, and then viewing coordinates are projected onto the view plane. To establish the viewing coordinate reference frame, we first pick a world coordinate position called the view reference point. This point is the origin of the viewing coordinate system. The view reference point is often chosen to be close to or on the surface of some object in a scene. Next, we select the positive direction for the viewing zv axis, and the orientation of the view plane, by specifying the view plane normal vector N. N is simply specified as a world coordinate vector. We choose the up direction for the view by specifying a vector V, called the view up vector. This vector is used to establish the positive direction for the yv axis. Vector V also be defined as a world coordinate vector or in some packages it is specified with a twist angle about the zv axis. Using vectors N and V, the graphics package can compute a third vector U, perpendicular to both N and V to define the direction for the xv axis. Then the direction of V can be adjusted so that it is perpendicular to both N and U to establish the viewing y v direction. The view plane is always parallel to the x vyv plane and the projections of objects to the view plane correspond to the view of the scene that will be displayed on the output device. PROJECTION Once world coordinate descriptions of the objects in a scene are converted to viewing coordinates, we can project the three dimensional objects onto the two dimensional view plane. There are two basic projection methods. In a parallel projection, coordinate positions are transformed to the view plane along parallel lines. For a perspective projection object positions are transformed to the view plane along lines that converge to a point called the

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

142


MACHINE DRAWING & COMPUTER GRAPHICS

143

projection reference point or center of projection. The projected view of an object is determined by calculating the intersection of the projection lines with the view plane. A Parallel projection preserves relative proportions of objects and this is the method used in drafting to produce scale drawings of three-dimensional objects. Parallel Projection We can specify a parallel projection with a projection vector that defines the direction for the projection lines. When the projection is perpendicular to the view plane, we have an orthographic parallel projection. Otherwise, we have an oblique parallel projection. Orthographic projections are most often used to produce the front, side and top views of an object. Front, side and rear orthographic projections of an object are called elevations and a top orthographic projection is called a plan view. Engineering and architectural drawings are commonly employing these orthographic projections.

We can also form orthographic

projections that display more than one face of an object. Such views are called axonometric orthographic projections. The most commonly use axonometric projection is the isometric projection. We generate an isometric projection by aligning the projection plane so that it intersects each coordinate axis in which the object is defined called the principal axes at the same distance from the origin. The following figure shows the parallel projection of an object to the view plane.

Figure 23: Parallel projection of an object to the view plane. Perspective Projection To obtain a perspective projection of a three dimensional object, we transform points along projection lines that meet at the projection reference point. We can write equations describing coordinate positions along this perspective projection line in parametric form as X’ = x – xu

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Y’ = y – yu Z’ = z – (z – zprp)u

Parameter u takes values from 0 to 1, and coordinate position (x’,y’,z’) represents any point along the projection line. When a three-dimensional object is projected onto a view plane using perspective transformation equations, any set of parallel lines in the object that are not parallel to the plane are projected into converging lines. Parallel lines that are parallel to the view plane will be projected as parallel lines. The point at which a set of projected parallel lines appears to converge is called a vanishing point. The vanishing point for any set of lines that are parallel to one of the principal axes of an object is referred to as a principal vanishing point. The number of principal vanishing points in a projection is determined by the number of principal axes intersecting the view plane. The following figure shows the perspective projection of equal sized objects at different distances form the view plane.

Figure 24: Parallel projection of an object to the view plane. The following figure shows the isometric projection of a cube. The isometric projection is obtained by aligning the projection vector with the cube diagonal.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

144


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 25: Isometric projection of a cube.

The following figure shows the orthographic projection of a point onto a viewing plane.

Figure 26: Orthographic Projection of a point onto a viewing plane.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

145


MACHINE DRAWING & COMPUTER GRAPHICS

Figure 27: Oblique Projection of coordinate position (x,y,z)

CLIPPING To clip a line segment against the view volume, we would need to test the relative position of the line using the view volume’s boundary plane equations. By substituting the line endpoint coordinates into the plane equation of each boundary in turn, we could determine whether the endpoint is inside or outside that boundary. Lines with both endpoints outside boundary plane are discarded, and those with both endpoints inside all boundary planes are saved. To clip a polygon surface, we can clip the individual polygon edges First, we could test the coordinate extends against each boundary of the view volume to determine whether the object is completely inside or completely outside that boundary. If the coordinate extents of the object are inside all boundaries, we save it. If the coordinate extends are outside all boundaries, we discard it. Clipping in two dimensions is generally performed against an upright rectangle; that is, the clip window is aligned with the x and y axes.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

146


MACHINE DRAWING & COMPUTER GRAPHICS

Normalized View Volumes

At the first step, a scene is constructed by transforming object descriptions from modeling coordinates to world coordinates. A view mapping converts the world descriptions to viewing coordinates. At the projection stage, the viewing coordinates are transformed to projection coordinated, which effectively converts the view volume into a rectangular parallelepiped. Then, the parallelepiped is mapped into the unit cube, a normalized view volume called the normalized projection coordinate system. The mapping to normalized projection coordinates is accomplished by transforming points within the rectangular parallelepiped into position within a specified three- dimensional view port, which occupies part or the entire unit cube. Normalized projection coordinates are converted to device coordinates for display. The normalized view volume is a region defined by the planes x = 0, x = 1, y = 0, y = 1, z = 0, z = 1

First, the normalized view volume provides a standard shape for representing any sized view volume. The unit cube then can be mapped to a workstation considerations of any size clipping procedures are simplified and standardized with unit clipping planes or the viewport planes, and additional clipping planes can be specified within the normalized space before transforming to device coordinates. Depth cueing and visible- surface determination are simplified, since the z axis always points toward the viewer. The following figure shows the expanded transformation pipeline.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

147


MACHINE DRAWING & COMPUTER GRAPHICS

148

Figure 28: Expanded Transformation Pipeline

Mapping positions within a rectangular view volume to a three – dimension rectangular viewport is accomplished with a combination of scaling and translation, similar to the operations needed for a two- dimensional window – to –viewport mapping. We can express the three- dimensional transformation matrix for these operations in the form Dx

0

0

Kx

0

Dy

0

Ky

0

0

Dz

Kz

0

0

0

1

Factors Dx1 Dy1 and Dz are the ratios of the dimensions of the viewport and regular parallelepiped view volume in the x,y, and z directions.

Dx

xvmax xv min xwmax xwmin

Dx

yvmax  yvmin

FOR MORE DETAILS VISIT U ONyw WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621 max  ywmin

Dx

zvmax zvmin zwbackzw front


MACHINE DRAWING & COMPUTER GRAPHICS

Where the view – volume boundaries are established by the window limits (xw max,

149

min,

xw

ywmin, ywmax) and the positions zfront and zback of the front back planes. Viewport bundaries

are set with the coordinate values xvmin, xvmax, yvmin, yvmax, zvmin, zvmax. The additive translation factors Kx, Ky and Kz in the transformation are Kx = xvmin – xw min Dx Ky = yvmin – yw min Dy Kz = zvmin – z front Dz

Figure 29: Dimensions of the view volume and three dimensional viewport

View port clipping Lines and polygon surfaces in a scene can be clipped against the viewport boundaries. The two-dimensional concept of region codes can be extended to three dimensions by considering positions in front and in back of the three –dimensional viewport, as well as positions that are left, right, below, or above the volume. For three – dimensional points, we need to expend the region code to six bits. Each point in the description of a scene is then assigned a six-bit region code that identifies the relative position of the point with

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

150

respect to the viewport. For a line endpoint at position (x,y,z) we assign the bit positions in the region code from right to left as

bit 1  1, if x  xvmin (left )

bit 2  1, if x  xvmax (right ) bit 3  1, if y  yvmin (below)

bit 4  1, if y  yvmax (above) bit 5  1, if z  zvmin ( front )

bit 6  1, if z  zvmax (back ) A line segment can be immediately identified a completely within the viewport if both endpoints have a region code of 000000. If either endpoint of a line segment does not have a region code of 000000, we perform the logical and operation on the two endpoint codes. The result of this and operation will be nonzero for any line segment that has both endpoints in one of the six outside regions. A nonzero value will be generated if both endpoints are behind the viewport, or both endpoints are above the viewport. The two dimensional parametric clipping methods of Cyrus –Beck or Liang-Barsky can be extended to three-dimensional scenes. For a line segment with endpoints P 1 = (x1, y1, z1) and P2 = (x2,y2,z2), we can write the parametric line equations as

x  x1  ( x2  x1 )u,

0  u 1

y  y1  ( y 2  y1 )u z  z1  ( z 2  z1 )u Coordinates (x,y,z) represent any point on the line between the two endpoints. At u= 0, we have the point P1, and u = 1 puts us at P2.

SUMMARY

Three dimensional transformations useful in computer graphics applications include geometric transformations within a single coordinate system and transformations between different coordinate systems. The basic geometric transformations are translation, rotation

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

and scaling. Two additional object transformations are reflections and shears. Viewing procedures for three dimensional scenes follow the general approach used in two dimensional viewing. Three dimensional viewing requires projection routines to transform object descriptions to a viewing plane before the transformation to device coordinates. Parallel projections are either orthographic or oblique and can be specified with a projection vector. Objects in three dimensional scenes are clipped against a view volume. The top, bottom, and sides of the view volume are formed with planes that are parallel to the projection lines and that pass through the view plane window edges.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

151


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT-IX GRAPHICAL USER INTERFACES AND INTERACTIVE INPUT METHODS

INTRODUCTION The human computer interface for most systems involves extensive graphics, regardless of the application. In this unit we take a look at the basic elements of graphical user interfaces. A variety of input devices exists and general graphics packages can be designed to interface with various devices and to provide extensive dialogue capabilities. A major consideration in the generation of realistic graphics displays is identifying those parts of a scene that are visible from a chosen viewing position. Numerous algorithms are devised for efficient identification of visible objects for different types of applications. These algorithms are referred to as visible surface detection methods. Realistic displays of a scene are obtained by generating perspective projections of objects and by applying natural lighting effects to the visible surfaces. An illumination model or a lighting model or a shading model is used to calculate the intensity of light that we could see at a given point on the surface of an object.

OBJECTIVES At the end of this unit, you should be able to 

Know the graphical user interfaces and the interactive input methods

Familiar with the various visible surface detection methods

Have a thorough study about the basic illumination models

Study the various color models and color applications.

THE USER DIALOGUE 

The user’s model serves as the basis for the design of the dialogue.

The user’s model describes what the system is designed to accomplish and what graphics operations are available.

It states the type of objects that can be displayed and how the objects can be manipulated.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

152


MACHINE DRAWING & COMPUTER GRAPHICS

All information in the user dialogue is then presented in the language of the application.

Windows and icons 

Visual representations are used both for objects to be manipulated in an application and for the actions to be performed on the application objects.

A window system provides a window-manager interface for the user and functions for handling the display and manipulation of the windows.

Common functions for the window system are opening and closing windows, repositioning windows, resizing windows and display routines that provide interior and exterior clipping and other graphics functions.

Normally windows are displayed with sliders, buttons, and menu icons fro selecting various window options.

Icons representing actions such as rotate, magnify, scale, clip and paste are called control icons or command icons.

Accommodating Multiple Skill Levels 

Usually interactive graphical interfaces provide several methods for selecting actions.

For example options could be selected by pointing at an icon and clicking different mouse buttons or by accessing pull-down or pop-up menus or by typing keyboard commands.

This allows a package to accommodate users that have different skill levels.

For a less experienced user, an interface with a few easily understood operations and detailed prompting is more effective than one with a large, comprehensive operation set.

A simplified set of menus and options is easy to learn and remember and the user can concentrate on the application instead on the details of the interface. Experienced users typically want speed. This means fewer prompts and more input from the keyboard or with multiple mouse button clicks.

Help facilities can be designed on several levels so that beginners can carry on a detailed dialogue, while more experienced users can reduce or eliminate prompts and messages.

Consistency 

An important design consideration in an interface is consistency.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

153


MACHINE DRAWING & COMPUTER GRAPHICS

A complicated, inconsistent model is difficult for a user to understand and to work with in an effective way.

The objects and operations provided should be designed to form a minimum and consistent set so that the system is easy to learn, but not oversimplified to the point where it is difficult to apply.

Other examples of consistency are always placing menus in the same relative positions so that a user does not have to hunt for a particular option, always using a particular combination of keyboard keys for the same action.

Minimizing Memorization 

Operations in an interface should also be structured so that they are easy to understand and to remember.

Complicated, inconsistent and abbreviated common formats lead to confusion and reduction in the effectiveness of the use of the package.

Icons are used to reduce memorizing by displaying easily recognizable shapes for various objects and actions.

Backup and Error Handling 

A mechanism for backing up or aborting, during a sequence of operations is another common feature of an interface.

Backup can be provided in many forms. A standard undo key or command is used to cancel a single operation. A system can be backed up through several operations, allowing us to reset the system to some specified point.

Error messages are designed to help determine the cause of error. Interfaces attempt to minimize error possibilities by anticipating certain actions that could lead to an error.

Feedback 

As each input is received, the system normally provides some type of response.

An object is highlighted, an icon appears, or a message is displayed.

If processing cannot be completed within a few seconds, several feedback messages might be displayed to keep us informed of the progress of the system.

With function keys, feedback can be given as an audible click or by lighting up the key that has been pressed. Other feedback methods include highlighting, blinking and color changes.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

154


MACHINE DRAWING & COMPUTER GRAPHICS

Audio feedback has the advantage that it does not use up screen space and we do not need to take attention from the work area to receive the message.

INPUT OF GRAPHICAL DATA Logical Classification of Input Devices LOCATOR is a device for specifying a coordinate position(x,y). STROKE is a device for specifying a series of coordinate positions. STRING is a device for specifying text input. VALUATOR is a device for specifying scalar values. CHOICE is a device for selecting menu options. PICK is a device for selecting picture components. Locator Devices 

A standard method for interactive selection of a coordinate point is by positioning the screen cursor.

When the screen cursor is at the desired location, a button is activated to store the coordinates of that screen point.

Keyboards can be used for locator input in several ways. Keyboard has four controlcursor keys that move the screen cursor up, down, left and right.

Stroke Devices 

Stroke-device input is equivalent to multiple calls to a locator device.

The set of input points is often used to display line sections.

The graphics tablet is one of the more common stroke devices.

String Devices 

The primary physical device used for string input is the keyboard.

Input character strings are typically used for picture or graph labels.

Other physical devices can be used for generating character patterns in a text writing mode.

A pattern recognition program then interprets the characters using a stored dictionary of predefined patterns.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

155


MACHINE DRAWING & COMPUTER GRAPHICS

Valuator Devices 

This logical class of devices is employed in graphics systems to input scalar values.

It is used for setting graphics parameters, such as rotation, angle and scale factors setting physical parameters associated with a particular application.

Any keyboard with a set of numeric keys can be used as a valuator device.

Choice Devices 

A choice device is defined as one that enters a selection from a list of alternatives.

Choice devices are a set of buttons; a cursor positioning device, such as a mouse, trackball, or keyboard cursor keys; and a touch panel.

Alternate methods for choice input include keyboard and voice entry.

A standard keyboard can be used to type in commands or menu options.

Pick Devices 

Pick devices are used to select parts of a scene that are to be transformed or edited in some way.

With a mouse or joystick, we can position the cursor over the primitives in a displayed structure and press the selection button.

The position of the cursor is then recorded, and several levels of search may be necessary to locate the particular object that is to be selected.

INPUT FUNCTIONS Graphics input functions can set up to allow users to specify the following options. (i)Which physical devices are to provide input within a particular logical classification? (ii)How the graphics program and devices are to interact? (iii)When the data are to be input and which device is to be used at that time to deliver a particular input type to the specified data variables?

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

156


MACHINE DRAWING & COMPUTER GRAPHICS

Input Modes

Input modes specify how the program and input devices interact. There are three types of modes.

Request mode

Sample mode

Event mode

In request mode, the application program initiates data entry. In sample mode, the application program and input devices operate independently. In event mode, the input devices initiate data input to the application program.

The general form is, SetMode (ws, deviceCode, inputMode, echoFlag) Where devicecode is a positive integer; inputMode is assigned one of the values request, sample, event and parameter echoFlag is assigned either the value echo or noecho.

Request Mode

When an input in request mode, other processing is suspended until the input is received. The general form is, request (ws, deviceCode, status)

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

157


MACHINE DRAWING & COMPUTER GRAPHICS

Returned values are assigned to parameter status and to the data parameters corresponding to the requested logical class. Locator and Stroke Input in Request Mode

The general form is, Requestlocator (ws,devCode,status,viewindex,pt) requeststroke(ws,devCode,nmax,status,viewindex,n,pts)

String Input in Request Mode

The general form is, requeststring (ws,devCode,status,nChars,str) Parameter str in this function is assigned an input string.

Valuator Input in Request Mode

The general form is, requestvaluator(ws, devCode, status, value) Choice Input in Request Mode

We make menu selection with the following request function: RequestChoice(ws,devCode, status, itemNum) Pick Input in Request Mode

For this mode, we obtain a structure identifier number with the function

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

158


MACHINE DRAWING & COMPUTER GRAPHICS

RequestPick(ws, devCode, maxPathDepth, status, pathDepth, pickPath) Sample Mode

Once sample mode has been set for one or more physical devices, data input begins without waiting for program direction. The general form is, Sample(ws, deviceCode)

Event Mode When an input device is placed in event mode, the program and device operate simultaneously. The general form is, awaitEvent (time, ws, deviceClass, deviceCode)

INTERACTIVE PICTURE CONSTRUCTION TECHNIQUES Basic positioning Methods

Coordinate values supplied by locator input are often used with positioning methods to specify a location for displaying an object or a character string. Constraints A constraint is a rule for altering input-coordinate values to produce a specified orientation or alignment of the displayed coordinates. The common constraint is horizontal or vertical alignment of straight lines. Grids Another kind of constraint is a grid of rectangular lines displayed in some part of the screen area.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

159


MACHINE DRAWING & COMPUTER GRAPHICS

When a grid is used, any input coordinate position is rounded to the nearest intersection of two grid lines. Gravity Field Any selected position within the gravity field of a line is moved to the nearest position on the line. Areas around the endpoints are enlarged to make it easier for us to connect lines at their endpoints. Rubber-Band Methods Straight line can be constructed and positioned using rubber-band methods, which stretch a line from a starting position as the screen cursor is moved. Rubber band methods are used to construct and position other objects besides straight lines. Dragging

This technique is often used in interactive picture construction to move objects into position by dragging them with the screen cursor. Dragging objects to various positions in a scene is useful in applications where we might want to explore different possibilities before selecting a final location.

Painting and Drawing

Curve-drawing options can be provided using standard curve shapes such as circular arcs and splines or with freehand sketching procedures. In free hand drawing, curves are generated by following the path of a stylus on a graphics tablet or the path of the screen cursor on a video monitor. Once a curve is displayed, the designer can alter the curve shape by adjusting the positions of selected points along the curve path. VISIBLE SURFACE DETECTION METHODS 

A major consideration in the generation of realistic graphics displays is identifying those parts of a scene that are visible from a chosen viewing position.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

160


MACHINE DRAWING & COMPUTER GRAPHICS

Deciding upon a method for a particular application can depend on such factors as the complexity of the scene, type of objects to be displayed, available equipment, and whether static or animated displays are to be generated.

The various algorithms are referred to as visible surface detection methods. Sometimes these methods are also referred to as hidden surface elimination methods.

Classification of Visible-Surface Detection Algorithms

Visible-surface detection algorithms are broadly classified according to whether they deal with object definitions directly or with their projected images.

The two approaches are called Object-Space methods and image-space methods respectively.

An object-space method compares objects and parts of objects to each other within the scene definition to determine which surfaces, as a whole, we should label as visible.

In an image-space algorithm, visibility is decided point by point at each pixel position on the projection plane.

There are major differences in the basic approach taken by the various visiblesurface detection algorithms, most use sorting and coherence methods to improve performance.

Sorting is used to facilitate depth comparisons by ordering the individual surfaces in a scene according to their distance from the view plane.

Coherence methods are used to take advantage of regularities in a scene.

Visible surface detection methods are classified as follows o

Back Face Detection

o

Depth-Buffer Method

o

A-Buffer Method

o

Scan Line Method

o

Depth Sorting Method

o

BSP Tree Method

o

Area Subdivision Method

o

Octree Mthods

o

Ray Casting Method

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

161


MACHINE DRAWING & COMPUTER GRAPHICS

Among the above mentioned visible surface detection methods, Back Face detection method and Depth Buffer method are included in the syllabus.

Back Face Detection

A fast and simple object-space method for identifying the back faces of a polyhedron is based on the “inside-outside” tests.

A point(x,y,z) is “inside” a polygon surface with plane parameters A,B,C, and D if 

Ax+By+Cz+d<0

When an inside point is along the line of sight to the surface, the polygon must be a back face.

In general, if V is a vector in the viewing direction position then this polygon is a back face if o

V.N>0

If object descriptions have been converted to projection coordinates and our viewing direction is parallel to the viewing zv axis, then V=(0,0,Vz) and 

V.N=VzC

So that we only need to consider the sign of C, the z component of the vector N.

In a right-handed viewing system with viewing direction along the negative zv axis, the polygon is a back face if C<0.

Thus , in general we can label any polygon as a back face if its normal vector has a component value: o

C<=0

Similar methods can be used in packages that employ a left-handed viewing system.

In these packages, plane parameters A,B,C, and D can be calculated from polygon vertex coordinates specified in a clockwise direction.

Also, back faces have normal vectors that point away from the viewing position and are identified by C>=0 when the viewing direction is along the positive zv axis.

Depth Buffer Method

A commonly used image-space approach to detecting visible surfaces is the depthbuffer method, which compares surface depths at each pixel position on the projection plane.

This procedure is also referred to as the z-buffer method, since object depth is usually measured from the view plane along the z-axis of the viewing system.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

162


MACHINE DRAWING & COMPUTER GRAPHICS

The depth-buffer algorithm as follows:

1. Initialize the depth buffer and refresh buffer so that for all buffer possible directions(x,y), Depth(x,y)=0,refresh(x,y)=Ibackgnd 2. For each position on each polygon surface,compare depth values to previously stored values in the depth buffer to determine visibility. 

Calculate the depth z for each(x,y)position on the polygon.

If z>depth(x,y),then set Depth(x,y)=z, refresh(x,y)=Isurf(x,y)

Where Ibackgnd is the value for the background intensity, and Isurf(x,y) is the projected intensity value for the surface at pixel position(x,y).After all surfaces have been processed, the depth buffer contains depth values for the visible surfaces and the refresh buffer contains the corresponding intensity values for those surfaces.

Depth values for a surface position (x,y) are calculated from the plane equation for each surface: Z=(-Ax-By-D)/C

If the depth z’ of the of the next position(x+1,y) along the scan line is Z’=-(A(x+1)-By-D)/C Or Z’=z-A/C;

Depth values down the edge are obtained recursively as Z’=z+(A/m+B)/C

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

163


MACHINE DRAWING & COMPUTER GRAPHICS

If we are processing down a vertical edge, the slope is infinite and the recursive calculations reduce to Z’=z+B/C

BASIC ILLUMINATION MODELS

Lighting calculations are based on the optical properties of surfaces, the background lighting conditions, and the light-source specifications. Optical parameters are used to set surface properties, such as glossy, matte, opaque, and transparent. This controls the amount of reflection and absorption of incident light. All light sources are considered to be point sources, specified with a coordinate position and an intensity value (color)

Ambient Light

A surface that is not exposed directly to a light source still will be visible if nearby objects are illuminated. In our basic illumination model, we can set a general level of brightness for a scene. This is a simple way to model the combination of light reflection from various surfaces to produce a uniform illumination called the ambient light, or background light. Ambient light has no spatial or directional characteristics. The amount of ambient light incident on each object is a constant for all surfaces and over all directions. We can set the level for the ambient light in a scene with parameter Ia, and each surface is then illuminated with this constant value. The resulting reflected light is a constant for each surface, independent of the viewing direction and the spatial orientation of the surface.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

164


MACHINE DRAWING & COMPUTER GRAPHICS

165

Figure 30: An illuminated area projected perpendicular to the path of the incoming light rays

Diffuse Reflection

Ambient –light reflection is an approximation of global diffuse lighting effects. Diffuse reflections are constant over each surface in a scene, independent of the viewing direction. The fractional amount of the incident light that is diffusely reflected can be set for each surface with parameter Kd, the diffuse –reflection coefficient, or diffuse reflectivity. Parameter Kd is assigned a constant value in the interval 0 to 1, according to the reflecting properties we want the surface to have. If we want a highly reflective surface, we set the value of K d near that of the incident light. If a surface is exposed only to ambient light, we can express the intensity of the diffuse reflection at any point on the surface as

I ambdiff

 Kd I a

Specular reflection and the phong model

When we look at an illuminated shiny surface, such as polished metal, an apple, or a person’s forehead, we see a highlight, or bright spot, at certain viewing directions. This phenomenon, called specular reflection, is the result of total, or near total, reflection of the incident light in a concentrated region around the specular-reflection angle. An empirical model for calculating the specular reflection range, developed by phong BuiTuong, sets the intensity of specular reflection proportional to cos assigned values in the range 0º to 90º, so that cos

ns

.

Angle

can be

various from 0 to 1. The value assigned

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

to specular reflection parameter

ns is determined by the type of surface ns (say, 100 or

more), and smaller values (down to 1) are used for duller surfaces. For a perfect reflector,

ns is infinite. For a rough surface, such as chalk or cinderblock, ns would be assigned a value near 1. We can approximately model monochromatic specular intensity variations using a specular reflection coefficient, W(  ) for each surface.

Combined Diffuse and Specular Reflections with Multiple Light Sources

For a single point light source, we can model the combined diffuse and specular reflections from a point on an illuminated surface as I = I diff + I spec = KaIa + KdIl (N.L) + KsIl(N.H)

ns

If we place more than one point source in a scene, we obtain the light reflection at any surface point by summing the contributions from the individual sources: n

I K a I a   I li [ N .Li )  K s ( N .H i ) ns ] i 1

To ensure that any pixel intensity does not exceed the maximum allowable value, we can apply some type of normalization procedure. A simple approach is to set a maximum magnitude for each term in the intensity equation. If any calculated term exceeds the maximum, we simply set it to the maximum value. Another way to compensate for intensity overflow is to normalize the individual terms by dividing each by the magnitude of the largest term Warn Model The warn model provides a method for simulating studio lighting effects by controlling light intensity in different directions. In addition, light controls, such as “barn doors” and spotlighting, used by studio photographers can be simulated in the Warn model. Flaps are used to control the amount of light emitted by a source in various directions. Two flaps are provided for each of the x,y and

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

166


MACHINE DRAWING & COMPUTER GRAPHICS

z directions. Spotlights are used to controls the amount of light emitted within a cone with apex at a point source position. Intensity Attenuation As radiant energy from a point light source travels through space, its amplitude is attenuated by the factor 1/d2, where d is the distance that the light has traveled. This means that a surface close to the light source (small d) receives higher incident intensity from the source than a distant from the source than a distant surface (large d). If two parallel surfaces with the same optical parameters overlap, they would be indistinguishable from each other. A general inverse quadratic attenuation can be set up as

F(d) =

1 a0  a1d  a2 d 2

A user can then fiddle with the coefficients a0, a1 and a2 to obtain a variety of lighting effects for a scene. The value of the constant term a0 can be adjusted to prevent f(d) from becoming too large when d is very small. Color Considerations For an RGB description, each color in a scene is expressed in terms of red, green, and blue components. We then specify the RGB components of light source intensities and surface colors, and the illumination model calculates the RGB components of the reflected light. One way to set surface colors is by specifying the reflectivity coefficients as three element vectors. The diffuse reflection coefficient vector, for example, would then have RGB components (KdR, KdG, KdB). If we want an object to have a blue surface, we select a nonzero value in the range from 0 to 1 for the blue reflectivity component, KdB, while the red and green reflectivity components are set to zero (KdR = KdG = 0). Any nonzero red or green components in the incident light are absorbed, and only the blue component is reflected. The intensity calculation for this example to the single expression

I B  K aB I aB   fi (d ) I lbi [ K db ( N .Li)  K sB ( N .H i ) ns ] Transparency A transparent surface, in general, produces both reflected and transmitted light. The relative contribution of the transmitted light depends on the degree of transparency of the surface and whether any light sources or illuminated surfaces are behind the transparent surface.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

167


MACHINE DRAWING & COMPUTER GRAPHICS

168

When a transparent surface is to be modeled, the intensity equations must be modified to include contributions from light passing through the surface Realistic transparency effects are modeled by considering light refraction. When light is incident upon a transparent surface, part of it is reflected and part is refracted. The direction of the refracted light, specified by the angle of refraction, is a function of the index of refraction of each material and the direction of the incident light. Index of refraction for a material is defined as the ratio of the speed of light in a vacuum to the speed of light in the material. Angle of refraction

r

is calculated from the angle of incidence  i , the index of refraction

the “incident” material (usually air), and the index of refraction

 r of

 i of

the refracting material

according to Snell’s law:

Sin r 

i sin  i r

Shadows Hidden –surface methods can be used to locate areas where light sources produce shadows. By applying a hidden-surface method section cannot be “seen” from the light source. These are the shadow areas. Once we have determined the shadow areas for all light sources, the shadows could be treated as surface patterns and stored in pattern arrays. Surface that are visible from the view position are shaded according to the lighting model, which can be combined with texture patterns. We can display shadow areas with ambient light intensity only or we can combine the ambient light with specified surface textures. COLOR MODELS AND COLOR APPLICATIONS 

A Color model is a method for explaining the properties or behavior of color within some particular context.

No single color model can explain all aspects of color, so we make use of different models to help describe the different perceived characteristics of color.

There are two types of color models namely additive and subtractive color models.

Additive color models use light to display color.

Subtractive color models use printing inks.

Colors perceived in additive models are the result of transmitted light.

Colors perceived in subtractive models are the result of reflected light.

Colors in additive systems are created by adding colors to black to create new colors.

Additive color environments are self-luminous.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621


MACHINE DRAWING & COMPUTER GRAPHICS

Color on monitors is additive.

Primary colors are subtracted from white create new colors.

Any color image reproduced on paper is an example of the use of a subtractive color system.

Color management is a term that describes a technology that translates the colors of an object from their current color space to the color space of the output devices like monitors, printers etc.

Color space is a more specific term for a certain combination of a color model plus a color mapping function.

There are several color models used in computer graphics but the two most common are the RGB for computer display and the CMYK for printing.

Properties of Light What we perceive as “light’, or different colors, is a narrow frequency band within the electromagnetic spectrum. A few of the other frequency bands within this spectrum are called radio waves, micro waves, infrared waves, and X-rays. Each frequency value within the visible band corresponds to a distinct color. At the lowfrequency end is a red color and the highest frequency is violet color. The wavelength and frequency of the monochromatic wave are inversely proportional to each other, with the proportionality constant as the speed of light c: C=/\ .f

If low frequencies are predominant in the reflected light, the object is described as red. In this case, we say the perceived light has a dominant frequency (or dominant wavelength) at the red end of the spectrum. The dominant frequency is also called the hue, or simply the color, of the light.

Brightness is the perceived intensity of the light. Intensity is the radiant energy emitted per unit time, per unit solid angle, and per unit projected area of the source. Radiant energy is related to the luminance of the source.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

169


MACHINE DRAWING & COMPUTER GRAPHICS

Purity or saturation describes how washed out or how “Pure” the color of the light appears. These three characteristics dominant frequency, brightness and purity are commonly used to describe the different properties we perceive in a source of light. The term Chromaticity is used to refer collectively to two properties describing color characteristics: Purity and dominant frequency

If the two color sources combine to produce white light, they are referred to as Complementary colors.

Examples of complementary colors are red and cyan, green and magenta and blue and yellow.

Typically, color models that are used to describe combinations of light in terms of dominant frequency (hue) use three colors to obtain a reasonably wide range of colors, called the Color gamut for that model Two different color light sources with suitably chosen intensities can be used to produce a range of other colors.

The two or three colors used to produce other colors in such a color model are referred to as Primary colors.

Standard Primaries and the Chromaticity Diagram

Since no finite set of color light sources can be combined to display all possible colors, three primaries were defined in 1931 by the international Commission on illumination, referred to as the CIE (Commission International del’Eclairage).

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

170


MACHINE DRAWING & COMPUTER GRAPHICS

The three standard colors are imaginary colors. They are defined mathematically with positive color matching functions that specify the amount of each primary needed to describe any spectral color. XYZ Color Model The set of CIE primaries is generally referred to as the XYZ,or(X,Y,Z),color model, where X,Y,Z represent vectors in a three dimensional, additive color space. Any color C /\ is then expressed as C/\ =XX+YY+ZZ Where X, Y, Z designate the amounts of the standard primaries needed to match c /\.

Normalised amounts are thus calculated as

x=X/X+Y+Z, y=Y/X+Y+Z, z=Z/X+Y+Z

with x+y+z=1. Thus any color can be represented with just the x and y amounts. Since we have normalized against luminance, parameters x and y are called the chromaticity values because they depend only on hue and purity.

CIE Chromaticity Diagram

When we plot the normalized amounts x and y for colors in the visible spectrum, we obtain the tongue-shaped curve. This curve is called the CIE Chromaticity Diagram. The chromaticity diagram is useful for the following: 

Comparing colors gamuts for different sets of primitives.

Identifying complementary colors.

Determining dominant wavelength and purity of a given color.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

171


MACHINE DRAWING & COMPUTER GRAPHICS

Color gamuts are represented on the chromaticity diagram as straight line segments or as polygons.

Since the color gamut for two points is a straight line, complementary colors must be represented on the chromaticity diagram as two points situated on opposite sides of C and connected with a straight line. Intuitive Color Concepts Starting with the pigment for a “pure color�, the artist adds a black pigment to produce different shades of that color. Different tints of the color are obtained by adding a white pigment to the original color, making it lighter as more white is added.

Tones of the color are produced by adding both black and white pigments. RGB Color Model Based on the tristimulus theory of vision, our eyes perceive color through the stimulation of three visual pigments in the cones of the retina. These visual pigments have peak sensitivity at wavelength of about 630 nm (red), 530 nm (green), and 450 nm (blue). This theory of vision is the basis for displaying color output on a video monitor using the three color primaries red, green and blue referred as the RGB Color model. The origin represents black and the vertex with Coordinates (1, 1, 1) is white. Each color point within the bounds of the cube can be represented as a triple (R, G, B), where values for R,G,B are assigned in the range from 0 to 1. Thus, a color C/\ is expressed in RGB components as C/\ =RR+GG+BB

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

172


MACHINE DRAWING & COMPUTER GRAPHICS

The magenta vertex is obtained by adding red and blue to produce the triple (1, 0, 1) and white at (1, 1, 1) is the sum of the red, green and blue vertices. Some important features of the RGB color model are 1. It is an additive color model 2. Used for computer displays 3. Uses light to display color 4. Colors result from transmitted light 5. Red + Green + Blue = White

RGB(X,Y) CHROMATICITY COORDINATES:

NTSC Standard

CIE Model Approx.Color Monitor values

R) (0.670,0.330) (0.735,0.265)

(0.628,0.346)

G) (0.210,0.710) (0.274,0.717)

(0.268.0.588)

B) (0.410,0.080) (0.167,0.009)

(0.150,0.070)

YIQ Color Model In the YIQ model, parameter y is the same as in the XYZ model. Luminance information is contained in the y parameter, while chromaticity information is incorporated into the I and Q parameters. A combination of red, green and blue intensities are chosen for the y parameter to yield the standard luminosity curve.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

173


MACHINE DRAWING & COMPUTER GRAPHICS

An NTSC encoder, which converts RGB values to YIQ values, then modulates and superimposes the I and Q information on the signal. An RGB signal can be converted to a television signal using an NTSC encoder which converts RGB values to YIQ values, then modulates and superimposes the I and Q information on the Y signal. The conversion from RGB values to YIQ values is accomplished with the transformation.

Y

0.299 0.587 0.144

R

I

0.596 -0.275 -0.321

G

Q

0.212 -0.528 0.311

B

CMY Color Model A color model defined with the primary colors cyan, magenta and yellow is useful for describing color output to hard-copy devices. A CMY color model forms its gamut from the primary subtractive colors of cyan, magenta and yellow. When cyan, magenta and yellow inks are combined, it forms black.

In CMY model point (1, 1, 1) represents black, because all components of the incident light are subtracted.

The matrix transformation for the conversion from an RGB representation to a CMY representation is , C M Y

1 =

1 1

R -

G B

Here the white is represented in the RGB system as the unit column vector.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

174


MACHINE DRAWING & COMPUTER GRAPHICS

Some of the important features of the CMY color model are 1. It is a subtractive color model 2. Used for printed material 3. Uses ink to display color 4. Colors result from reflected light 5. Cyan + Magenta + Yellow = Black

HSV Color Model The HSV Model uses color descriptions that have a more intuitive appeal to a user. Color parameters in this model are hue (H), saturation(S), and value (V). Hue deals with the purity of the color. Saturation determines the amount of white light mixed with the original color. Value gives the intensity of the color.

The three dimensional representation of the HSV model is derived from the RGB cube. Hue is represented as an angle about the vertical axis, ranging from 0◦ at red through 360◦. Vertices of the hexagon are separated by 60◦ intervals. Yellow is at 60◦, green at 120◦ and cyan opposite red at H = 180◦. Saturation s varies from 0 to 1. Value v varies from 0 at the apex of the hex cone to 1 at the top. SUMMARY In this unit we have discussed the basic properties of light and the concept of a color model. Light sources are described in terms of hue, brightness and saturation. One method of defining a color model is to specify a set of two or more primary colors that are combined to produce various other colors. Common color models defined with three primary colors are the RGB and CMY models. Other color models based on specification of luminance and purity

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

175


MACHINE DRAWING & COMPUTER GRAPHICS

include YIQ, HSV and HLS color models. A dialogue for an application package can be designed from the user’s model, which describes the functions of the applications package.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

176


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT QUESTIONS UNIT-I QUESTIONS SELF –ASSESMENT QUESTIONS:I

1. 2. 3. 4.

What are the different types of half section? What is the spacing between hatching lines? What is the need for sectioning? The another name of revolved section is -----------------

UNIT QUESTIONS 1. Explain the hatching of larger areas. 2. Define hatching. 3. What is offset section?

ANSWER OF SELF ASSESSMENT QUESTIONS 1. Front view with right half in section Front view with top half in section top view with section Top view with front half in section Left view with front half in section 2. A spacing of 2mm between the hatching lines will be appropriate for the general work. 3. NEED FOR SECTIONING o

To show the internal features more clearly.

o

To remove hidden lines.

o

To avoid complication and ambiguity.

o

For ease of understanding.

4. Superimposed sectioning

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

177


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT-II QUESTIONS SELF –ASSESSMENT QUESTIONS:I Answer the following 1. What are the different types of fits? 2. Define limits 3. Sketch the symbols for the following charesteristics used for form tolerances. (a)

Straightness

(b)

Flatness

(c)

Circularity

(d)

cylindricity

UNIT QUESTIONS 1. Define fits and tolerances 2. What is transition fit? 3. Define shaft basis system. 4. Sketch the symbols of the following and classify them into : (1) Form of single feature (2) Orientation of related features and (3) Position of related features (i) Concentricity (ii) Straightness (iii) Circularity (iv) Perpendicularity (v) Cylindricity (vi) Angularity

ANSWERS OF SELF –ASSESSMENT QUESTIONS

I 1. (a) Clearance fit

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

178


MACHINE DRAWING & COMPUTER GRAPHICS

(b) Transition fit (c) Interference fit 2. The maximum and minimum permissible sizes within which the actual machined size lies are called limits. 3. (a)

Straightness

(b)

Flatness

(c )

(c)

Circularity

Cylindricity

UNIT-III QUESTIONS

SELF-ASSESSMENT QUESTIONS:I

1. What is the use of key? 2. Define lay. 3. What are the proportions of pin key?

UNIT QUESTIONS: 1. Define waviness. 2. Classify the keys. 3. What is the method to indicate the surface roughness for various machining operations?

ANSWER OF SELF-ASSESSMENT QUESTIONS:

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

179


MACHINE DRAWING & COMPUTER GRAPHICS

1.

Keys are extensively used to hold pulleys, gears, couplings, clutches, sprockets, etc., and the shafts rigidly so that they rotate together. They are also used to mount the milling cutters, riding wheels, etc., on their spindles

2. Lay is the predominant direction of tool marks that make a characteristic pattern on a machined Surface 3. The proportions of the pin key are as follows. If D = diameter of the shaft, d = diameter of the pin, Diameter of pin = 0.2 D Taper 1:50

UNIT-IV QUESTIONS SELF –ASSESMENT QUESTIONS:I

1. 2. 3. 4.

What is left hand thread? What is the difference between bolt and rivet? Draw the neat sketch of rivet head which is used for boiler . Draw a neat sketch to differentiate the internal thread and external thread.

UNIT QUESTIONS 1. 2. 3. 4.

How will you designate the threads. Explain the square thread with neat sketch. Define bolt and nut with neat sketch What is the use of rivets.

ANSWER OF SELF ASSESSMENT QUESTIONS 1. A left hand thread is one which advances into the nut, when turned in a counter clockwise direction, and the slope of the lines representing the thread will be downward from left to right. An abbreviation LH is used to indicate the left hand thread. 2. Rivet is used as a Permanent fastener to withstand shear forces acting perpendicular to its axis, whereas a bolt is used as a temporary fastener to Withstand axial tensile forces.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

180


MACHINE DRAWING & COMPUTER GRAPHICS

3. The flat counter sunk riveted head is used for boiler works. The proportion of the flat counter sunk rivet is shown in fig

4. In the diagram the part (A) refers the external thread, and part (B) refers the internal thread

UNIT-V QUESTIONS UNIT QUESTIONS 1. Define computer graphics. Give a survey of the various graphics system. 2. Explain briefly the video display devices. 3. Explain the process involved in the raster scan system 4. Explain the tasks involved in random scan system 5. Describe the various input devices in detail. 6. Write a note on the hard copy devices.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

181


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT-VI QUESTIONS SELF ASSESSMENT QUESTIONS

Answer the following questions

1. Define the term Output primitive. 2. ________________ is a faster method for calculating pixel position. 3. Give the types of fonts. 4. List the various character attributes. 5. What do you mean by antialiasing?

ANSWERS TO SELF ASSESSMENT QUESTIONS

1. Graphics programming packages provide functions to describe a scene in terms of the basic geometric structures referred to as output primitives. 2. DDA Algorithm. 3. Serif and Sans Serif are the types of fonts. 4. The various character attributes are font, size, color and orientation. 5. Displayed primitive generated by the raster algorithms have a jagged, appearance due to low frequency sampling is called aliasing. The appearance of displayed raster lines can be improved by using antialiasing.

UNIT QUESTIONS 1. Define the output primitive. Explain briefly the DDA algorithm in detail. 2. Explain briefly the Ellipse generating algorithm. 3. Explain the circle generating algorithm. 4. Explain the tasks involved in antialiasing. 5. Describe the various line attributes. 6. Write a note on the area fill attributes.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

182


MACHINE DRAWING & COMPUTER GRAPHICS

7. Explain the various character attributes.

UNIT-VII QUESTIONSSELF ASSESSMENT QUESTIONS

Answer the following questions

1. Define the term transformation. 2. ________________ alters the size of an object. 3. What is meant by concatenation of matrices? 4. ________________ produces a mirror image of an object. 5. Define window and a viewport.

1. Changes in orientation, size and shape of an object are accomplished with geometric transformations that alter the coordinate descriptions of objects. 2. Scaling transformation. 3. Forming product of transformation matrices is referred to as concatenation or composition of matrices. 4. Reflection. 5. A world coordinate area selected for display is called a window. An area on a display device to which a window is mapped is called a viewport.

UNIT QUESTIONS

1. Define the term transformation. Explain briefly the various transformations with a neat diagram. 2. Explain briefly the Reflection and Shear. 3. Explain the line clipping algorithms.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

183


MACHINE DRAWING & COMPUTER GRAPHICS

4. Explain the tasks involved in polygon clipping. 5. Describe the process of text clipping. 6. Write a note on curve clipping.

UNIT-VIII QUESTIONS

SELF ASSESSMENT QUESTIONS

Answer the following questions

1. Define the term three dimensional transformation. 2. ________________ can be used to modify object shapes. 3. What are the types of projection? 4. When the projection is perpendicular to the view plane we have an ________________. 5. Define principal vanishing point.

ANSWERS TO SELF ASSESSMENT QUESTIONS

1. Methods for geometric transformations and object modeling in three dimensions are extended from two dimensional methods by including considerations for the z coordinate is known as three dimensional transformations. 2. Shearing transformation. 3. The types of projection are parallel and perspective projection. 4. Orthographic parallel projection. 5. The vanishing point for any set of lines that are parallel to one of the principal axes of an object is referred to as a principal vanishing point.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

184


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT QUESTIONS 1. Define the term three dimensional transformation. Explain briefly the various 3D transformations with a neat diagram. 2. Explain briefly the 3D Reflection and Shear. 3. Explain the process of projection with a neat diagram. 4. Explain the tasks involved in 3D clipping. 5. Describe the process of viewing pipeline.

UNIT-IX QUESTIONS SELF ASSESSMENT QUESTIONS

Answer the following questions

1. The primary physical device used for string input is _____________. 2. In _________ mode, the input devices initiate data input to the application program. 3. What are the types of visible surface detection methods? 4. A commonly used image space approach to detect visible surfaces is the _____________. 5. Give the various color models.

ANSWERS TO SELF ASSESSMENT QUESTIONS

1. Keyboard. 2. Event mode. 3. The types of visible surface detection methods are object space methods and image space methods. 4. Depth Buffer method. 5. The various color models are RGB, CMY, YIQ, HSV, HLS and XYZ.

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

185


MACHINE DRAWING & COMPUTER GRAPHICS

UNIT QUESTIONS

1. Explain briefly the various interactive input methods. 2. Explain briefly the various input functions. 3. Explain the basic illumination models. 4. Explain the tasks involved in RGB color model. 5. Describe the various color models in detail. 6. What do you mean by hue, saturation and intensity? How are they related to dominant color, purity and luminance respectively?

--------------------------------------------------------THE END------------------------------------------------------

FOR MORE DETAILS VISIT U ON WWW.IMTSINSTITUTE.COM OR CALL ON +91-9999554621

186


MACHINE DRAWING & COMPUTER GRAPHI CS

II

Publ i s he dby

I ns t i t ut eofManage me nt& Te c hni c alSt udi e s Addr e s s:E4 1 , Se c t o r 3 , No i da( U. P) www. i mt s i ns t i t ut e . c o m| Co nt a c t :+9 1 9 2 1 0 9 8 9 8 9 8


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.