Professional Documents
Culture Documents
Experiment 2.2: To Perform Reflection of A Point About A Line y MX+C
Experiment 2.2: To Perform Reflection of A Point About A Line y MX+C
#include<iostream.h>
#include<conio.h>#include
<graphics.h>void main()
int gd=DETECT,gm;
initgraph(&gd,&gm," "); int x1,y1,x2,y2;
cin>>x1>>y1>>x2>>y2;
line(x1,y1,x2,y2);
outtextxy(x1,y1+10,"Original Object");
setcolor(4); line((m/2),0,(m/2),n);
(c*2); line(x2,y2,x1,y1);
setcolor(9); int
a=(m/2)-x1;
2
(a*2); x2=x2+(b*2);
line(x1,y1,x2,y2);
outtextxy(x220,y2+10,"
Reflection along Y-
axis"); getch();
closegraph(); }
OUTPUT:
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the
faculty):
Sr. No. Parameters Marks Obtained Maximum Marks
1.
2.
3.