Computer Application in Design M.E
Computer Application in Design M.E
Presented by
C. P. Goldin Priscilla,
AP/MECH,
Kamaraj College of Engineering and Technology,
Virudhunagar.
CAD
• CAD also known as Computer Aided
Drafting/Design.
Marketing
5
• Inspection to finished product
– Two main process
– Design Process
» Synthesis
(Sketches, Layout drawings- CAD/CAM system)
» Analysis
(Design Modeling & Simulation)
– Manufacturing Process
(Process Planning & Production)
(Outcome Production Plan, tools procurement,
material order, CNC Programming)
Concurrent Engineering
• It is a strategy where all the tasks involved in
product development are done in parallel.
Commercial
Design Process Competitors Idea
Generation Marketing
Feasibility
Study
Performance Specifications
Linear Process
Preliminary
Form Design
Design
Revising and testing
prototypes
Functional Production
Design Design
Design Manufacturing
Specifications Specifications
Final Design
and process
plans
Product Launch
Sequential Vs Concurrent Engineering
GUI
Client/Standalone
Database
Works on all OS [ Unix,Linux,Windows,Macintosh]
CAD/CAM Applications
• Geometric Module Modelling/editing, documentation
• Application Module Utilize model for Design Analysis.
• Programming Module Customization by programming
• Communication Module IGES, STEP file
• Collaborative Module collaborative design via internet
2D Transformations
Basic 2D Transformations
15
Basic 3D Transformations
16
Example:
Two Dimensional Viewing
• The Viewing Transformation/ Pipeline
• Line Drawing
– Several Algorithms
• Clipping
– Point clipping
– Line clipping
– Area (Polygon) clipping
– Curve clipping
– Text clipping
Viewing Transformation
Windowing
When we display a scene only those objects
within a particular window are displayed
Window
wymax
wymin
wxmin wxmax
World Coordinates
Windowing
Because drawing things to a display takes time
we clip everything outside the window
Window
wymax
wymin
wxmin wxmax
World Coordinates
Clipping
Window P2
wymax
P6
P3
P1
P7 P5
P9
P8
wymin
P10
wxmin wxmax
Point Clipping
Easy - a point (x,y) is not clipped if:
wxmin ≤ x ≤ wxmax AND wymin ≤ y ≤ wymax
otherwise it is clipped
P4 Clipped
Clipped
Window P2
wymax
Clipped
P5
P1
P7 Points Within the Window
are Not Clipped
P9 P8
wymin
Clipped P10
wxmin wxmax
Line Clipping
Harder - examine the end-points of each line to
see if they are in the window or not
Situation Solution Example
Both end-points inside
Don’t clip
the window
Salient Features
•An efficient line clipping algorithm
•The key advantage of the algorithm is
that it vastly reduces the number of line
intersections that must be calculated
Cohen-Sutherland: World Division
P11 [1010]
P4 [1000]
Window
wymax
P6 [0000]
P3 [0001]
P5 [0000] P12 [0010]
P7 [0001]
P9 [0000] P8 [0010]
wymin
P10 [0100]
P13 [0101] P14 [0110]
wxmin wxmax
Cohen-Sutherland: Lines In The Window
Lines completely contained within the window
boundaries have region code [0000] for both end-
points so are not clipped.
P11 [1010]
P4 [1000]
Window
wymax
P6 [0000]
P3 [0001]
P5 [0000] P12 [0010]
P7 [0001]
P9 [0000] P8 [0010]
wymin
P10 [0100]
P13 [0101] P14 [0110]
wxmin wxmax
Cohen-Sutherland: Lines Outside The Window
Any lines with a common set bit in the region codes of
both end-points can be clipped
– The AND operation can efficiently check this
P11 [1010]
P4 [1000]
Window
wymax
P6 [0000]
P3 [0001]
P5 [0000] P12 [0010]
P7 [0001]
P9 [0000] P8 [0010]
wymin
P10 [0100]
P13 [0101] P14 [0110]
wxmin wxmax
Cohen-Sutherland: Other Lines
Lines that cannot be identified as completely inside or outside
the window may or may not cross the window interior
These lines are processed as follows:
– Compare an end-point outside the window to a boundary
(choose any order in which to consider boundaries e.g.
left, right, bottom, top) and determine how much can be
discarded
– If the remainder of the line is entirely inside or outside the
window, retain it or clip it respectively
– Otherwise, compare the remainder of the line against the
other window boundaries
– Continue until the line is either discarded or a segment
inside the window is found
Cohen-Sutherland: Other Lines (cont…)
We can use the region codes to determine which window
boundaries should be considered for intersection
– To check if a line crosses a particular boundary we
compare the appropriate bits in the region codes of its
end-points
– If one of these is a 1 and the other is a 0 then the line
crosses the boundary
Cohen-Sutherland:- Examples
Consider the line P9 to P10 below
– Start at P10 wymax
Window
boundary P [0100]
10
• Consideration must be
taken as to which portions
of the area must be clipped
Sutherland-Hodgman: Area Clipping Algorithm
Original Area Clip Left Clip Right Clip Top Clip Bottom
Sutherland-Hodgman:
Area Clipping Algorithm (cont…)
To clip an area against an individual boundary:
– Consider each vertex in turn against the boundary
– Vertices inside the boundary are saved for clipping against the
next boundary
– Vertices outside the boundary are clipped
– If we proceed from a point inside the boundary to one
outside, the intersection of the line with the boundary is saved
– If we cross from the outside to the inside intersection point
and the vertex are saved
Sutherland-Hodgman Example
Each example shows the
point being processed (P) S
and the previous point (S)
S
Saved points define area P
I
clipped to the boundary in
P
question Save Point P Save Point I
P S
I P
S
No Points Saved Save Points I & P
Other Clipping
Curve clipping
• Use bounding rectangle to test for overlap with
a rectangular clip window.
Text clipping
• All-or-none string-clipping
• All-or-none character-clipping
• Clip the components of individual characters
41
Thank You