Experiment Title:: Write A Program in C To Perform Two Dimensional Transformation (Rotation)
Experiment Title:: Write A Program in C To Perform Two Dimensional Transformation (Rotation)
Experiment Title:
Program Code:
#include<stdio.h>
#include<graphics.h>
#include<math.h>
int main()
{
int gd=0,gm,x1,y1,x2,y2;
double s,c, angle;
initgraph(&gd, &gm, "c:\\turboc3\\bgi");
setcolor(RED);
printf("Enter coordinates of line: ");
scanf("%d%d%d%d",&x1,&y1,&x2,&y2);
cleardevice();
line(x1,y1,x2,y2);
getch();
setbkcolor(BLACK);
1
`
Output:
2
`
3
`