"Some of the brightest minds in the country can be found on the last benches of the classroom" Dr. A. P. J. Abdul Kalam
Friday, 3 December 2021
Sunday, 28 November 2021
Moments With Friends at JIS College of Engineering, Kalyani | JIS College of Engineering | JISCE
Group picture of the Lateral Group (2020-2023) of the Computer Science and Engineering Department of the JIS College of Engineering, Kalyani |
Sanjoy Banik & Susmita Deb |
Sanjoy Banik |
Anupam Dutta |
Sanjoy Banik & Anupam Dutta |
Susmita Deb |
JIS College of Engineering, Kalyani |
Group picture of the Lateral Group (2020-2023) of the Computer Science and Engineering Department of the JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani (Main Gate) |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani |
JIS College of Engineering, Kalyani (Main Gate) |
JIS College of Engineering, Kalyani (Main Gate) |
Tuesday, 28 September 2021
Implement Translation of a line in C Language
To translate a point from coordinate position (x, y) to another (x1 y1), we add algebraically the translation distances Tx and Ty to original coordinate.
x1=x+Tx y1=y+Ty
The translation pair (Tx,Ty) is called as shift vector.
Translation is a movement of objects without deformation. Every position or point is translated by the same amount. When the straight line is translated, then it will be drawn using endpoints.
For translating polygon, each vertex of the polygon is converted to a new position. Similarly, curved objects are translated. To change the position of the circle or ellipse its center coordinates are transformed, then the object is drawn using new coordinates.
Implement Translation of a line in C Language
Code:-
#include <stdio.h>
#include <conio.h>
#include <graphics.h>
void main(void)
{ int gdriver=DETECT,gmode,X1,Y1,X2,Y2,TX,TY;
initgraph(&gdriver,&gmode,"C:\\TURBOC3\\BGI");
printf("\n Enter The Value of Initial X1 Axis: \n");
scanf("%d",&X1);
printf("\n Enter The Value of Initial Y1 Axis: \n");
scanf("%d",&Y1);
printf("\n Enter The Value of Initial X2 Axis: \n");
scanf("%d",&X2);
printf("\n Enter The Value of Initial Y2 Axis: \n");
scanf("%d",&Y2);
printf("\n Enter The Value of TRANSLATION VECTOR TX Axis: \n");
scanf("%d",&TX);
printf("\n Enter The Value of TRANSLATION VECTOR TY Axis: \n");
scanf("%d",&TY);
clrscr();
setbkcolor(WHITE);
setcolor(2);
outtextxy(X1,Y1+5 ,"Before Translation Process");
line(X1,Y1,X2,Y2);
X1 = X1 + TX;
Y1 = Y1 + TY;
X2 = X2 + TX;
Y2 = Y2 + TY;
setcolor(5);
outtextxy(X1,Y1+5,"After Translation Process");
line(X1,Y1,X2,Y2);
getch();
closegraph();
}
Output:-
- Anupam Dutta
CSE(2020-2023)
JIS College Of Engineering, Kalyani (JISCE)
Thursday, 9 September 2021
After a long time...... Good friends are hard to find.....thank you brother for this beautiful reunion...
Semester Question Papers for Computer Science and Engineering Students 2020 - 2021 | Computer Science and Engineering | MAKAUT | WBUT | Maulana Abul Kalam Azad University of Technology
Computer Science and Engineering 3rd Semester Question Papers Download Question Papers o...
-
W.B.C.H.S.E 11(XI) HIGHER SECONDARY EXAM 2016 EXAM QUESTIONS PDF W.B.C.H.S.E 11(XI) 2016 (2015-2016) EXAM QUESTIONS PDF (*PHYSICS*,*MA...
-
Physics Practical Copy 1 & Copy 2 Class 11 (XI) PDF Download Physics Practical Copy 1 & Copy 2 Class 11 (XI) West Bengal Cou...
-
Questions Papers All Subjects of 3rd Semester The year 2015, 2016,2017 Diploma (Polytechnic) Computer Science & Technology ...