Wednesday, January 26, 2011

Projection

1.   A 3D projection is a mathematical process to project a series of 3D shapes to a 2D surface, usually a computer monitor.
2.   Projection of a solid object is just like getting a shadow of the object on a plane.


There are two basic Projection Method:
  1. Parallel Projection.
  2. Perspective Projection.

Parallel Projection: In Parallel Projection, coordinate positions are transformed to the view plane along parallel lines. A parallel projection preserves relative proportion of objects, and this is the method used in drafting to produce scale drawing of three-dimensional objects.
Accurate views of the various sides of an object are obtained with a parallel projection, but this does not give us realistic representation of the appearance of a three dimensional object.
     
Perspective Projection: In Perspective Projection object positions are transformed to the view plane along lines that converge to a point called the projection reference point or center of projection. A perspective projection produces realistic views but does not preserve relative proportions. Projection of distant objects are smaller than the projection of objects of the same size that are closer to the projection plane.

                                    
For more details visit: http://www.gurukpo.com/
                                

Tuesday, January 11, 2011

Computer Graphics

Tuesday, January 11, 2011

Transformtaion

A transformation is the process of mapping points to other locations.
Common transformations are:
1. Translation.
2. Scaling
3. Rotation

Translation

In translation an object is displaced a given distance and direction from its original position. If the displacement is given by the vector v = txI + tyJ, the new object point P'(x', y') can be found by applying the transformation Tv to P(x, y). See the figure below

P' = Tv(P)
where x' = x + tx and y' = y + ty.


As an example, consider a triangle defined by three vertices (20,0), (60, 0), and (40, 100) being translated 100 units to the right along the x-axis ( tx = 100) and 10 units up along the y-axis (ty = 10). The new vertices are (120, 10), (160, 10), and (140, 110), see figure below:

Scaling

Scaling is the process of expanding or compressing the dimensions of an object. Positive scaling constants Sx and Sy are used to describe changes in length with respect to the x direction and y direction. A scaling constant > 1 creates an expansion (magnification) of length, and < 1 a compression (reduction) of length. Scaling occurs along the x-axis and y-axis to create a new point from the original. This is achieved using the following transformation:
P' = TSx,Sy (P),
where x' = Sx * x ,and y' = Sy * y

If Sx and Sy are not equal, they have the effect of distorting pictures by elongating or shrinking them along the directions parallel to the coordinate axes. The mirror image of an object can be generated by using the negative values for Sx and Sy.

Rotation

In rotation, the object is rotated ø° about the origin. The convention is that the direction of the rotation is CCW if ø is a positive angle and CW if the ø is a negative angle. The transformation for rotation Rø is
P' = Rø(P)
where x' = x cos(ø) - y sin(ø) and y' = x sin(ø) + y cos(ø)


For example a triangle (20,0), (60,0), (40,100) rotated 45° clockwise about the origin is (14.14, -14.14), (42.43, -42.43), (98.99, -42.43)

For more details Visit: http://www.gurukpo.com/