Computer Aided Design (CAD)

Similar documents
Geometric Modeling. Introduction

Parametric Modeling. With. Autodesk Inventor. Randy H. Shih. Oregon Institute of Technology SDC PUBLICATIONS

Module 1: Basics of Solids Modeling with SolidWorks

VALLIAMMAI ENGINEERING COLLEGE

Geometric Modeling Lecture Series. Prof. G. Wang Department of Mechanical and Industrial Engineering University of Manitoba

2D/3D Geometric Transformations and Scene Graphs

UNIT 2 2D TRANSFORMATIONS

ME-430 Introduction to CAD Lecture Notes- Part 3

L1 - Introduction. Contents. Introduction of CAD/CAM system Components of CAD/CAM systems Basic concepts of graphics programming

Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

Parametric Modeling with UGS NX 4

Introduction to Solid Modeling Parametric Modeling. Mechanical Engineering Dept.

Chapter 5. Projections and Rendering

Chapter 2 Parametric Modeling Fundamentals

Unit 3 Transformations and Clipping

An Introduction to Autodesk Inventor 2010 and AutoCAD Randy H. Shih SDC PUBLICATIONS. Schroff Development Corporation

Parametric Modeling. with. Autodesk Inventor Randy H. Shih. Oregon Institute of Technology SDC

Chapter 2 Parametric Modeling Fundamentals

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects

Geometric Transformations

Birkdale High School - Higher Scheme of Work

Solid Modelling. Graphics Systems / Computer Graphics and Interfaces COLLEGE OF ENGINEERING UNIVERSITY OF PORTO

(Refer Slide Time: 00:01:27 min)

Number/Computation. addend Any number being added. digit Any one of the ten symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9

Math background. 2D Geometric Transformations. Implicit representations. Explicit representations. Read: CS 4620 Lecture 6

Extended Mathematics for Cambridge IGCSE by David Rayner. Chapter 1. Identify and use rational and irrational numbers, real numbers.

Parametric Modeling with. Autodesk Fusion 360. First Edition. Randy H. Shih SDC. Better Textbooks. Lower Prices.

3 Identify shapes as two-dimensional (lying in a plane, flat ) or three-dimensional ( solid ).

CAD/CAM COURSE TOPIC OF DISCUSSION GEOMETRIC MODELING DAWOOD COLLEGE OF ENGINEERING & TECHNOLOGY- KARACHI- ENGR. ASSAD ANIS 4/16/2011 1

Chapter 1 Introduction

TRINITAS. a Finite Element stand-alone tool for Conceptual design, Optimization and General finite element analysis. Introductional Manual

Mathematics Curriculum

Publication Number spse01695

Chapter 12 Solid Modeling. Disadvantages of wireframe representations

Exercise Guide. Published: August MecSoft Corpotation

6 Mathematics Curriculum

Geometric Modeling Mortenson Chapter 11. Complex Model Construction

This blog addresses the question: how do we determine the intersection of two circles in the Cartesian plane?

2D Object Definition (1/3)

6. Find the equation of the plane that passes through the point (-1,2,1) and contains the line x = y = z.

Engineering designs today are frequently

Integrated Mathematics I Performance Level Descriptors

Parametric Modeling with NX 12

2D and 3D Transformations AUI Course Denbigh Starkey

1. Introduction to Constructive Solid Geometry (CSG)

Glossary of dictionary terms in the AP geometry units

WEEKS 1-2 MECHANISMS

3D Modeling: Surfaces

Understand the concept of volume M.TE Build solids with unit cubes and state their volumes.

SolidWorks. An Overview of SolidWorks and Its Associated Analysis Programs

Lesson 1 Parametric Modeling Fundamentals

Lesson 1: Introduction to Pro/MECHANICA Motion

Module 5: Creating Sheet Metal Transition Piece Between a Square Tube and a Rectangular Tube with Triangulation

Structural & Thermal Analysis Using the ANSYS Workbench Release 12.1 Environment

AQA GCSE Maths - Higher Self-Assessment Checklist

Publication Number spse01695

Piping Design. Site Map Preface Getting Started Basic Tasks Advanced Tasks Customizing Workbench Description Index

ME 111: Engineering Drawing. Geometric Constructions

Strategy. Using Strategy 1

CSC418 / CSCD18 / CSC2504

Assembly Modeling & Assembling Parts

Using Geometric Constraints to Capture. design intent

Curriki Geometry Glossary

1.2 Numerical Solutions of Flow Problems

Curve and Surface Basics

Course Number: Course Title: Geometry

Chapter 6. Concept Modeling. ANSYS, Inc. Proprietary Inventory # May 11, ANSYS, Inc. All rights reserved.

7 Fractions. Number Sense and Numeration Measurement Geometry and Spatial Sense Patterning and Algebra Data Management and Probability

A Comprehensive Introduction to SolidWorks 2011

Geometry I Can Statements I can describe the undefined terms: point, line, and distance along a line in a plane I can describe the undefined terms:

Data Representation in Visualisation

Ch 22 Inspection Technologies

Advances in MicroStation 3D

An Introduction to Autodesk Inventor 2013 and AutoCAD

ME COMPUTER AIDED DESIGN COMPUTER AIDED DESIGN 2 MARKS Q&A

Ohio Tutorials are designed specifically for the Ohio Learning Standards to prepare students for the Ohio State Tests and end-ofcourse

Suggested Foundation Topics for Paper 2

Feature-Based Modeling and Optional Advanced Modeling. ENGR 1182 SolidWorks 05

SOLIDWORKS 2016: A Power Guide for Beginners and Intermediate Users

Supporting planning for shape, space and measures in Key Stage 4: objectives and key indicators

Maths Year 11 Mock Revision list

GDL Toolbox 2 Reference Manual

Topology and Boundary Representation. The ACIS boundary representation (B-rep) of a model is a hierarchical decomposition of the model s topology:

Edexcel Linear GCSE Higher Checklist

Modeling a Gear Standard Tools, Surface Tools Solid Tool View, Trackball, Show-Hide Snaps Window 1-1

An Introduction to Autodesk Inventor 2012 and AutoCAD Randy H. Shih SDC PUBLICATIONS. Schroff Development Corporation

The radius for a regular polygon is the same as the radius of the circumscribed circle.

Chapter 9 3D Modeling

Precalculus, Quarter 2, Unit 2.1. Trigonometry Graphs. Overview

Interactive Math Glossary Terms and Definitions

INSTRUCTIONS FOR THE USE OF THE SUPER RULE TM

Mathematics High School Geometry An understanding of the attributes and relationships of geometric objects can be applied in diverse contexts

Mathematics High School Geometry

25. How would you make the octahedral die shown below?

Structural & Thermal Analysis using the ANSYS Workbench Release 11.0 Environment. Kent L. Lawrence

Big Mathematical Ideas and Understandings

Scheme of Work Form 4 (Scheme A)

Introduction to ANSYS DesignModeler

SOLIDWORKS - SYLLABUS

Transcription:

CAD/CAM Dr. Ibrahim Al-Naimi Chapter two Computer Aided Design (CAD)

The information-processing cycle in a typical manufacturing firm. PRODUCT DESIGN AND CAD Product design is a critical function in the production system. The quality of the product design (i.e., how well the design department does its job) is probably the single most important factor in determining the commercial success and societal value of a product. If the product design is poor, no matter how well it is manufactured. If the product design is good, there is still the question of whether the product can be produced at sufficiently low cost to contribute to the company's profits and success. Let us begin our discussion of product design by describing the general process of design. 2

The Design Process The process of designing something is characterized as an interactive procedure, which consists of six identifiable steps or phases:. Recognition of need. 2. Definition of problem. 3. Synthesis. 4. Analysis and optimization. 5. Evaluation. 6. Presentation. 3

The Design Process Recognition of need involves the realization by someone that a problem exists for which some corrective action can be taken in the form of a design solution. This recognition might mean identifying some deficiency in a current machine design by an engineer. Problem definition involves a thorough specification of the item to be designed. This specification includes the physical characteristics, function, cost, quality, and operating performance. The Design Process Synthesis and analysis are closely related and highly interactive in the design process. Consider the development of a certain product design: Each of the subsystems of the product must be conceptualized by the designer, analyzed, improved through this analysis procedure, redesigned, analyzed again, and so on. The process is repeated until the design has been optimized within the constraints imposed on the designer. The individual components are then synthesized and analyzed into the final product in a similar manner. 4

The Design Process Evaluation is concerned with measuring the design against the specifications established in the problem definition phase. This evaluation often requires the fabrication and testing of a prototype model to assess operating performance, quality, reliability, and other criteria. The final phase in the design procedure is the presentation of the design. Presentation is concerned with documenting the design by means of drawings, material specifications, assembly lists, and so on. In essence, documentation means that the design data base is created. Application of Computers in Design Computer-aided design (CAD) is defined as any design activity that involves the effective use of the computer to create, modify, analyze, or document an engineering design. CAD is most commonly associated with the use of an interactive computer graphics system, referred to as a CAD system. There are several good reasons for using a CAD system to support the engineering design function: 5

Application of Computers in Design Fundamental reasons for implementing CAD system:. To increase the productivity of the designer. This is accomplished by helping the designer to conceptualize the product and its components. In turn, this helps reduce the time required by the designer to synthesize, analyze, and document the design. Application of Computers in Design Fundamental reasons for implementing CAD system: 2. To improve the quality of design. The use of a CAD system with appropriate hardware and software capabilities permits the designer to do a more complete engineering analysis and to consider a larger number and variety of design alternatives. The quality of the resulting design is thereby improved. 6

Application of Computers in Design Fundamental reasons for implementing CAD system: 3. To improve documentation The graphical output of a CAD system results in better documentation of the design than what is practical with manual drafting. The engineering drawings are superior, and there is more standardization among the drawings, fewer drafting errors, and greater legibility. Application of Computers in Design Fundamental reasons for implementing CAD system: 4. To create a data base for manufacturing. In the process of creating the documentation for the product design (geometric specification of the product, dimensions of the components, materials specifications, bill of materials, etc.), much of the required data base to manufacture the product is also created. 7

Application of Computers in Design The design related tasks performed by CAD system are:. Geometric modeling. 2. Engineering analysis. 3. Design review and evaluation. 4. Automated drafting. 8

Geometric Modeling Geometric modeling involves the use of a CAD system to develop a mathematical description of the geometry of an object. The mathematical description, called a geometric model, is contained in computer memory. This permits the user of the CAD system to display an image of the model on a graphics terminal and to perform certain operations on the model. These operations include creating new geometric models from basic building blocks available in the system, moving the images around on the screen, zooming in on certain features of the image, and so forth. These capabilities permit the designer to construct a model of a new product (or its components) or to modify an existing model. Geometric Modeling There are various types of geometric models used in CAD. One classification distinguishes between twodimensional (2-D) and three-dimensional (3-D) models. Two-dimensional models are best utilized for design problems in two dimensions, such as flat objects and layouts of buildings. In the first CAD systems developed in the early 97s, 2-D systems were used principally as automated drafting systems. They were often used for 3-D objects, and it was left to the designer or draftsman to properly construct the various views of the object. Three-dimensional CAD systems are capable of modeling an object in three dimensions. The operations and transformations on the model are done by the system in three dimensions according to user instructions. This is helpful in conceptualizing the object since the true 3-D model can be displayed in various views and from different angles. 9

Geometric Modeling Geometric models in CAD can also be classified as being either wire-frame models or solid models. A wire-frame model uses interconnecting lines (straight line segments) to depict the object as illustrated in the following Figure (a). Wire-frame models of complicated geometries can become somewhat confusing because all of the lines depicting the shape of the object are usually shown, even the lines representing the other side of the object. Techniques are available for removing these so called hidden lines, but even with this improvement, wire-frame representation is still often inadequate. Geometric Modeling Solid models are a more recent development in geometric modeling. In solid modeling, Figure (b), an object is modeled in solid three dimensions, providing the user with a vision of the object very much like it would be seen in real life. More important for engineering purposes, the geometric model is stored in the CAD system as a 3-D solid model, thus providing a more accurate representation of the object. This is useful for calculating mass properties, in assembly to perform interference checking between mating components, and in other engineering calculations.

Engineering Analysis After a particular design alternative has been developed, some form of engineering analysis often must be performed as part of the design process. The analysis may take the form of stress-strain calculations, heat transfer analysis, or dynamic simulation. The computations are often complex and time consuming, and before the advent of the digital computer, these analyses were usually greatly simplified or even omitted in the design procedure. The availability of software for engineering analysis on a CAD system greatly increases the designer's ability and willingness to perform a more thorough analysis of a proposed design. The term computer-aided engineering (CAE) is often used for engineering analyses performed by computer. Examples of engineering analysis software in common use on CAD systems include:

Engineering Analysis Mass properties analysis, which involves the computation of such features of a solid object as its volume, surface area, weight, and center of gravity. It is especially applicable in mechanical design. Interference checking Tolerance analysis Engineering Analysis Finite element analysis. Software for finite element analysis (FEA), also known as finite element modeling (FEM), is available for use on CAD systems to aid in stress strain, heat transfer, fluid flow, and other engineering computations. Finite element analysis is a numerical analysis technique for determining approximate solutions to physical problems described by differential equations that are very difficult or impossible to solve. In FEA, the physical object is modeled by an assemblage of discrete interconnected nodes (finite elements), and the variable of interest (e.g., stress, strain, temperature) in each node can be described by relatively simple mathematical equations. By solving the equations for each node, the distribution of values of the variable throughout the physical object is determined. 2

Engineering Analysis Kinematic and dynamic analysis. Kinematic analysis involves the study of the operation of mechanical linkages to analyze their motions. A typical kinematic analysis consists of specifying the motion of one or more driving members of the subject linkage, and the resulting motions of the other links are determined by the analysis package. Dynamic analysis extends kinematic analysis by including the effects of the mass of each linkage member and the resulting acceleration forces as well as any externally applied forces. Design Evaluation and Review Design evaluation and review procedures can be augmented by CAD. Some of the CAD features that are helpful in evaluating and reviewing a proposed design include: Automatic dimensioning routines that determine precise distance measures between surfaces on the geometric model identified by the user. Error checking. This term refers to CAD algorithms that are used to review the accuracy and consistency of dimensions and tolerances and to assess whether the proper design documentation format has been followed. 3

27 Standards for dimensioning A drawing is expected to convey a complete description of every detail of a part. However, dimensioning is as important as the geometric information. According to the American National Standards Institute (ANSI) standards, the following are the basic rules that should be observed in dimensioning any drawing:. Show enough dimensions so that the intended sizes and shapes can be determined without calculating or assuming any distances. 2. State each dimension clearly, so that it can be interpreted in only one way. 3. Show the dimensions between points, lines, or surfaces that have a necessary and specific relation to each other or that control the location of other components or mating parts. Standards for dimensioning 4. Select and arrange dimensions to avoid accumulations of tolerances that may permit various interpretations and cause unsatisfactory mating of parts and failure in use. 5. Show each dimension only once. 6. Where possible, dimension each feature in the view where it appears in profile, and where its true shape appears. 4

Conventional tolerance Since it is impossible to produce the exact dimension specified, a tolerance is also used to show the acceptable variation in a dimension. The higher the quality a product has, the smaller the tolerance value specified. Tighter tolerances are translated into more careful production procedures and more precise inspection. There are two types of tolerances: bilateral tolerance and unilateral tolerance (as shown in the following Figure). Unilateral tolerances,. such as..5, specify dimensional variation from the basic size (i.e., decrease) in one direction in relation to the basic size; for. example,..5.95. The basic location where most dimension lines originate is the reference location (datum). For machining, the reference location provides the base from which all other measurements are taken. By stating tolerance from a reference location, cumulative errors can be eliminated. Conventional tolerance 5

Conventional tolerance - Most mechanical parts contain both working surfaces and nonworking surfaces. Working surfaces are those for items such as bearings, pistons, and gear teeth, for which optimum performance may require control of the surface characteristics. Nonworking surfaces, such as the exterior walls of an engine block, crankcase, or differential housings, seldom require surface control. For surfaces that require surface control, control surface symbols can be used. - In the symbol, several surface characteristics are specified. The roughness height is the roughness value as normally related to the surface finish. It is the average amount of irregularity above or below an assumed centerline. It is expressed in micro inches or, in metric system, in micrometers. Conventional tolerance Surface control symbols 6

Dimensioning TOLERANCE 7

TOLERANCE. Check that the tolerance & dimension specifications are reasonable for assembly. 2. Check there is no over or under specification. TOLERANCE 8

TOLERANCE TOLERANCE GRAPH 9

CAD Systems Architecture Modeling objects The model of an engineering object consists of geometry, topology, and auxiliary information. Geometry includes points, lines, circles, planes, cylinders and other surfaces. It defines the basic shape characteristics. Topology represents the relationships of the geometry of an object. In addition to its shape, an engineering object also possesses some other attributes. Dimensions, tolerances, and surface finish are some important attributes. CAD Systems Architecture Functions of CAD Systems CAD is a tool not only to represent an engineering model, but also to manipulate it. To construct or display a model, geometric transformations and view transformations are needed. 2

Modeling Many properties of products have to be modeled, including form, dimension, tolerance and structure. In all of these areas geometry, images and spatial manipulation are very important. For this reason, CAD is founded on computational geometry and computer graphics. Defining the Model Representation of Models There are two types of models: Models of form typically represented by drawings of components and their arrangement in assemblies. Models of structure normally represented by diagrams that show the components of a system and how they are connected. 2

Defining the Model The representation of form using drawings The technique of representing three-dimensional forms in two-dimensional space by means of engineering drawings -on paper or on a computer screen- is formally known as descriptive geometry. Defining the Model The representation of structure using diagrams In engineering diagrams the logical or physical structure of a system, in terms of the assembly of the primitive parts and the relationship between these, is shown by a series of symbols joined by connections. The rules for the symbols, and for the connections, are governed by conventions that have been established in standards. 22

Defining the Model Examples of Electrical and Fluid Power Symbols Defining the Model Block Diagrams At an early stage in the design process it may only be possible to define overall relationships between parts of a system, and a block diagram may be most appropriate. As a design is prepared for construction and manufacture, detailed wiring or piping diagrams are required. 23

Defining the Model Block diagram of injection system Defining the Model Top-Down Design By exploiting representations such as block diagrams, the designer is able to subdivide a design problem into smaller elements. These in turn may be subdivided, such that a hierarchical decomposition of the problem is obtained. This technique is known as "top-down" design. 24

Defining the Model Example: Top-Down Design A hierarchical arrangement of diagrams Defining the Model computer representation of drawings and diagrams Defining the graphic elements The user has a variety of different ways to call a particular graphic element and position it on the geometric model. There are several ways of defining points, lines, arcs, and other components of geometry through interaction with the ICG (interactive computer graphics) system. These components are maintained in the database in mathematical form and referenced to a 3D coordinate system. 25

Defining the Model Basic geometry A component must be modeled before it can be drawn. Defining the Model Methods of defining elements in interactive computer graphics Points Methods of defining points in computer graphics include:. Pointing to the location on the screen by means of cursor control. 2. Entering the coordinates via the alphanumeric keyboard. 3. Entering the offset (distance in x, y, and z) from a previously defined point. 4. The intersection of two lines. 26

Defining the Model Defining the Model Lines Methods of defining lines include:. Using two previously defined points. 2. Using one point and specifying the angle of the line with the horizontal. 3. Using a point and making the line either normal or tangent to a curve. 4. Using a point and making the line either parallel or perpendicular to another line. 5. Making the line tangent to two curves. 6. Making the line tangent to a curve and parallel or perpendicular to a line. 27

Defining the Model Defining the Model Arcs and circles Methods of defining arcs and circles include:. Specifying the center and the radius. 2. Specifying the center and a point on the circle. 3. Making the curve pass through three previously defined points. 4. Making the curve tangent to two lines. 5. Specifying the radius and making the curve tangent to two lines or curves. 28

Defining the Model Defining the Model The curves and the surfaces should be discussed at notebook 29

Fundamentals of Solid Modeling Fundamentals of Solid Modeling 3

Fundamentals of Solid Modeling Fundamentals of Solid Modeling 3

Fundamentals of Solid Modeling Fundamentals of Solid Modeling 32

Fundamentals of Solid Modeling Fundamentals of Solid Modeling 33

Fundamentals of Solid Modeling Fundamentals of Solid Modeling 34

Fundamentals of Solid Modeling Fundamentals of Solid Modeling 35

Fundamentals of Solid Modeling Constructive Solid Geometry 36

Fundamentals of Solid Modeling Constructive Solid Geometry 37

Fundamentals of Solid Modeling Constructive Solid Geometry 38

Constructive Solid Geometry Constructive Solid Geometry 39

Fundamentals of Solid Modeling Fundamentals of Solid Modeling Boundary Representations Objects are rep. by a collection of bounding faces plus topological information, which defines relationship: Between faces, edges and vertices Hierarchy: Faces are composed of edges Edges are composed of vertices B-Reps are difficult to create but provide easy graphics interaction and display. 4

Fundamentals of Solid Modeling Boundary Representation A solid composed of faces, edges and vertices F5 F4 E5 E4 V4 E8 E3 E6 E7 V3 F2 V F3 E F V2 E2 Fundamentals of Solid Modeling B.Rep. Models 4

Fundamentals of Solid Modeling B.Rep. Model of Tetrahedron Fundamentals of Solid Modeling Validity of an Engineering Part or Object Polyhedron: a part which has flat or planar polygonal surfaces only. For the validity test of solids, Euler s formula can be used. For Polyhedrons without holes: (Number of faces) + (Number of vertices) = Number of edges +2 F+V = E+2, where F, E and V are number of faces, edges and vertices. 42

Fundamentals of Solid Modeling Validity of an Engineering Part or Object For Polyhedrons with through holes: F+V = E+2+R-2H, where R is the number of disconnected interior edge rings in faces, H is the number of holes in the body Fundamentals of Solid Modeling Validity of an Engineering Part or Object Example: Euler s formula F+V = E+2, F = 6, V = 8, E = 2 6 + 8 = 2 + 2 4 = 4 (valid object) 43

Fundamentals of Solid Modeling Validity of an Engineering Part or Object Example: Object with through-hole F+V = E+2+R-2H, F = (6 plus additional 4) V = 6, E = 24 R = 2 (as its through hole) H = + 6 = 24 +2 +2 2() 26 = 26 Fundamentals of Solid Modeling Validity of an Engineering Part or Object Example: Part with blind hole Formula check: F+V = E+2+R F = 6+5 = V = 6, E = 24 R = (as its blind hole) H = +6 = 24 +2 + 2() 27 = 27 44

Fundamentals of Solid Modeling Validity of an Engineering Part or Object Example: Part with Projection F + V = E +2 +R-2H F =(6 + 4 +) V = 6, E = 24, H = R = (at base of projection) F + V = E + 2 +R 2H +6 = 24 +2 +-2() 27 = 27 For 2 projections on a part, F=6, V=24, E=36, R=2, H= 6+24 = 36 +2+2 4 = 4 Fundamentals of Solid Modeling Validity of an Engineering Part or Object Example: Projection and Blind Hole F + V = E + 2 +R 2H F=5+ (from previous slide) =6 V=8+6=24 E=2+24=36 R=+ (at base of projection and top of hole) F+V = E+2+R-2H 6+24 = 36+2+2-2() 4 = 4 45

Fundamentals of Solid Modeling Validity of an Engineering Part or Object Example: Projection and Through Hole F + V = E + 2 +R 2H F=4+ (from previous slide) =5 V=8+6=24 E=2+24=36 R=+2 (at base of projection and top of hole) F+V = E+2+R-2H 5+24 = 36+2+3-2() 39 = 39 Fundamentals of Solid Modeling 46

Fundamentals of Solid Modeling Fundamentals of Solid Modeling 47

Fundamentals of Solid Modeling Fundamentals of Solid Modeling 48

Entry Manipulation and Data Storage Manipulation of the Model Manipulation Modification of drawings, erase unwanted parts, move some geometry around the drawing, or to copy some repeated detail. The facilities that typically provided for manipulation of the model: Four groups of functions: Entry Manipulation and Data Storage. Those that apply the transformations of translation, rotation and scaling to elements of the model (moving the geometry, copying the geometry to create one or more duplicate sets of entities in the data structure. 2. Those that allow the user to make changes to individual geometric elements to trim or extend them to their intersections with other elements. 3. Functions for the temporary or permanent deletion of entities from the model. 4. Miscellaneous functions that, for example, allow entities to be grouped together. 49

Entry Manipulation and Data Storage Transformations. Object transformations Object transformations mathematical operations of the manipulation. When the entities of a CAD model are manipulated by moving them around, or by taking one or more copies at different locations and orientations, we image the coordinate system to be stationary, and the object to move. Entry Manipulation and Data Storage Transformations 2. Coordinate system transformations we image the object to be stationary, and the coordinate system to move. Coordinate system transformations = Viewing transformation. 5

Entry Manipulation and Data Storage Transformations The main task: Define the new object (Transformed) How? [ P*] [ P][ T] where, [P*] [P] [T ] is the object new coordinates matrix (new object) is the object original coordinates matrix, or points matrix (original object) is the transformation matrix Transformations TRANSFORMATIONS The aim of these lectures and notes is to give an understanding of what is happening within CAD systems. By understanding how something works allows us to use it more effectively. 5

Transformations TRANSFORMATIONS CAD and Geometry The simplest CAD systems are 2D or 3D drafting tools. They allow geometry to be created, stored and manipulated. Example: A line might be stored as two points: L PP2 (x,y; x2y2) Or in matrix notation: P x y L P2 x2 y2 Where: P x y, P x y The graphical representation: 2 2 2 Transformations TRANSFORMATIONS CAD and Geometry Example: Representation of a Triangle: (in 2D ordinary coordinates) Graphical representation: P P x P2 x2 P 3 x3 y y 2 y 3 52

Transformations TRANSFORMATIONS CAD and Geometry In this format it is not easy to do matrix manipulation in 2D or 3D (which is what we want to do). Thus we want homogeneous coordinates. Homogeneous Coordinates: Presents a unified approach to describing geometric transformations. : Transformations Homogeneous Coordinates Assume a 2D point lies in 3D space. Any 2D point can be represented in such a 3D space as: P(x, y, z) = P(hx, hy, hz) That is, along a ray from the origin (called homogeneous space). 53

Transformations Homogeneous Coordinates For instance, consider point P(2, 4) in ordinary coordinates. This can be considered as: P(4, 8, 2), where h=2; or P(6, 2, 3), where h=3; or P(2, 4, ), where h= in homogeneous space. In general, P(m, n, h) in homogeneous space is P(m/h, n/h, ) in ordinary coordinates. Thus, the triangle in 2d space can be represented in homogeneous coordinates as: P x x x Why? To help with transformations. 2 3 y y y 2 3 Transformations TRANSFORMATIONS Transformation is the backbone of computer graphics, enabling us to manipulate the shape, size, and location of the object. It can be used to effect the following changes in a geometric object:. Change the location 2. Change the shape 3. Change the size 4. Rotate 5. Copy 6. Generate a surface from a line 7. Generate a solid from a surface 8. Animate the object 54

Transformations Types of transformations. Modeling Transformation/ Object Transformation This transformation alters the coordinate values of the object. Basic operations are scaling, translation, rotation and combination of one or more of these basic transformations. Object transformation = Move (transform) an object in the 3D space. 2. Visual/ Viewing Transformation (Coordinate System Transformation) In this transformation there is no change in either the geometry or the coordinates of the object. A copy of the object is placed at the desired sight, without changing the coordinate values of the object. Coordinate system transformation = Move (transform) the coordinate system. View the objects from the new coordinate system. Transformations Examples 55

Transformations Examples Transformations Examples Coordinate System Transformation 56

Transformations Basic Modeling/Object Transformations Scaling, translation, and Rotation. Other transformations, which are modification or combination of any of the basic transformations, are Shearing, Mirroring, Copy, etc. Transformation can be expressed as: [ P*] [ P][ T] where, [P*] [P] [T ] is the new coordinates matrix is the original coordinates matrix, or points matrix is the transformation matrix Transformations Scaling 57

58 Transformations Scaling Or in matrix form: This is object scaling about the origin. If s x = s y uniform scaling Magnify command x ys y y xs x y x P y x P *, * *) *, *( ), ( * * * y x y x ys xs s s y x y x P Transformations Scaling. Uniform Scaling For uniform scaling, the scaling transformation matrix is given as: In ordinary 3D coordinate system: Here, s is the scale factor In homogeneous 3D coordinates: s s s T s ] [ ] [ s s s T s

59 Transformations Scaling 2. Non-Uniform Scaling Scaling transformation matrix in 3d ordinary coordinates: In 3d Homogeneous Coordinates: where,, are the scale factors for the x, y, and z coordinates of the object. z y x s s s s T ] [ ] [ z y x s s s s T z y x, s s s, Transformations Example: If the triangle A(, ), B(2, ), C(, 3) is scaled by a factor 2, find the new coordinates of the triangle. Solution: Writing the points (original) matrix in homogeneous 3D coordinates, we have 3 2 [P]

6 Transformations The scaling matrix is: The new points matrix can be evaluated by the equation: 2 2 2 ] [ s T ] ][ [ *] [ T P P 6 2 2 4 2 2 [P*] Transformations Translation Transformation

Transformations Translation Transformation x* x x y* y y Or in matrix form (homogeneous coordinates): P* x * y * x y x y You can now see that homogeneous coordinates are needed for translation transformation. This is what the Move command does in CAD systems. Transformations Translation Transformation In translation, every point on an object translates exactly the same distance. The effect of translation transformation is that the original coordinate values increase or decrease by the amount of the translation along the x, y, and z-axes. The translation transformation matrix has the form: In 3D Homogeneous Coordinates: [ T t ] x y z where x, y, z are the values of translation in the x, y, and z direction, respectively. For translation transformation, the matrix equation is: [ t P*] [ P][ T ] 6

Transformations Translation Transformation Example: Translate the rectangle (2, 2), (2, 8), (, 8), (, 2) 2 units along x-axis and 3 units along y-axis. Solution: Using the matrix equation for translation, we have: [ t P*] [ P][ T ] Substituting the numbers, we get 2 2 [P*] 2 8 8 2 2 3 4 4 2 2 5 5 Note that the resultant coordinates are equal to the original x and y values plus the 2 and 3 units added to these values, respectively. Transformations Rotation We will first consider rotation about the z-axis, which passes through the origin (,, ), since it is the simplest transformation for understanding the rotation transformation. Rotation about an arbitrary axis, other than an axis passing through the origin, requires a combination of three or more transformations. When an object is rotated about the z-axis, all the points on the object rotate in circular arc, and the center of the arc lies at the origin. Similarly, rotation of an object about an arbitrary axis has the same relationship with the axis, i.e., all the points on the object rotate in circular arc, and the center of rotation lies at the given point through which the axis is passing. 62

Transformations Rotation Derivation of the Rotation Transformation Matrix Original coordinates of point P: x r cos, y r sin Transformations Rotation Derivation of the Rotation Transformation Matrix The new coordinates: x* r cos( ), y* r sin( ) Using the trigonometric relations, we get: cos( ) cos cos sin sin sin( ) sin cos cos sin We get: x* r(cos cos sin sin ) xcos ysin y* r(cos sin sin cos ) xsin y cos In matrix form: cos sin sin x * y * x y cos 63

64 Transformations Rotation Derivation of the Rotation Transformation Matrix In general, the points matrix and the transformation matrix are re-written as (For 2D objects): [In Homogeneous Coordinates] OR: cos sin sin cos * * y x y x cos sin sin cos * * y x y x Transformations Rotation Derivation of the Rotation Transformation Matrix For 3D geometry: Rotation about z-axis cos sin sin cos * * * z y x z y x

Transformations Rotation Derivation of the Rotation Transformation Matrix Transformation matrix for rotation about y-axis: T R y cos sin sin cos Transformations Rotation Derivation of the Rotation Transformation Matrix Translation matrix for rotation about x-axis: T R x cos sin sin cos 65

Transformations Rotation Derivation of the Rotation Transformation Matrix For use with 2D geometry: x y, [ P*] x * * [ P] y For use with 3D geometry: x y z, [ P*] x * y * * [ P] z This is what the Rotate command does in CAD system. Transformations Rotation of an Object about an Arbitrary Axis Rotation of a geometric model about an arbitrary axis, other than any of the coordinate axes, involves several rotational and translational transformations. When we rotate an object about the origin (in 2D), we in fact rotate it about z-axis. Every point on the object rotates along a circular path, with the center of rotation at the origin. If we wish to rotate an object about an arbitrary axis, which is perpendicular to the xy-plane, we will have to first translate the axis to the origin and then rotate the model, and finally, translate so that the axis of rotation is restored to its initial position. 66

Transformations Rotation of an Object about an Arbitrary Axis Thus, the rotation of an object about an arbitrary axis, involves three steps: Step : Translate the fixed axis so that it coincides with the z-axis Step 2: Rotate the object about the axis Step 3: Translate the fixed axis back to the original position (reverse translation) Note: When the fixed axis is translated, the object is also translated. The axis and the object go through all the transformations simultaneously. Transformations Rotation of an Object about an Arbitrary Axis Example: Rotate the rectangle (, ), (2, ), (2, 2), (, 2) shown below, 3 o ccw about its centroid and find the new coordinates of the rectangle. 67

Rotation of an Object about an Arbitrary Axis Rotation of an Object about an Arbitrary Axis 68

69 Rotation of an Object about an Arbitrary Axis Transformations Rotation about an Arbitrary Point (in xy-plane) In order to rotate an object about a fixed point, the point is first moved (translated) to the origin. Then, the object is rotated around the origin. Finally, it is translated back so that the fixed point is restored to its original position. For rotation of an object about an arbitrary point, the sequence of the required transformation matrices and the condensed matrix is given as: OR: where is the angle of rotation and the point (x, y) lies in the xy-plane. ] ][ ][ [ ] [ cond t r t T T T T cos sin sin cos [ cond ] y x y x T

7 Transformations Rotation about an Arbitrary Point (in xy-plane) Solution: We first translate the point (3, 2) to the origin, then rotate the rectangle about the origin, and finally, translate back so that the original point is restores to its original position (3, 2). The new coordinates of the rectangle are found as follows: These are the new coordinates of the rectangle after the rotation..63 2.63 2.37.63.87.77.3.77 2 3.866.5.5.866 2 3 3 3 2 2 ] ][ ][ ][ [ *] [ t r t T T T P P Transformations Mirroring (Reflection) In modeling operations, one frequently used operation is mirroring an object. Mirroring is a convenient method used for copying an object while preserving its features. The mirror transformation is a special case of a negative scaling, as will be explained below. Let us say, we want to mirror the point A(2, 2) about the x-axis (i.e., xz-plane). The point matrix [P*]=[2-2] can be obtained with the matrix transformation given below:

7 Transformations Mirroring (Reflection) The transformation matrix above is a special case of non-uniform scaling with s x = and s y =-. 2 2 2 2 *] [ P Transformations Mirroring (Reflection) Transformation Matrix for Mirroring about x-axis: Transformation Matrix for Mirroring about y-axis: x T m y T m

Transformations Mirroring about an Arbitrary Plane If mirroring is required about an arbitrary plane, other than one defined by the coordinate axes, translation and/or rotation can be used to align the given plane with one of the coordinate planes. After mirroring, translation or rotation must be done in reverse order to restore the original geometry of the axis. We will use the figure shown below, to illustrate the procedure for mirroring an object about an arbitrary plane. We will mirror the given rectangle about a plane passing through the line AB and perpendicular to xyplane. Transformations Mirroring about an Arbitrary Plane 72

Transformations Mirroring about an Arbitrary Plane It should be noted that in each of the transformations, the plane and the rectangle have a fixed relationship, i.e., when we move the plane (or line AB), the rectangle also moves with it. Note: We are using line AB to represent the plane, which passes through it. Mirroring can be done only about a plane, and not about a line. Transformations Mirroring about an Arbitrary Plane Procedure for mirroring the rectangle about the plane: Step : Translate the line AB (i.e., the plane) such that it passes through the origin, as shown by the dashed line. Step 2: Next, rotate the line about the origin (or the z-axis) such that it coincides with x or y axes (we will use the x-axis). Step 3: Mirror the rectangle about the x-axis. Step 4: Rotate the line back to its original orientation. Step 5: Translate the line back to its original position The new points matrix, in terms of the original points matrix and the five transformation matrices is given as: [P*] = [P][T t ][T r ][T m ][T -r ][T -t ] Where, the subscripts t, r, and m represent the translation, rotation, and mirror operations, respectively. Note: A negative sign is used in the subscripts to indicate a reverse transformation. 73

74 Transformations Coordinate System Transformation Coordinate frame moves to a new location. Transformations Coordinate System Transformation The origin has been translated (moved) from (,, ) to (a, b, c) Or: For coordinate system: For the object: z y x P c z b y a x,, c z b y a x,, ] ][ [ *] [ T P P c b a T t

Transformations Coordinate System Transformation [ P*] x a y b z c Note: The sign in the T matrix need to be changed Transformations Example: Coordinate Transformation If the coordinate system has been rotated about z-axis by -3 o, then translated to [a b c], what is the coordinates of the point [x y z] in the new coordinate system? 75

76 Transformations Example: Coordinate Transformation Solution: * * * cos 3 sin 3 sin 3 cos 3 *] [ z y x c b a z y x P o o o o