Sorry if this is an offtopic, but I do not know how to name this problem.
Take for instance 3D sphere and its algebraic expression: $$x^2+y^2+z^2=r^2$$
Now, when I want to find out intersection with plane $z=0$; it is evident I obtain equation of a circle. However, when I want to find intersection with a plane $x=y$, what I get is not equation of circle, since I get $$x^2+x^2+z^2=2x^2+z^2=r^2$$
That is no longer an equation of a circle. But here I know it has to be a circle. That got me thinking that in general, when you have some 3D shape and a intersecting plane, simply substitute the variables does not work.
I thought I need to multiply it with a rotational matrix, and in this case it worked. But that was just a coincident probably, since I did not get correct result for a plane $x=2y$. Or maybe I made a mistake, but I rotated it along the z-axis by $arctan(2)$ angle, which does rotate the plane onto a plane $5x=0$, which is the same as $x=0$, which was the same result with the previous rotation using identical approach. And it probably can't even be correct, because the coefficient in the plane equation is squared in the shape equation, and the rotation must work for linear variables, so once there is coefficient different from 1, it can't work.
So my question is, is there a general straightforward way to get from a 3D shape equation and from general "plane going through origin" equation $ax+by+cz=0$ a correct equation of a intersection of these two? For instance plane $3x+y-2z=0$ and shape $x^2-x-2yx-\frac {yz^2} 4=0$?