Hey guys, i have a bit of problem here.
I need to write a program where i have an equation (general equation of an elipse) which has six variables! and they also have x and y.(which makes it 8!!) the user enters six different sets of the (x,y) to get six equations. but after that, i.e. after getting six values of x and y, what do i do with my program. lets say, i make the program as follows ( equation is a(x*x) +b(y*y) + cxy + dx + ey +f = 0.
longdouble m,n,o,p,q,r,s,t,u,v,w,x;
cout<<"Enter the first x coordinate - ";
cin>>m;
cout<<"Enter the first y coordinate - ";
cin>>n;
cout<<"Enter the second x coordinate - ";
cin>>o;
cout<<"Enter the second y coordinate - ";
cin>>p;
cout<<"Enter the third x coordinate - ";
cin>>q;
cout<<"Enter the third y coordinate - ";
cin>>r;
cout<<"Enter the fourth x coordinate - ";
cin>>s;
cout<<"Enter the fourth y coordinate - ";
cin>>t;
cout<<"Enter the fifth x coordinate - ";
cin>>u;
cout<<"Enter the fifth y coordinate - ";
cin>>v;
cout<<"Enter the sixth x coordinate - ";
cin>>w;
cout<<"Enter the sixth y coordinate - ";
cin>>x;
you already have the equation should be really easy to program but anyways... it would look like this
result = ( a * x * x ) + ( b * y * y ) + ( c * x * y ) + ( d * x ) + ( e * y ) + f;
Honestly I don't see 6 x's and y's in your formula.
Also that doesn't look like an ellipse formula to me.
Isn't an ellipse: x^{2}/a^{2} + y^{2}/b^{2} = 1