0% found this document useful (0 votes)
12 views

Lecture-4 - Ch-6 Computer Graphics and Data Base

The document discusses computer graphics software and databases. It describes the modules, functions, and construction of graphics software. It also covers topics like transformations, wireframe vs solid modeling, and line drawing algorithms.

Uploaded by

nomibashir0115
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Lecture-4 - Ch-6 Computer Graphics and Data Base

The document discusses computer graphics software and databases. It describes the modules, functions, and construction of graphics software. It also covers topics like transformations, wireframe vs solid modeling, and line drawing algorithms.

Uploaded by

nomibashir0115
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 40

Computer Graphics Software and

Data Base
Zain Shami
Layout
 Introduction
 Software Configuration
 Modules of Graphic Software
 Functions of Graphic Package
 Constructing the Geometry

3 Department of Mechanical Engineering, WEC May 5, 2024


Introduction
 Hardware is useless without its accompanying software
 Software is different for different hardware
 Detail of graphics software for stroke writing CRT is
different than the graphics software for raster scan CRT

4 Department of Mechanical Engineering, WEC May 5, 2024


Introduction
 Rules for designing graphics software
 Simplicity
 Easy to use
 Consistency
 Consistent and predicable program
 Completeness
 No inconvenience omissions/no incomplete data
 Robustness
 Should be tolerant to minor instances of misuse by the user
 Performance
 Should be efficient and speed of response should be fast
 Economy
 Not so large/ not so expensive
5 Department of Mechanical Engineering, WEC May 5, 2024
Software Configuration of a Graphics
System
 On basis of operation, it can be divided into three
categories
 Interact with the graphics terminal to create and alter images on
the screen
 Construct a model of something physical out of the images on
the screen. The models are sometimes called the application
models
 Enter the model into the computer memory and/or secondary
storage

6 Department of Mechanical Engineering, WEC May 5, 2024


Modules of Graphics Software
 Graphics Package
 Application Program
 The application data Base
Design Workstation

Graphics
Terminal
Application Application Graphics
Database Program Package User input
Devices

7 Department of Mechanical Engineering, WEC May 5, 2024


Modules of Graphics Software
 Graphics Package
 Acts as a transporter
 Contains input and output subroutines
 Serves as the interface between the user and application software
 Application Program
 Implemented by the user to construct the model of a physical
entity whose image is to be viewed on the graphics screen
 Programs are written for particular problem areas
 The application data Base
 All the information regarding the model is stored in data base
 Mathematical, numerical, and logical definitions of the
application model
8 Department of Mechanical Engineering, WEC May 5, 2024
Functions of a Graphics Package
 Generation of Graphics Elements
 Transformations
 Display Control and Windowing functions
 Segmenting Functions
 User input Functions

9 Department of Mechanical Engineering, WEC May 5, 2024


Functions of a Graphics Package
 Generation of Graphics Elements
 Primitive Generation
 Transformations
 Scaling
 Positioning
 Transformation
 Display Control and Windowing functions
 Hidden Line Removal
 Segmenting Functions
 User input Functions

10 Department of Mechanical Engineering, WEC May 5, 2024


Functions of a Graphics Package
 Generation of Graphics Elements
 Transformations
 Display Control and Windowing functions
 Segmenting Functions
 CRT type dependence
 Storage type don’t allow the segmentation
 Raster scan and Refresh type allow the segmentation
 User input Functions
 Written specifically for the input systems
 Dependent on how the system is user friendly

11 Department of Mechanical Engineering, WEC May 5, 2024


Constructing the Geometry
 The use of Graphics Elements
 Defining the graphic elements
 Editing the Geometry
 Transformations
 Concatenation

12 Department of Mechanical Engineering, WEC May 5, 2024


Constructing the Geometry
 The use of Graphics Elements
 Use of Primitives
 Add/subtract one primitive to/from other primitive

13 Department of Mechanical Engineering, WEC May 5, 2024


Constructing the Geometry
 The use of Graphics Elements
 Defining the graphic elements
 Mathematical equations for graphic elements
 Lines, curves, circle etc.

(x - m)2 + (y - n)2 = r2

14 Department of Mechanical Engineering, WEC May 5, 2024


Constructing the Geometry
 The use of Graphics Elements
 Defining the graphic elements
 Editing the Geometry
 Move an item to another location i.e., translation
 Duplicate an object at another location i.e., copy
 Rotate an item i.e., rotation transformation
 Mirror an item
 Delete an item
 Hide an item (remove item from display)
 Trim a line or other components
 Scale an item

15 Department of Mechanical Engineering, WEC May 5, 2024


Transformation
 2D transformation
 3D transformation

16 Department of Mechanical Engineering, WEC May 5, 2024


2D Transformation - Translation

17 Department of Mechanical Engineering, WEC May 5, 2024


Example 6.1

18 Department of Mechanical Engineering, WEC May 5, 2024


Transformation – Scaling
 c > 0 for dilation and c < 0 for contraction

19 Department of Mechanical Engineering, WEC May 5, 2024


Example 6.2

20 Department of Mechanical Engineering, WEC May 5, 2024


Transformation – Rotation

21 Department of Mechanical Engineering, WEC May 5, 2024


Transformation – Rotation

22 Department of Mechanical Engineering, WEC May 5, 2024


Example 6.3

23 Department of Mechanical Engineering, WEC May 5, 2024


Example 6.3

24 Department of Mechanical Engineering, WEC May 5, 2024


Transformation – Rotation

25 Department of Mechanical Engineering, WEC May 5, 2024


Transformation – Reflection

26 Department of Mechanical Engineering, WEC May 5, 2024


Transformation – Reflection

27 Department of Mechanical Engineering, WEC May 5, 2024


Transformation – Reflection

28 Department of Mechanical Engineering, WEC May 5, 2024


Transformation - Projections

29 Department of Mechanical Engineering, WEC May 5, 2024


Transformation - Projections

30 Department of Mechanical Engineering, WEC May 5, 2024


Transformation - Projections

31 Department of Mechanical Engineering, WEC May 5, 2024


Concatenation
 Series of Transformations is called as Concatenation
 Rotation followed by scaling
 Scaling followed by Translation
 See Example 6.4

32 Department of Mechanical Engineering, WEC May 5, 2024


Data Base Structure & Content
 CAD data base contains the application models, drawings,
assemblies, and alphanumeric information
 Following data structure is patterned
 Basic Graphic Element (points and other elements)
 Geometry (shape) of the model components and their layout in
space
 Topology or structure of the models, how the various
components are connected to form the model
 Application-specific data i.e., material properties
 Application-specific analysis programs i.e., FEA programs

33 Department of Mechanical Engineering, WEC May 5, 2024


Wireframe vs. Solid Model
 A frame structed out of the wires

34 Department of Mechanical Engineering, WEC May 5, 2024


Wireframe vs. Solid Model
 Two basic approaches for solid modeling
 Constructing solid geometry (CSG or C-rep), also called the
building block approach
 Boundary representation (B-rep)

35 Department of Mechanical Engineering, WEC May 5, 2024


Computer Graphics
 Straight line equation

 For small increments

36 Department of Mechanical Engineering, WEC May 5, 2024


Algorithm for line
 Line Drawing Calculation
Procedure
 DDA
 Digital Differential Analyser
 If slope, m < 1

 If slope, m > 1

37 Department of Mechanical Engineering, WEC May 5, 2024


Example

38 Department of Mechanical Engineering, WEC May 5, 2024


39 Department of Mechanical Engineering, WEC May 5, 2024
40 Department of Mechanical Engineering, WEC May 5, 2024
B(7, 8)

A(-3, 6)

E(-7, -3) C(10, -1)

D(1, -8)

41 Department of Mechanical Engineering, WEC May 5, 2024

You might also like