Overview of Transformations (18 marks) In many applications, changes in orientations, size, and shape are accomplished with

Size: px
Start display at page:

Download "Overview of Transformations (18 marks) In many applications, changes in orientations, size, and shape are accomplished with"

Transcription

1 Two Dimensional Transformations In many applications, changes in orientations, size, and shape are accomplished with geometric transformations that alter the coordinate descriptions of objects. Basic geometric transformations are: These are most useful and most commonly used. Translation (Position Rotation (Orientation) Scaling (Size) Other transformations: These transformations are useful in certain applications. Reflection (Mirror) Shear (Size) 2D Translation: - Moves points to new locations by adding translation amounts to the coordinates of the points. Initial Position point P (x, y) The new point P (x, y ) Where, x = x + tx y = y + ty tx and ty is the displacement in x and y respectively. The translation pair (tx, ty) is called a translation vector or shift vector.

2 Matrix representation OR P = P + T PROGRAM: Write a program for 2D Translation of a Triangle. #include<stdio.h> #include<conio.h> #include<graphics.h> #include<process.h> #include<math.h> int x1,y1,x2,y2,x3,y3,mx,my; void draw(); void tri(); void main() int gd=detect,gm; int c; initgraph(&gd,&gm,"c:\\turboc3\\bgi "); printf("enter the 1st point for the triangle:"); scanf("%d%d",&x1,&y1); printf("enter the 2nd point for the triangle:"); scanf("%d%d",&x2,&y2); printf("enter the 3rd point for the triangle:"); scanf("%d%d",&x3,&y3); cleardevice(); draw(); getch(); tri(); getch(); void draw() line(x1,y1,x2,y2);

3 line(x2,y2,x3,y3); line(x3,y3,x1,y1); void tri() int x,y,a1,a2,a3,b1,b2,b3; printf("enter the Transaction coordinates"); scanf("%d%d",&x,&y); cleardevice(); a1=x1+x; b1=y1+y; a2=x2+x; b2=y2+y; a3=x3+x; b3=y3+y; line(a1,b1,a2,b2); line(a2,b2,a3,b3); line(a3,b3,a1,b1); Rotation: Default rotation center: Origin (0,0) Rotation is applied to an object by repositioning it along a circular path in the xy plane. To generate a rotation, we specify Rotation angle θ Pivot point ( xr, yr) Positive values of θ for counterclockwise rotation Negative values of θ for clockwise rotation. (x,y) -> Rotate about the origin by θ" -> (x, y )

4 x = r cos (φ) y = r sin (φ) x = r cos (φ + θ) y = r sin (φ + θ) x = r cos (φ + θ) = r cos(φ) cos(θ) r sin(φ) sin(θ) = x cos(θ) y sin(θ) y = r sin (φ + θ) = r sin(φ) cos(θ) + r cos(φ)sin(θ) = y cos(θ) + x sin(θ) So, x = x cos(θ) y sin(θ) and y = y cos(θ) + x sin(θ) Representing the above equation in matrix form, OR Where R is the rotation matrix P = P. R For positive rotation angle, we can use the above rotation matrix. However, for negative angle rotation, the matrix will change as shown below Program:

5 Write a program for 2D Rotation of a Triangle #include<stdio.h> #include<conio.h> #include<graphics.h> #include<process.h> #include<math.h> void triangle(int x1,int y1,int x2,int y2,int x3,int y3); void Rotate(int x1,int y1,int x2,int y2,int x3,int y3); void main() int gd=detect,gm; int x1,y1,x2,y2,x3,y3; initgraph(&gd,&gm,"c:\\turboc3\\bgi"); printf("enter the 1st point for the triangle:"); scanf("%d%d",&x1,&y1); printf("enter the 2nd point for the triangle:"); scanf("%d%d",&x2,&y2); printf("enter the 3rd point for the triangle:"); scanf("%d%d",&x3,&y3); triangle(x1,y1,x2,y2,x3,y3); getch(); cleardevice(); Rotate(x1,y1,x2,y2,x3,y3); setcolor(1); triangle(x1,y1,x2,y2,x3,y3); getch(); void triangle(int x1,int y1,int x2,int y2,int x3,int y3) line(x1,y1,x2,y2); line(x2,y2,x3,y3); line(x3,y3,x1,y1); void Rotate(int x1,int y1,int x2,int y2,int x3,int y3) int x,y,a1,b1,a2,b2,a3,b3,p=x2,q=y2; float Angle; printf("enter the angle for rotation:"); scanf("%f",&angle); cleardevice(); Angle=(Angle*3.14)/180; a1=p+(x1-p)*cos(angle)-(y1-q)*sin(angle); b1=q+(x1-p)*sin(angle)+(y1-q)*cos(angle); a2=p+(x2-p)*cos(angle)-(y2-q)*sin(angle); b2=q+(x2-p)*sin(angle)+(y2-q)*cos(angle); a3=p+(x3-p)*cos(angle)-(y3-q)*sin(angle);

6 b3=q+(x3-p)*sin(angle)+(y3-q)*cos(angle); printf("rotate"); triangle(a1,b1,a2,b2,a3,b3); Scaling: To change the size of an object, scaling transformation is used. In the scaling process, you either expand or compress the dimensions of the object. Let us assume that the original coordinates are (X, Y), the scaling factors are (S X, S Y ), and the produced coordinates are (X, Y ). This can be mathematically represented as shown below X' = X. S X and Y' = Y. S Y The scaling factor S X, S Y scales the object in X and Y direction respectively. scaling matrix form as below OR P = P. S Where S is the scaling matrix. The scaling process is shown in the following figure. If we provide values less than 1 to the scaling factor S, then we can reduce the size of the object. If we provide values greater than 1, then we can increase the size of the object. Program: #include<stdio.h> Write a program for 2D Scaling of a Triangle

7 #include<conio.h> #include<graphics.h> #include<process.h> #include<math.h> int x1,y1,x2,y2,x3,y3,mx,my; void draw(); void scale(); void main() int gd=detect,gm; int c; initgraph(&gd,&gm,"c:\\turboc3\\bgi"); printf("enter the 1st point for the triangle:"); scanf("%d%d",&x1,&y1); printf("enter the 2nd point for the triangle:"); scanf("%d%d",&x2,&y2); printf("enter the 3rd point for the triangle:"); scanf("%d%d",&x3,&y3); draw(); scale(); void draw() line(x1,y1,x2,y2); line(x2,y2,x3,y3); line(x3,y3,x1,y1); void scale() int x,y,a1,a2,a3,b1,b2,b3; int mx,my; printf("enter the scalling coordinates"); scanf("%d%d",&x,&y); mx=(x1+x2+x3)/3; my=(y1+y2+y3)/3; cleardevice(); a1=mx+(x1-mx)*x; b1=my+(y1-my)*y; a2=mx+(x2-mx)*x; b2=my+(y2-my)*y; a3=mx+(x3-mx)*x; b3=my+(y3-my)*y; line(a1,b1,a2,b2); line(a2,b2,a3,b3); line(a3,b3,a1,b1); draw(); getch();

8 Homogeneous coordinates: In design and picture formation process, many times require to perform translation, rotations and scaling to fit the picture components into their proper positions. General matrix form: For Translation: For rotation: For Scaling: (To produce sequence of transformation with above equations, such as translation followed by rotation and then scaling, the calculation of transformed coordinates one step at a time. To combine sequence of transformations into one transformation so that final coordinate

9 positions are obtained directly from initial coordinates. This eliminates the calculation of intermediate coordinate values.) To perform a sequence of transformation such as translation followed by rotation and scaling, we need to follow a sequential process Translate the coordinates, Rotate the translated coordinates, and then Scale the rotated coordinates to complete the composite transformation. To shorten this process, we have to use 3 3 transformation matrix instead of 2 2 transformation matrix. To convert a 2 2 matrix to 3 3 matrix, we have to add an extra dummy coordinate W. In this way, we can represent the point by 3 numbers instead of 2 numbers, which is called Homogenous Coordinate system. In this system, we can represent all the transformation equations in matrix multiplication. Any Cartesian point P(X, Y) can be converted to homogenous coordinates by P (X h, Y h, h). Homogeneous coordinates for translation: So Homogeneous coordinates for Rotation:

10 So Homogeneous coordinates for Scaling: Therefore we have, Reflection:

11 Reflection is the mirror image of original object. In other words, we can say that it is a rotation operation with 180. In reflection transformation, the size of the object does not change. The examples of some common reflections are:

12 Program : #include<stdio.h> #include<process.h> #include<conio.h> #include<graphics.h> #include<math.h> TO PERFORM 2D TRANSFORMATIONS (REFLECTION)

13 void disp(int n,float c[][3]) float maxx,maxy; int i; maxx=getmaxx(); maxy=getmaxy(); maxx=maxx/2; maxy=maxy/2; i=0; while(i<n-1) line(maxx+c[i][0],maxy-c[i][1],maxx+c[i+1][0],maxy-c[i+1][1]); i++; i=n-1; line(maxx+c[i][0],maxy-c[i][1],maxx+c[0][0],maxy-c[0][1]); setcolor(green); line(0,maxy,maxx*2,maxy); line(maxx,0,maxx,maxy*2); setcolor(white); void mul(int n,float b[][3],float c[][3],float a[][3]) int i,j,k; for(i=0;i<n;i++) for(j=0;j<3;j++) a[i][j]=0; for(i=0;i<n;i++) for(j=0;j<3;j++) for(k=0;k<3;k++) a[i][j] = a[i][j] + (c[i][k] * b[k][j]); void reflection(int n,float c[][3]) float b[10][3],a[10][3]; int i=0,ch,j; cleardevice(); printf("\n\t* * MENU * *"); printf("\n\t1) ABOUT X-AXIS"); printf("\n\t2) ABOUT Y-AXIS"); printf("\n\t3) ABOUT ORIGIN"); printf("\n\t4) ABOUT X=Y"); printf("\n\t5) ABOUT -X=Y");

14 printf("\n\t6) EXIT "); printf(" \n\tenter YOUR CHOICE : "); scanf("%d",&ch); clrscr(); cleardevice(); disp(n,c); for(i=0;i<3;i++) for(j=0;j<3;j++) b[i][j]=0; if(i==j) b[i][j]=1; switch(ch) case 1: b[1][1]=-1; break; case 2: b[0][0]=-1; break; case 3: b[0][0]=-1; b[1][1]=-1; break; case 4: b[0][0]=0; b[1][1]=0; b[0][1]=1; b[1][0]=1; break; case 5: b[0][0]=0; b[1][1]=0; b[0][1]=-1; b[1][0]=-1; break; case 6: break; default: printf(" \n\tinvalid CHOICE! "); break; mul(n,b,c,a); setcolor(red); disp(n,a); void main()

15 int i,j,k,cho,n,gd=detect,gm; float c[10][3],tx,ty,sx,sy,ra; initgraph(&gd,&gm,"c:\\turboc3\\bgi"); printf("\nenter the number of vertices : "); scanf("%d",&n); for(i=0;i<n;i++) printf("\nenter the co-ordinates of the %d vertex :",i+1); scanf("%f%f",&c[i][0],&c[i][1]); c[i][2]=1; disp(n,c); reflection(n,c); getch(); closegraph(); Shear: A transformation that slants the shape of an object is called the shear transformation. There are two shear transformations X-Shear and Y-Shear. One shift X coordinate s values and other shifts Y coordinate values. However in both the cases only one coordinate changes its coordinates and other preserves its values. X shear The X-Shear preserves the Y coordinate and changes are made to X coordinates, which causes the vertical lines to tilt right or left as shown in below figure.

16 a) original object b) object after x shear The transformation matrix for X-Shear can be represented as Y-Shear The Y-Shear preserves the X coordinates and changes the Y coordinates which causes the horizontal lines to transform into lines which slopes up or down as shown in the following figure a) original object b) object after y shear b) The Y-Shear can be represented in matrix from as

17 shearing relative to other reference line: In x shear transformation use y reference line and in y shear use x reference line. X shear with y reference line: y shear with x reference line: Program: //Shearing tranformation in C graphics #include<stdio.h> #include<graphics.h> #include<math.h> #include<conio.h> #include<dos.h> void mul(int mat[3][3],int vertex[10][3],int n); void shear(int vertex[10][3],int n); void init(int vertex[10][3],int n); int main() int i,x,y,xsh,ysh,xref,yref; int vertex[10][3],n; clrscr(); printf("\nenter the no. of vertex : "); scanf("%d",&n); for(i=0;i<n;i++)

18 points (x,y): "); scanf("%d%d",&x,&y); vertex[i][0]=x; vertex[i][1]=y; vertex[i][2]=1; shear(vertex,n); getch(); return 0; void init(int vertex[10][3],int n) int gd=detect,gm,i; initgraph(&gd,&gm,"c:\\turboc3\\bgi"); setcolor(10); line(0,240,640,240); //drawing X axis line(320,0,320,480); //drawing Y axis setcolor(3); line(450,20,490,20); setcolor(15); line(450,50,490,50); setcolor(6); outtextxy(500,20,"original"); outtextxy(500,50,"transformed"); setcolor(3); printf("enter the for(i=0;i<n-1;i++) line(320+vertex[i][0],240-vertex[i][1],320+vertex[i+1][0],240- vertex[i+1][1]); line(320+vertex[n-1][0],240-vertex[n-1][1],320+vertex[0][0],240-vertex[0][1]); void mul(int mat[3][3],int vertex[10][3],int n) int i,j,k; // loop variables int res[10][3]; for(i=0;i<n;i++) for(j=0;j<3;j++) res[i][j]=0; for(k=0;k<3;k++) res[i][j] = res[i][j] + vertex[i][k]*mat[k][j];

19 setcolor(15); for(i=0;i<n-1;i++) line(320+res[i][0],240-res[i][1],320+res[i+1][0],240-res[i+1][1]); line(320+res[n-1][0],240-res[n-1][1],320+res[0][0],240-res[0][1]); void shear(int vertex[10][3],int n) int opt,xref,yref; int shear_array[3][3]; printf("\n1.x-shear\n2.y-shear\n3.x shear with yref\n4.y shear with xref\nyour Choice: "); scanf("%d",&opt); switch(opt) case 1: case 2: int xsh; printf("\nenter the x shear : "); scanf("%d",&xsh); shear_array[0][0]=1; shear_array[1][0]=xsh; shear_array[2][0]=0; shear_array[0][1]=0; shear_array[1][1]=1; shear_array[2][1]=0; shear_array[0][2]=0; shear_array[1][2]=0; shear_array[2][2]=1; init(vertex,n); mul(shear_array,vertex,n); break; int ysh; printf("\nenter the y shear : "); scanf("%d",&ysh); shear_array[0][0]=1; shear_array[1][0]=0; shear_array[2][0]=0; shear_array[0][1]=ysh; shear_array[1][1]=1; shear_array[2][1]=0; shear_array[0][2]=0; shear_array[1][2]=0; shear_array[2][2]=1;

20 case 3: case 4: init(vertex,n); mul(shear_array,vertex,n); break; printf("\nenter the y shear : "); scanf("%d",&ysh); printf("\nenter the x ref : "); scanf("%d",&xref); shear_array[0][0]=1; shear_array[1][0]=0; shear_array[2][0]=0; shear_array[0][1]=ysh; shear_array[1][1]=1; shear_array[2][1]=-ysh*xref; shear_array[0][2]=0; shear_array[1][2]=0; shear_array[2][2]=1; init(vertex,n); mul(shear_array,vertex,n); break; printf("\nenter the x shear : "); scanf("%d",&xsh); printf("\nenter the y ref: "); scanf("%d",&yref); shear_array[0][0]=1; shear_array[1][0]=xsh; shear_array[2][0]=-xsh*yref; shear_array[0][1]=0; shear_array[1][1]=1; shear_array[2][1]=0; shear_array[0][2]=0; shear_array[1][2]=0; shear_array[2][2]=1; init(vertex,n); mul(shear_array,vertex,n); break; Composite transformations The basic purpose of composing transformations is to gain efficiency by applying a single composed transformation to a point, rather than applying a series of transformation, one after another.

21 If a transformation of the plane T1 is followed by a second plane transformation T2, then the result itself may be represented by a single transformation T which is the composition of T1 and T2 taken in that order. This is written as T = T1 T2. For example, to rotate an object about an arbitrary point (X p, Y p ), we have to carry out three steps (T*R*T) Translate point (X p, Y p ) to the origin. Rotate it about the origin. Finally, translate the center of rotation back where it belonged. Rotation about arbitrary point: Suppose the reference point of rotation is other than origin, then in that case follow series of transformation. Assume that to rotate a point P1 with respect to (Xm, Ym) then perform three steps. I) Translation: First we have to translate the (Xm, Ym) to origin as shown in figure Translation matrix (T1) will become

22

23 3D Transformations Translation Offset Vector = (t x, t y, t z ) Program #include<stdio.h> #include<conio.h> #include<math.h> #include<process.h> #include<graphics.h> int x1,x2,y1,y2,mx,my,depth; void draw(); void trans(); void main() z y x t z z t y y t x x z y x t t t z y x z y x

24 int gd=detect,gm,c; initgraph(&gd,&gm,"c:\\turboc3\\bgi"); printf("\n\t\t3d Translation\n\n"); printf("\nenter 1st top value(x1,y1):"); scanf("%d%d",&x1,&y1); printf("enter right bottom value(x2,y2):"); scanf("%d%d",&x2,&y2); depth=(x2-x1)/4; mx=(x1+x2)/2; my=(y1+y2)/2; draw(); getch(); cleardevice(); trans(); getch(); void draw() bar3d(x1,y1,x2,y2,depth,1); void trans() int a1,a2,b1,b2,dep,x,y; printf("\n Enter the Translation Distances:"); scanf("%d%d",&x,&y); a1=x1+x;

25 a2=x2+x; b1=y1+y; b2=y2+y; dep=(a2-a1)/4; bar3d(a1,b1,a2,b2,dep,1); setcolor(5); draw(); Scaling To change the size of an object using scaling transformation. In the scaling process, either expand or compress the dimensions of the object. Scaling can be achieved by multiplying the original coordinates of the object with the scaling factor to get the desired result. The following figure shows the effect of 3D scaling In 3D scaling operation, three coordinates are used. Let us assume that the original coordinates are (X, Y, Z), scaling factors are (SX,SY,Sz) respectively, and the produced coordinates are (X, Y, Z ). This can be mathematically represented as shown below

26 Program: #include<stdio.h> #include<conio.h> #include<math.h> #include<process.h> #include<graphics.h> int x1,x2,y1,y2,mx,my,depth; void draw(); void scale(); void main() int gd=detect,gm,c; initgraph(&gd,&gm,"c:\\turboc3\\bgi"); printf("\n\t\t3d Scaling\n\n"); printf("\nenter 1st top value(x1,y1):"); scanf("%d%d",&x1,&y1);

27 printf("enter right bottom value(x2,y2):"); scanf("%d%d",&x2,&y2); depth=(x2-x1)/4; mx=(x1+x2)/2; my=(y1+y2)/2; draw(); getch(); cleardevice(); scale(); getch(); void draw() bar3d(x1,y1,x2,y2,depth,1); void scale() int x,y,a1,a2,b1,b2,dep; printf("\n\n Enter scaling Factors:"); scanf("%d%d",&x,&y); a1=mx+(x1-mx)*x; a2=mx+(x2-mx)*x; b1=my+(y1-my)*y; b2=my+(y2-my)*y; dep=(a2-a1)/4; bar3d(a1,b1,a2,b2,dep,1);

28 setcolor(5); draw(); Rotation Program: #include<stdio.h> #include<conio.h> #include<graphics.h> #include<math.h> int maxx,maxy,midx,midy; void axis() getch(); cleardevice(); line(midx,0,midx,maxy);

29 line(0,midy,maxx,midy); void main() int x,y,z,o,x1,x2,y1,y2; int gd=detect,gm; detectgraph(&gd,&gm); initgraph(&gd,&gm,"c:\\turboc3\\bgi"); maxx=getmaxx(); maxy=getmaxy(); midx=maxx/2; midy=maxy/2; axis(); bar3d(midx+50,midy-100,midx+60,midy-90,5,1); printf("enter rotating angle"); scanf("%d",&o); x1=50*cos(o*3.14/180)-100*sin(o*3.14/180); y1=50*sin(o*3.14/180)+100*cos(o*3.14/180); x2=60*cos(o*3.14/180)-90*sin(o*3.14/180); y2=60*sin(o*3.14/180)+90*cos(o*3.14/180); axis(); printf("after rotation about z axis"); bar3d(midx+x1,midy-y1,midx+x2,midy-y2,5,1); axis(); printf("after rotation about x axis"); bar3d(midx+50,midy-x1,midx+60,midy-x2,5,1); axis(); printf("after rotation about yaxis"); bar3d(midx+x1,midy-100,midx+x2,midy-90,5,1); getch(); closegraph(); Types of projections After converting description of objects from world co-ordinates to viewing co-ordinates, project 3D objects into 2D view plane. There are two types of projection: 1. Parallel projection 2. Perspective projection

30 Parallel projection In parallel projection, z coordinate is discarded and parallel lines from each vertex on the object are extended until they intersect the view plane. The point of intersection is projection of the vertex. The parallel projection preserves relative proportions of objects but doesn t produce real objects. Types of parallel projections: Fig: Parallel projection of an object to the view plane a) Orthographic parallel projection:

31 In this projection, the direction of the projection is normal (perpendicular) to the view plane. Orthographic projections are further classified as axonometric and Multiview Orthographic projections. When Orthographic projections displays more than one face of an object then it becomes Axonometric Orthographic projections. Axonometric Orthographic projections are of three types: Isometric : all three principle axes are foreshortened equally. Dimetric : two principle axes are foreshortened equally. Trimetric : all three principle axes are foreshortened unequally. b) Oblique parallel projection: In this, the direction of projection is not perpendicular to view plane. The Oblique parallel projections are further divided into cabinet and cavalier projections.

32 For cavalier projection, the direction of projection makes 45 degree angle with view plane. For cabinet projection, the direction of projection makes 63.4 degree angle with view plane. Perspective projection Produces the realistic views but doesn t preserve relative proportions. Projections converge at center of projection Parallel lines (not parallel to the projection plan) on the object converge at a single point in the projection (the vanishing point). A vanishing point is a point on the image plane of a perspective drawing where the two-dimensional perspective projections of mutually parallel lines in three-dimensional space appear to converge. Three types of perspective projection Three-Point Perspective No principal face parallel to projection plane Three vanishing points for cube

33 Two-Point Perspective On principal direction parallel to projection plane Two vanishing points for cube One-Point Perspective One principal face parallel to projection plane One vanishing point for cube

//2D TRANSFORMATION TRANSLATION, ROTATING AND SCALING. #include<stdio.h> #include<conio.h> #include<graphics.h> #include<math.h> #include<stdlib.

//2D TRANSFORMATION TRANSLATION, ROTATING AND SCALING. #include<stdio.h> #include<conio.h> #include<graphics.h> #include<math.h> #include<stdlib. //2D TRANSFORMATION TRANSLATION, ROTATING AND SCALING #include #include #include #include #include void main() int gd=detect,gm,i,x[10],y[10],a,b,c,d,n,tx,ty,sx,sy,ch;

More information

UNIT 2 2D TRANSFORMATIONS

UNIT 2 2D TRANSFORMATIONS UNIT 2 2D TRANSFORMATIONS Introduction With the procedures for displaying output primitives and their attributes, we can create variety of pictures and graphs. In many applications, there is also a need

More information

SE Mock Online Retest 2-CG * Required

SE Mock Online Retest 2-CG * Required SE Mock Online Retest 2-CG * Required 1. Email address * 2. Name Of Student * 3. Roll No * 4. Password * Untitled Section 5. 10. A transformation that slants the shape of objects is called the? shear transformation

More information

Chapter 8 Three-Dimensional Viewing Operations

Chapter 8 Three-Dimensional Viewing Operations Projections Chapter 8 Three-Dimensional Viewing Operations Figure 8.1 Classification of planar geometric projections Figure 8.2 Planar projection Figure 8.3 Parallel-oblique projection Figure 8.4 Orthographic

More information

Chapter 5. Projections and Rendering

Chapter 5. Projections and Rendering Chapter 5 Projections and Rendering Topics: Perspective Projections The rendering pipeline In order to view manipulate and view a graphics object we must find ways of storing it a computer-compatible way.

More information

Introduction to Computer Graphics 4. Viewing in 3D

Introduction to Computer Graphics 4. Viewing in 3D Introduction to Computer Graphics 4. Viewing in 3D National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: E.Angel, Interactive Computer Graphics, 5 th Ed., Addison Wesley Ref: Hearn

More information

Windowing And Clipping (14 Marks)

Windowing And Clipping (14 Marks) Window: 1. A world-coordinate area selected for display is called a window. 2. It consists of a visual area containing some of the graphical user interface of the program it belongs to and is framed by

More information

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15)

So we have been talking about 3D viewing, the transformations pertaining to 3D viewing. Today we will continue on it. (Refer Slide Time: 1:15) Introduction to Computer Graphics Dr. Prem Kalra Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture - 8 3D Viewing So we have been talking about 3D viewing, the

More information

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface

One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface Classical Viewing Viewing requires three basic elements One or more objects A viewer with a projection surface Projectors that go from the object(s) to the projection surface Classical views are based

More information

Coordinate transformations. 5554: Packet 8 1

Coordinate transformations. 5554: Packet 8 1 Coordinate transformations 5554: Packet 8 1 Overview Rigid transformations are the simplest Translation, rotation Preserve sizes and angles Affine transformation is the most general linear case Homogeneous

More information

Classical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico

Classical and Computer Viewing. Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Classical and Computer Viewing Adapted From: Ed Angel Professor of Emeritus of Computer Science University of New Mexico Planar Geometric Projections Standard projections project onto a plane Projectors

More information

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller 3D Viewing CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Chapter 4 of Angel Chapter 6 of Foley, van Dam, 2 Objectives What kind of camera we use? (pinhole) What projections make sense

More information

Content. Coordinate systems Orthographic projection. (Engineering Drawings)

Content. Coordinate systems Orthographic projection. (Engineering Drawings) Projection Views Content Coordinate systems Orthographic projection (Engineering Drawings) Graphical Coordinator Systems A coordinate system is needed to input, store and display model geometry and graphics.

More information

Computer Graphics. P05 Viewing in 3D. Part 1. Aleksandra Pizurica Ghent University

Computer Graphics. P05 Viewing in 3D. Part 1. Aleksandra Pizurica Ghent University Computer Graphics P05 Viewing in 3D Part 1 Aleksandra Pizurica Ghent University Telecommunications and Information Processing Image Processing and Interpretation Group Viewing in 3D: context Create views

More information

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

3D Viewing. Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller 3D Viewing Introduction to Computer Graphics Torsten Möller Machiraju/Zhang/Möller Reading Chapter 4 of Angel Chapter 13 of Hughes, van Dam, Chapter 7 of Shirley+Marschner Machiraju/Zhang/Möller 2 Objectives

More information

Computer Graphics Viewing

Computer Graphics Viewing Computer Graphics Viewing What Are Projections? Our 3-D scenes are all specified in 3-D world coordinates To display these we need to generate a 2-D image - project objects onto a picture plane Picture

More information

MET71 COMPUTER AIDED DESIGN

MET71 COMPUTER AIDED DESIGN UNIT - II BRESENHAM S ALGORITHM BRESENHAM S LINE ALGORITHM Bresenham s algorithm enables the selection of optimum raster locations to represent a straight line. In this algorithm either pixels along X

More information

2D and 3D Transformations AUI Course Denbigh Starkey

2D and 3D Transformations AUI Course Denbigh Starkey 2D and 3D Transformations AUI Course Denbigh Starkey. Introduction 2 2. 2D transformations using Cartesian coordinates 3 2. Translation 3 2.2 Rotation 4 2.3 Scaling 6 3. Introduction to homogeneous coordinates

More information

Graphics and Interaction Transformation geometry and homogeneous coordinates

Graphics and Interaction Transformation geometry and homogeneous coordinates 433-324 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates

COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates COMP30019 Graphics and Interaction Transformation geometry and homogeneous coordinates Department of Computer Science and Software Engineering The Lecture outline Introduction Vectors and matrices Translation

More information

MAE : Lecture #12 - Projection and Perspective. Lecture Overview:

MAE : Lecture #12 - Projection and Perspective. Lecture Overview: Lecture Overview: Miscellaneous Motivation Projection - basics Means for projecting images: Orthographic viewing - basics Perspective viewing - basics The mathematics of projection Vanishing points Numerical

More information

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization

Overview. Viewing and perspectives. Planar Geometric Projections. Classical Viewing. Classical views Computer viewing Perspective normalization Overview Viewing and perspectives Classical views Computer viewing Perspective normalization Classical Viewing Viewing requires three basic elements One or more objects A viewer with a projection surface

More information

ME-430 Introduction to CAD Lecture Notes- Part 3

ME-430 Introduction to CAD Lecture Notes- Part 3 ME-43 Introduction to CAD Lecture Notes- Part 3 Dr. Rajesh N. Dave Office: 36 MEC (only during office hours); 28 YCEES Phone: 973 596-586 e-mail: dave@adm.njit.edu Web Page: web.njit.edu/~rdave Office

More information

Computer Graphics 7: Viewing in 3-D

Computer Graphics 7: Viewing in 3-D Computer Graphics 7: Viewing in 3-D In today s lecture we are going to have a look at: Transformations in 3-D How do transformations in 3-D work? Contents 3-D homogeneous coordinates and matrix based transformations

More information

Computer Graphics: Geometric Transformations

Computer Graphics: Geometric Transformations Computer Graphics: Geometric Transformations Geometric 2D transformations By: A. H. Abdul Hafez Abdul.hafez@hku.edu.tr, 1 Outlines 1. Basic 2D transformations 2. Matrix Representation of 2D transformations

More information

Arrays in C. By Mrs. Manisha Kuveskar.

Arrays in C. By Mrs. Manisha Kuveskar. Arrays in C By Mrs. Manisha Kuveskar. C Programming Arrays An array is a collection of data that holds fixed number of values of same type. For example: if you want to store marks of 100 students, you

More information

Specifying Complex Scenes

Specifying Complex Scenes Transformations Specifying Complex Scenes (x,y,z) (r x,r y,r z ) 2 (,,) Specifying Complex Scenes Absolute position is not very natural Need a way to describe relative relationship: The lego is on top

More information

MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS

MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS MATHEMATICS FOR ENGINEERING TUTORIAL 5 COORDINATE SYSTEMS This tutorial is essential pre-requisite material for anyone studying mechanical engineering. This tutorial uses the principle of learning by example.

More information

Three-Dimensional Graphics III. Guoying Zhao 1 / 67

Three-Dimensional Graphics III. Guoying Zhao 1 / 67 Computer Graphics Three-Dimensional Graphics III Guoying Zhao 1 / 67 Classical Viewing Guoying Zhao 2 / 67 Objectives Introduce the classical views Compare and contrast image formation by computer with

More information

Computer Vision cmput 428/615

Computer Vision cmput 428/615 Computer Vision cmput 428/615 Basic 2D and 3D geometry and Camera models Martin Jagersand The equation of projection Intuitively: How do we develop a consistent mathematical framework for projection calculations?

More information

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination

3D Polygon Rendering. Many applications use rendering of 3D polygons with direct illumination Rendering Pipeline 3D Polygon Rendering Many applications use rendering of 3D polygons with direct illumination 3D Polygon Rendering What steps are necessary to utilize spatial coherence while drawing

More information

Computer Graphics Solved MCQs -Part 2 MCQs Questions

Computer Graphics Solved MCQs -Part 2 MCQs Questions http://itbookshub.com/ Computer Graphics Solved MCQs -Part 2 MCQs Multiple Choice Questions Computer Graphics Solved MCQs -Part 2 Two consecutive scaling transformation s1 and s2 are Additive Multiplicative

More information

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

Object Representation Affine Transforms. Polygonal Representation. Polygonal Representation. Polygonal Representation of Objects Object Representation Affine Transforms Polygonal Representation of Objects Although perceivable the simplest form of representation they can also be the most problematic. To represent an object polygonally,

More information

Building Models. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science

Building Models. CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Building Models CS 537 Interactive Computer Graphics Prof. David E. Breen Department of Computer Science 1 Objectives Introduce simple data structures for building polygonal models - Vertex lists - Edge

More information

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI

DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI DHANALAKSHMI COLLEGE OF ENGINEERING, CHENNAI Department of Computer Science and Engineering CS6504-COMPUTER GRAPHICS Anna University 2 & 16 Mark Questions & Answers Year / Semester: III / V Regulation:

More information

CSE528 Computer Graphics: Theory, Algorithms, and Applications

CSE528 Computer Graphics: Theory, Algorithms, and Applications CSE528 Computer Graphics: Theory, Algorithms, and Applications Hong Qin Stony Brook University (SUNY at Stony Brook) Stony Brook, New York 11794-2424 Tel: (631)632-845; Fax: (631)632-8334 qin@cs.stonybrook.edu

More information

Chap 7, 2008 Spring Yeong Gil Shin

Chap 7, 2008 Spring Yeong Gil Shin Three-Dimensional i Viewingi Chap 7, 28 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a synthetic camera)

More information

Two Dimensional Viewing

Two Dimensional Viewing Two Dimensional Viewing Dr. S.M. Malaek Assistant: M. Younesi Two Dimensional Viewing Basic Interactive Programming Basic Interactive Programming User controls contents, structure, and appearance of objects

More information

Interactive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing

Interactive Computer Graphics. Hearn & Baker, chapter D transforms Hearn & Baker, chapter 5. Aliasing and Anti-Aliasing Interactive Computer Graphics Aliasing and Anti-Aliasing Hearn & Baker, chapter 4-7 D transforms Hearn & Baker, chapter 5 Aliasing and Anti-Aliasing Problem: jaggies Also known as aliasing. It results

More information

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES

CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES CALCULATING TRANSFORMATIONS OF KINEMATIC CHAINS USING HOMOGENEOUS COORDINATES YINGYING REN Abstract. In this paper, the applications of homogeneous coordinates are discussed to obtain an efficient model

More information

CS452/552; EE465/505. Models & Viewing

CS452/552; EE465/505. Models & Viewing CS452/552; EE465/505 Models & Viewing 2-03 15 Outline! Building Polygonal Models Vertex lists; gl.drawarrays( ) Edge lists: gl.drawelements( )! Viewing Classical Viewing Read: Viewing in Web3D Angel, Section

More information

LAB MANUAL OF COMPUTER GRAPHICS BY: Mrs. Manisha Saini

LAB MANUAL OF COMPUTER GRAPHICS BY: Mrs. Manisha Saini LAB MANUAL OF COMPUTER GRAPHICS BY: Mrs. Manisha Saini INTRODUCTION TO COMPUTER GRAPHICS Computer Graphics is the pictorial representation of information using a computer program. In Computer Graphics,

More information

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard

Announcements. Submitting Programs Upload source and executable(s) (Windows or Mac) to digital dropbox on Blackboard Now Playing: Vertex Processing: Viewing Coulibaly Amadou & Mariam from Dimanche a Bamako Released August 2, 2005 Rick Skarbez, Instructor COMP 575 September 27, 2007 Announcements Programming Assignment

More information

CITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera

CITSTUDENTS.IN VIEWING. Computer Graphics and Visualization. Classical and computer viewing. Viewing with a computer. Positioning of the camera UNIT - 6 7 hrs VIEWING Classical and computer viewing Viewing with a computer Positioning of the camera Simple projections Projections in OpenGL Hiddensurface removal Interactive mesh displays Parallelprojection

More information

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009

Lecture 6 Sections 4.3, 4.6, 4.7. Wed, Sep 9, 2009 Lecture 6 Sections 4.3, 4.6, 4.7 Hampden-Sydney College Wed, Sep 9, 2009 Outline 1 2 3 4 re are three mutually orthogonal axes: the x-axis, the y-axis, and the z-axis. In the standard viewing position,

More information

Overview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections

Overview. Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections Overview Affine Transformations (2D and 3D) Coordinate System Transformations Vectors Rays and Intersections ITCS 4120/5120 1 Mathematical Fundamentals Geometric Transformations A set of tools that aid

More information

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides)

Computer Graphics. Jeng-Sheng Yeh 葉正聖 Ming Chuan University (modified from Bing-Yu Chen s slides) Computer Graphics Jeng-Sheng Yeh 葉正聖 Ming Chuan Universit (modified from Bing-Yu Chen s slides) Viewing in 3D 3D Viewing Process Specification of an Arbitrar 3D View Orthographic Parallel Projection Perspective

More information

Part 3: 2D Transformation

Part 3: 2D Transformation Part 3: 2D Transformation 1. What do you understand by geometric transformation? Also define the following operation performed by ita. Translation. b. Rotation. c. Scaling. d. Reflection. 2. Explain two

More information

CSE328 Fundamentals of Computer Graphics

CSE328 Fundamentals of Computer Graphics CSE328 Fundamentals of Computer Graphics Hong Qin State University of New York at Stony Brook (Stony Brook University) Stony Brook, New York 794--44 Tel: (63)632-845; Fax: (63)632-8334 qin@cs.sunysb.edu

More information

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5)

521493S Computer Graphics Exercise 2 Solution (Chapters 4-5) 5493S Computer Graphics Exercise Solution (Chapters 4-5). Given two nonparallel, three-dimensional vectors u and v, how can we form an orthogonal coordinate system in which u is one of the basis vectors?

More information

Game Engineering: 2D

Game Engineering: 2D Game Engineering: 2D CS420-2010F-07 Objects in 2D David Galles Department of Computer Science University of San Francisco 07-0: Representing Polygons We want to represent a simple polygon Triangle, rectangle,

More information

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective

COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective COMP30019 Graphics and Interaction Three-dimensional transformation geometry and perspective Department of Computing and Information Systems The Lecture outline Introduction Rotation about artibrary axis

More information

Projection Lecture Series

Projection Lecture Series Projection 25.353 Lecture Series Prof. Gary Wang Department of Mechanical and Manufacturing Engineering The University of Manitoba Overview Coordinate Systems Local Coordinate System (LCS) World Coordinate

More information

Vector Algebra Transformations. Lecture 4

Vector Algebra Transformations. Lecture 4 Vector Algebra Transformations Lecture 4 Cornell CS4620 Fall 2008 Lecture 4 2008 Steve Marschner 1 Geometry A part of mathematics concerned with questions of size, shape, and relative positions of figures

More information

Answers to practice questions for Midterm 1

Answers to practice questions for Midterm 1 Answers to practice questions for Midterm Paul Hacking /5/9 (a The RREF (reduced row echelon form of the augmented matrix is So the system of linear equations has exactly one solution given by x =, y =,

More information

Three-Dimensional Viewing Hearn & Baker Chapter 7

Three-Dimensional Viewing Hearn & Baker Chapter 7 Three-Dimensional Viewing Hearn & Baker Chapter 7 Overview 3D viewing involves some tasks that are not present in 2D viewing: Projection, Visibility checks, Lighting effects, etc. Overview First, set up

More information

Viewing with Computers (OpenGL)

Viewing with Computers (OpenGL) We can now return to three-dimension?', graphics from a computer perspective. Because viewing in computer graphics is based on the synthetic-camera model, we should be able to construct any of the classical

More information

CS 4204 Computer Graphics

CS 4204 Computer Graphics CS 4204 Computer Graphics 3D Viewing and Projection Yong Cao Virginia Tech Objective We will develop methods to camera through scenes. We will develop mathematical tools to handle perspective projection.

More information

THE VIEWING TRANSFORMATION

THE VIEWING TRANSFORMATION ECS 178 Course Notes THE VIEWING TRANSFORMATION Kenneth I. Joy Institute for Data Analysis and Visualization Department of Computer Science University of California, Davis Overview One of the most important

More information

2D TRANSFORMATIONS AND MATRICES

2D TRANSFORMATIONS AND MATRICES 2D TRANSFORMATIONS AND MATRICES Representation of Points: 2 x 1 matrix: x y General Problem: B = T A T represents a generic operator to be applied to the points in A. T is the geometric transformation

More information

2D Object Definition (1/3)

2D Object Definition (1/3) 2D Object Definition (1/3) Lines and Polylines Lines drawn between ordered points to create more complex forms called polylines Same first and last point make closed polyline or polygon Can intersect itself

More information

Lesson 5.6: Angles in Standard Position

Lesson 5.6: Angles in Standard Position Lesson 5.6: Angles in Standard Position IM3 - Santowski IM3 - Santowski 1 Fast Five Opening Exercises! Use your TI 84 calculator:! Evaluate sin(50 ) " illustrate with a diagram! Evaluate sin(130 ) " Q

More information

Computer Graphics Hands-on

Computer Graphics Hands-on Computer Graphics Hands-on Two-Dimensional Transformations Objectives Visualize the fundamental 2D geometric operations translation, rotation about the origin, and scale about the origin Learn how to compose

More information

Lecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016

Lecture 4: Transforms. Computer Graphics CMU /15-662, Fall 2016 Lecture 4: Transforms Computer Graphics CMU 15-462/15-662, Fall 2016 Brief recap from last class How to draw a triangle - Why focus on triangles, and not quads, pentagons, etc? - What was specific to triangles

More information

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University

2D Image Transforms Computer Vision (Kris Kitani) Carnegie Mellon University 2D Image Transforms 16-385 Computer Vision (Kris Kitani) Carnegie Mellon University Extract features from an image what do we do next? Feature matching (object recognition, 3D reconstruction, augmented

More information

LINE,CIRCLE AND ELLIPSE DRAWING USING BRESENHAM S ALGORITHM

LINE,CIRCLE AND ELLIPSE DRAWING USING BRESENHAM S ALGORITHM Ex.no :1 Date: LINE,CIRCLE AND ELLIPSE DRAWING USING BRESENHAM S ALGORITHM AIM: To write a program to implement Bresenham s algorithms for line, circle and ellipse drawing. ALGORITHM: Step1: Create a function

More information

Computer Graphics Geometric Transformations

Computer Graphics Geometric Transformations Computer Graphics 2016 6. Geometric Transformations Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2016-10-31 Contents Transformations Homogeneous Co-ordinates Matrix Representations of Transformations

More information

Mathematics (www.tiwariacademy.com)

Mathematics (www.tiwariacademy.com) () Miscellaneous Exercise on Chapter 10 Question 1: Find the values of k for which the line is (a) Parallel to the x-axis, (b) Parallel to the y-axis, (c) Passing through the origin. Answer 1: The given

More information

Supplementary Material: The Rotation Matrix

Supplementary Material: The Rotation Matrix Supplementary Material: The Rotation Matrix Computer Science 4766/6778 Department of Computer Science Memorial University of Newfoundland January 16, 2014 COMP 4766/6778 (MUN) The Rotation Matrix January

More information

DDA ALGORITHM. To write a C program to draw a line using DDA Algorithm.

DDA ALGORITHM. To write a C program to draw a line using DDA Algorithm. DDA ALGORITHM EX NO: 1 Aim : To write a C program to draw a line using DDA Algorithm. Algorithm: Step 1: Start the program. Step 1: Step 2: Input the line endpoints and store the left endpoint in (x1,

More information

COMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard

COMP Computer Graphics and Image Processing. a6: Projections. In part 2 of our study of Viewing, we ll look at. COMP27112 Toby Howard Computer Graphics and Image Processing a6: Projections Tob.Howard@manchester.ac.uk Introduction In part 2 of our stud of Viewing, we ll look at The theor of geometrical planar projections Classes of projections

More information

Parallel and perspective projections such as used in representing 3d images.

Parallel and perspective projections such as used in representing 3d images. Chapter 5 Rotations and projections In this chapter we discuss Rotations Parallel and perspective projections such as used in representing 3d images. Using coordinates and matrices, parallel projections

More information

Figure 1. Lecture 1: Three Dimensional graphics: Projections and Transformations

Figure 1. Lecture 1: Three Dimensional graphics: Projections and Transformations Lecture 1: Three Dimensional graphics: Projections and Transformations Device Independence We will start with a brief discussion of two dimensional drawing primitives. At the lowest level of an operating

More information

Section III: TRANSFORMATIONS

Section III: TRANSFORMATIONS Section III: TRANSFORMATIONS in 2-D 2D TRANSFORMATIONS AND MATRICES Representation of Points: 2 x 1 matrix: X Y General Problem: [B] = [T] [A] [T] represents a generic operator to be applied to the points

More information

Shadows in Computer Graphics

Shadows in Computer Graphics Shadows in Computer Graphics Steven Janke November 2014 Steven Janke (Seminar) Shadows in Computer Graphics November 2014 1 / 49 Shadows (from Doom) Steven Janke (Seminar) Shadows in Computer Graphics

More information

SIR C.R.R COLLEGE OF ENGINEERING, ELURU.

SIR C.R.R COLLEGE OF ENGINEERING, ELURU. SIR C.R.R COLLEGE OF ENGINEERING, ELURU. DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING GRAPHICS AND MULTIMEDIA LAB MANUAL ACADEMIC YEAR: 2016-2017 CLASS : 4/4 B.Tech CSE I SEMESTER SUBJECT : Graphics &

More information

Chap 7, 2009 Spring Yeong Gil Shin

Chap 7, 2009 Spring Yeong Gil Shin Three-Dimensional i Viewingi Chap 7, 29 Spring Yeong Gil Shin Viewing i Pipeline H d fi i d? How to define a window? How to project onto the window? Rendering "Create a picture (in a snthetic camera) Specification

More information

UNIT 3 2D TRANSFORMATIONS Unit-03/Lecture-01

UNIT 3 2D TRANSFORMATIONS Unit-03/Lecture-01 UNIT 3 2D TRANSFORMATIONS Unit-03/Lecture-01 BASIC TRANSFORMATIONS Changes in orientation, size, and shape are accomplished with geometric transformations that alter the coordinate descriptions of objects.

More information

February 1. Lab Manual INSTITUTE OF INFORMATION TECHNOLOGY & MANAGEMENT GWALIOR COMPUTER GRAPHICS & MUTIMEDIA

February 1. Lab Manual INSTITUTE OF INFORMATION TECHNOLOGY & MANAGEMENT GWALIOR COMPUTER GRAPHICS & MUTIMEDIA Lab Manual February 1 2014 COMPUTER GRAPHICS & MUTIMEDIA INSTITUTE OF INFORMATION TECHNOLOGY & MANAGEMENT GWALIOR SOFTWARE REQUIREMENT : 1. Turbo C++ IDE (TurboC3) 2. Borland Turbo C++ (Version 4.5) LIST

More information

Technical Arts 101 Prof. Anupam Saxena Department of Mechanical engineering Indian Institute of Technology, Kanpur. Lecture - 7 Think and Analyze

Technical Arts 101 Prof. Anupam Saxena Department of Mechanical engineering Indian Institute of Technology, Kanpur. Lecture - 7 Think and Analyze Technical Arts 101 Prof. Anupam Saxena Department of Mechanical engineering Indian Institute of Technology, Kanpur Lecture - 7 Think and Analyze Last time I asked you to come up with a single funniest

More information

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Transformations. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Transformations Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico Angel: Interactive Computer Graphics 4E Addison-Wesley 25 1 Objectives

More information

Math 7 Elementary Linear Algebra PLOTS and ROTATIONS

Math 7 Elementary Linear Algebra PLOTS and ROTATIONS Spring 2007 PLOTTING LINE SEGMENTS Math 7 Elementary Linear Algebra PLOTS and ROTATIONS Example 1: Suppose you wish to use MatLab to plot a line segment connecting two points in the xy-plane. Recall that

More information

About Graphing Lines

About Graphing Lines About Graphing Lines TABLE OF CONTENTS About Graphing Lines... 1 What is a LINE SEGMENT?... 1 Ordered Pairs... 1 Cartesian Co-ordinate System... 1 Ordered Pairs... 2 Line Segments... 2 Slope of a Line

More information

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL

Computer Graphics. Chapter 5 Geometric Transformations. Somsak Walairacht, Computer Engineering, KMITL Chapter 5 Geometric Transformations Somsak Walairacht, Computer Engineering, KMITL 1 Outline Basic Two-Dimensional Geometric Transformations Matrix Representations and Homogeneous Coordinates Inverse Transformations

More information

Computer Graphics: Viewing in 3-D. Course Website:

Computer Graphics: Viewing in 3-D. Course Website: Computer Graphics: Viewing in 3-D Course Website: http://www.comp.dit.ie/bmacnamee 2 Contents Transformations in 3-D How do transformations in 3-D work? 3-D homogeneous coordinates and matrix based transformations

More information

Game Engineering CS S-05 Linear Transforms

Game Engineering CS S-05 Linear Transforms Game Engineering CS420-2016S-05 Linear Transforms David Galles Department of Computer Science University of San Francisco 05-0: Matrices as Transforms Recall that Matrices are transforms Transform vectors

More information

Last week. Machiraju/Zhang/Möller/Fuhrmann

Last week. Machiraju/Zhang/Möller/Fuhrmann Last week Machiraju/Zhang/Möller/Fuhrmann 1 Geometry basics Scalar, point, and vector Vector space and affine space Basic point and vector operations Sided-ness test Lines, planes, and triangles Linear

More information

MATRIX REVIEW PROBLEMS: Our matrix test will be on Friday May 23rd. Here are some problems to help you review.

MATRIX REVIEW PROBLEMS: Our matrix test will be on Friday May 23rd. Here are some problems to help you review. MATRIX REVIEW PROBLEMS: Our matrix test will be on Friday May 23rd. Here are some problems to help you review. 1. The intersection of two non-parallel planes is a line. Find the equation of the line. Give

More information

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo Computer Graphics Bing-Yu Chen National Taiwan Universit The Universit of Toko Viewing in 3D 3D Viewing Process Classical Viewing and Projections 3D Snthetic Camera Model Parallel Projection Perspective

More information

UNIT 2. Translation/ Scaling/ Rotation. Unit-02/Lecture-01

UNIT 2. Translation/ Scaling/ Rotation. Unit-02/Lecture-01 UNIT 2 Translation/ Scaling/ Rotation Unit-02/Lecture-01 Translation- (RGPV-2009,10,11,13,14) Translation is to move, or parallel shift, a figure. We use a simple point as a starting point. This is a simple

More information

Chapter 2 - Basic Mathematics for 3D Computer Graphics

Chapter 2 - Basic Mathematics for 3D Computer Graphics Chapter 2 - Basic Mathematics for 3D Computer Graphics Three-Dimensional Geometric Transformations Affine Transformations and Homogeneous Coordinates Combining Transformations Translation t + t Add a vector

More information

1. DDA Algorithm(Digital Differential Analyzer)

1. DDA Algorithm(Digital Differential Analyzer) Basic concepts in line drawing: We say these computers have vector graphics capability (the line is a vector). The process is turning on pixels for a line segment is called vector generation and algorithm

More information

Game Engineering CS S-07 Homogenous Space and 4x4 Matrices

Game Engineering CS S-07 Homogenous Space and 4x4 Matrices Game Engineering CS420-2014S-07 Homogenous Space and 4x4 Matrices David Galles Department of Computer Science University of San Francisco 07-0: Matrices and Translations Matrices are great for rotations,

More information

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM NAME: Login name: Computer Science 46 Midterm 3//4, :3PM-:5PM This test is 5 questions, of equal weight. Do all of your work on these pages (use the back for scratch space), giving the answer in the space

More information

CSC 470 Computer Graphics. Three Dimensional Viewing

CSC 470 Computer Graphics. Three Dimensional Viewing CSC 470 Computer Graphics Three Dimensional Viewing 1 Today s Lecture Three Dimensional Viewing Developing a Camera Fly through a scene Mathematics of Projections Producing Stereo Views 2 Introduction

More information

3.0 Trigonometry Review

3.0 Trigonometry Review 3.0 Trigonometry Review In trigonometry problems, all vertices (corners or angles) of the triangle are labeled with capital letters. The right angle is usually labeled C. Sides are usually labeled with

More information

CSC 470 Computer Graphics

CSC 470 Computer Graphics CSC 47 Computer Graphics Three Dimensional Viewing Today s Lecture Three Dimensional Viewing Developing a Camera Fly through a scene Mathematics of Producing Stereo Views 1 2 Introduction We have already

More information

PreCalculus Unit 1: Unit Circle Trig Quiz Review (Day 9)

PreCalculus Unit 1: Unit Circle Trig Quiz Review (Day 9) PreCalculus Unit 1: Unit Circle Trig Quiz Review (Day 9) Name Date Directions: You may NOT use Right Triangle Trigonometry for any of these problems! Use your unit circle knowledge to solve these problems.

More information

MODULE - 7. Subject: Computer Science. Module: Other 2D Transformations. Module No: CS/CGV/7

MODULE - 7. Subject: Computer Science. Module: Other 2D Transformations. Module No: CS/CGV/7 MODULE - 7 e-pg Pathshala Subject: Computer Science Paper: Computer Graphics and Visualization Module: Other 2D Transformations Module No: CS/CGV/7 Quadrant e-text Objectives: To get introduced to the

More information

3D Viewing. With acknowledge to: Ed Angel. Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

3D Viewing. With acknowledge to: Ed Angel. Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 3D Viewing With acknowledge to: Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Classical Viewing Viewing plane projectors Classical

More information