Given a point (x1, y1) and an equation for a line (y=mx+c), I need some pseudocode for determining the point (x2, y2) that is a reflection of the first point across the line
I have a simpler and an easy way to implement in c++
#include
#include
#include
using namespace std;
int main(){
cout<<"Enter the point";
float x,y;
int gm,gd=DETECT;
initgraph(&gd,&gm,"C:\\TC\\BGI");
cin>>x;
cin>>y;
putpixel(x,y,RED);
cout<<"Enter the line slop and intercept";
float a,c;
cin>>a;
cin>>c;
float x1,y1;
x1 = x-((2*a*x+2*c-y)/(1+a*a))*a;
y1=(2*a*x+2*c-y)/(1+a*a);
cout<<"x = "<
}