How to express $2D-intersection$?

100 Views Asked by At

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$?

2

There are 2 best solutions below

1
On BEST ANSWER

When you substitute the plan equation in the sphere equation whithout keeping the plan equation you may loose information :

  • For $z=0$

$x^2+y^2+z^2=x^2+y^2=r^2$ is a circle but that is a coincidence as it is equivalent to the intersection of a sphere ($r^2+y^2+z^2=r^2$) with a an infinite cylinder of axis $z$ and radius $r$ ($x^2+y^2=r^2$)

  • For $x=y$

$x^2+y^2+z^2=2x^2+z^2=r^2$ is in fact the equation of the union of two circles and is equivalent to $$\begin{cases} x^2+y^2+z^2 = r^2\\ x=\pm y \end{cases}$$

which is not $$\begin{cases} x^2+y^2+z^2 = r^2\\ x= y \end{cases}$$

What you probably call "the equation of a circle", i.e. $x^2+y^2=r^2$, is only valid in 2D.

To have the same kind of equation you should define a basis of your plane and look at your intersection in terms of coordinates in this basis.

For example with $x=y$ :

$(e_1=(\frac{\sqrt{2}}{2},\frac{\sqrt{2}}{2},0), e_2=(0,0,1))$ is an orthonormal basis of the plane $P$. $$\forall (x,y,z) \in P, \exists (u,v) \in \mathbb{R}^2 \ s.t. (x,y,z) = ue_1+ve_2$$

$(u,v)$ are the 2D coordinates in $P$. so you get $$\begin{cases} x= \frac{\sqrt{2}}{2}u\\ y = \frac{\sqrt{2}}{2}u \\z=v \end{cases}$$

Now if you use the sphere equation you get :

$$u^2+v^2=r^2$$ which is a circle as expected

Generalization

let $P$ be a plane s.t $(0,0) \in P$, $(e_1, e_2)$ two orthonormal vectors in $P$, $f(x,y,z)=0$ the equation of a 3D shape. Then, with $u= (X,e_1)$ and $v= (X,e_2)$ $$f(u(e_1,e_x)+v(e_2,e_x), u(e_1,e_y)+v(e_2,e_y), u(e_1,e_z)+v(e_2,e_z))=0$$ is the 2D equation of the intersection in the plane $P$

1
On

Since you want the equation in the plane of the intersection, a way to go is to transform the plane orthonormally to one of the coordinate planes, use the same transformation on the cubic, and then do your substitution ($z=0$, say).

I.e. let's map $3x+y-2z=0$ to $z=0$ by a orthonormal transformation, that is the unit normal $\frac1{\sqrt{14}}[3,1,-2]$ should map to $[0,0,1]$. You can use this answer to get $A=\begin{pmatrix}\frac1{\sqrt{140}}&-\frac{3}{\sqrt{140}}&0\\-\frac{3}{7\sqrt{10}}&-\frac1{7\sqrt{10}}&-\sqrt{10}\\\frac{3}{\sqrt{14}}&\frac1{\sqrt{14}}&-\frac{2}{\sqrt{14}}\end{pmatrix}$.

Now $x^2-x-2yx-\frac{yz^2}{4}$ is mapped by $A^{-1}$ to a long expression and setting $z=0$ we get the equation of the intersection: $\frac{49}{5}x^2-\frac{77}{900}\sqrt{350} x y+\frac{49}{4320}y^2-\frac15\sqrt{35}x+\frac{7}{120}\sqrt{10}y+\frac{49}{3456}\sqrt{35}x y^2+\frac{343}{746496}\sqrt{10}y^3$