Documentos de Académico
Documentos de Profesional
Documentos de Cultura
2D Transformations
World Coordinates
Translate
Rotate
Scale
Viewport Transforms
Putting it all together
Transformations
Rigid Body Transformations - transformations
that do not change the object.
Translate
If you translate a rectangle, it is still a
rectangle
Scale
If you scale a rectangle, it is still a rectangle
Rotate
If you rotate a rectangle, it is still a rectangle
Vertices
We have always represented vertices
as (x,y)
An alternate method is:
Example:
x
( x, y )
y
2.1
(2.1,4.8)
4
.
8
Matrix * Vector
x' a b x
y ' c d y
x' ax by
y ' cx dy
1 0
I
0
1
x' a b c
y ' d e f
z ' g h i
x' ax by cz
y ' dx ey fz
z ' gx hy iz
1 0 0
I 0 1 0
0 0 1
x
y
z
2D geometric transformation
TRANSLATION
A translation is applied to an object by repositioning it along a straight line
path from one coordinate location to another. We translate a twodimensional point by adding translation distances, x and y, to the
original
coordinate
position(x,y) to
move
the
point
to
new
Translation
Translation - repositioning an object
along a straight-line path (the
translation distances) from one
coordinate location to another.
(x,y)
(tx,ty)
(x,y)
TRANSLATION
TRANSLATION
Translation of an object
Fig illustrate a translation of triangle about orgin.When the
object is to be moved, all points of it are to be translated.The
translation of key points and connection of these points by other
geometric entities like lines,arcs.etc.
Fig illustrates original position and new positions of the triangle ABC after translation
Translation
Given:
We want:
P ( x, y )
T (t x , t y )
x' x t x
y' y t y
P (3.7,4.1)
T (7.1,8.2)
x' 3.7 7.1
y ' 4.1 8.2
x' 3.7 7.1
y ' 4.1 8.2
x' 3.4
y ' 4.1
SCALING
Scaling is a kind of transformation in which the size of an object is
changed. Remember the change is size does no mean any change in shape.
This kind of transformation can be carried out for polygons by multiplying
each coordinate of the polygon by the scaling factor. Sx and Sywhich in
turn produces new coordinate of (x,y) as (x',y'). The equation would look
like
Or
SCALING
If the values of scaling factor are greater than 1 then the object is enlarged
and if it is less that 1 it reduces the size of the object. Keeping value as 1
does not changes the object.
SCALING
SCALING
ROTATION
A two-dimensional rotation is applied to an object by
repositioning it along a circular path in the x-y plane. When we
generate a rotation we get a rotation angle ()and the position
about which the object is rotated (xr, yr) this is known
as rotation point or pivot point. The transformation can also be
described as a rotation about rotation axis that is perpendicular
to x-yplane and passes through the pivot point. Positive values
for the rotation angle define counter-clockwise rotations about
the pivot point and the negative values rotate objects in the
clockwise direction.
2D Rotation
yr
xr
2D Rotation
x 0, y 0
r
x r cos ,
x x cos y sin
y x sin y cos
( x' , y ' )
r
y r sin
( x, y )
cos sin
R
sin cos
P R P
Simplify: rotate around origin:
2D Rotation
x x r ( x x r ) cos ( y y r ) sin
y y r ( x x r ) sin ( y y r ) cos
2D Rotation
4
3
2
1
0
1
10
Rotation of a point about the origin: Consider the rotation of a point from its initial
position P(x,y) by an angle about the origin, as shown in fig. the counterclockwise
rotation is considered as positive and clockwise rotation as negative .
P = R . P
COS
-SIN
SIN
COS
COS
SIN
-SIN COS
COS
-SIN
SIN
COS
Reflection
Reflection
Homogeneous Representation
Scaling and Rotation matrices are in the form of matrix multiplication and the
translation takes the form of vector addition.
To concatenate the transformations, all the transformation matrices should be
multiplied.
If a point has Cartesian coordinates (x,y,z), the homogenous coordinates are
(x,y,z,1) where h is the scale factor. The relation between Cartesian and
homogeneous coordinates:
x = x/h, y = y/h, z = z/h
For the geometric transformations, the scale factor h is taken as unity to
avoid unnecessary division.
If a point has Cartesian coordinates (x,y), the homogeneous coordinates are
(x,y,h)
Homogeneous Representation
The Homogeneous Representation of basic transformation is given below:
3D Translation
3D Translation of
an object
Homogeneous
coordinates is given by
Translation Matrix is
given by
3D Scaling
If the scaling factor parameter are Sx,Sy,Sz
along x-,y-,z-directions respy,then the new
coordinates of a point on the scaled object is
given by
3D Scaling
3D Point
x
y
z
x
y
P
z
1
x
y
z
1
3D Coordinate Systems
3D Transformation
In homogeneous coordinates, 3D
transformations are represented by 44
matrixes:
a
d
e
h
0
f
i
0
1
x
HOMOGENEOUS COORDINATES
Translation
transformation
Rotationtransformation
Scalingtransformation
3D Translation
3D Translation
1
0
0
1
0
0
0
0
0
0
1
0
tx
t y
tz
P T P
x
y
z
1
3D Translation
3D Translation
x, y , z
T t x , t y , t z
Inverse Translation:
T (t , t , t ) T ( t ,t ,t )
1
3D Rotation
3D Rotation
3D Rotation
GEOMETRIC MODELING
The geometric modeling is the computer compatible mathematical
description of
the geometry of the object.
The mathematical description allows the image of the object to be
displayed and
manipulated on the computer screen and also it can be stored in the
memory and
retrieved back and displayed on the computer screen whenever required.
The geometric modeling can be classified into
1. Wire frame modeling.
2. Surface modeling
3. Solid modeling
Wireframe Models
A wireframe model consist of points and curves only, and looks as if its
made up with a bunch of wires. This is the simplest CAD model of an
object. Advantages of this type of model include ease of creation and low
level hardware and software requirements. Additionally, the data storage
requirement is low. The main disadvantage of a wireframe model is that it
can be very confusing to visualize. For example, a blind hole in a box may
look like a solid cylinder, as shown in the figure. In spite of its ambiguity, a
wireframe model is still the most preferred form, because it can be created
quickly and easily to verify a concept of an object. The wireframe model
creation is somewhat similar to drawing a sketch by hand to communicate or
conceptualize an object. As stated earlier, a wireframe model is created
using points and curves only.
Advantages
1. Wire frame models are simple and easy to create, with little
computer time and memory.
2. Wire frame model form the basis for surface model.
3. CPU time required to retrieve, edit or update a wire frame model is
usually small compared with surface or solid models.
Wire frame modeling can be considered as extension of
computer aided drafting.
Wire frame models provide accurate information about the
location of surface discontinuity on the part.
It can be used as a basis for automatic generation of cutter paths
to drive NC machine tool to manufacture component.
Disadvantages
Disadvantages
2. Without hidden line removal object become clumsy and difficult to
understand the object.
3. Calculation of section properties and mass properties are impossible.
4. It has limited use in manufacturing and analysis.
5. Presentation of circular holes and curved surfaces are poor.
6. Interference checking will be difficult.
SURFACE MODELING
Sculptured surface
Plane surface.
Ruled (lofted) surface.
Surface of revolution.
Tabulated surface.
Bezier surface
B-spline surface
coons patch
Fillet surface.
Offset surface.
SURFACE MODELING
Plane surface:
SURFACE MODELING
Surface of revolution:
Tabulated surface:
SURFACE MODELING
Offset surface:
B-spline surface:
SOLID MODELING
Out of which two basic approaches are important from our subject point of
view.
They are
(1) Constructive solid geometry (CSG).
(2) Boundary representation (B-rep.)
Here, directed graph (Binary tree) scheme is used to store the model
in the data structure. The general form of the tree-type data structure
used in CSG approach is shown in fig 3.18.
Fig 3.18 General tree type data structure
Any node may have one parent node and two-child node. The root
node (R) has no parent and leaf node (L) has no children.
Advantages:
1. Since, the data to be stored are less, memory required will be less.
2. Create fully valid geometrical solid model.
3. Complex shapes may be developed relatively quicker with the
available set of primitives.
4. Less skill is enough.
Disadvantages:
1. More computational effort and time are required whenever the
model is to be displayed in the screen.
2. Getting fillet, chamfer and taperness in the model is very
difficult.
This approach is widely used in most of solid modelers. The solid model
created by using B- rep technique may be stored in graph based on data
structure system. This is illustrated with an simple example of tetrahedron
shown in fig
Elements of topology
Advantages:
1. Computational effort and time required to display the model are
less compared with CSG.
2. Combining wire frame and surface model are possible.
3. Complex engineering objects can be modeled very easily compared
with CSG.
4. Since the topology and geometry are treated separately,
incorporating new geometries in the existing model is easy.
5. It is particularly suitable for modeling part having internal
symmetry.
Disadvantages:
1. The data to be stored is more and hence it requires more memory.
2. Some times geometrically valid solids are not possible.