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.

#### Algorithm:

##### Algorithm of reflection transformation:

1. Start
2. Enter co-ordinates of object.
3. Apply reflection
4. End
##### Algorithm of rotation about arbitrary point:

1. Start.
2. Enter co-ordinates of object.
3. Enter arbitrary point.
4. Translate object to origin.
`#include<graphics.h>#include<iostream>#include<math.h>#include<stdio.h>using namespace std;int gd=DETECT,gm=0,ch;int a,b,i,c,d,e;void reflx();void refly();void reflxy();void quad();int main(){cout<<"enter no points of poly";cin>>a;cout<<"\n enter no of cordinates of polygon";for (i=0;i<a*2;i++){cin>>b[i];if (i%2==0)c[i]=b[i]+320;elsec[i]=240-b[i];}c[i]=c;c[i+1]=c;cout<<"\n please enter choice 1:Reflection about X 2:Reflection about Y 3:Reflection about X and Y ";cin>>ch;switch(ch){case 1:quad();reflx();break;case 2:quad();refly();break;case 3:quad();reflxy();break;}getch();closegraph();return 0;}void quad(){initgraph(&gd,&gm,NULL);line(0,240,640,240);line(320,0,320,480);drawpoly(a+1,c);}void reflx(){ for (i=0;i<a*2;i++){if (i%2==0)c[i]=b[i]+320;elsec[i]=240+b[i];}c[2*a]=c;c[2*a+1]=c;drawpoly(a+1,c);}void refly(){ for (i=0;i<a*2;i++){if (i%2==0)d[i]=(b[i]*-1)+320;elsed[i]=240-b[i];}d[2*a]=d;d[2*a+1]=d;drawpoly(a+1,d); getch();}void reflxy(){ setcolor(3); for(i=0;i<a*2;i++){e[i]=320-b[i];i++;e[i]=240+b[i];}e[2*a]=e;e[2*a+1]=e;drawpoly(a+1,e);}`