Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say I have a cloud of points, and I know the equation of the symmetry plane. I'd like to mirror every single point with respect to this plane. It might be much simpler than I think, but I have some difficulties on finding a way to do that in Java.

I have the $x,y,z$ position of each point, its distance from the symmetry plane, the equation of the plane. How can I find the $x,y,z$ of the mirrored point ? I was trying to find the point of intersection between the symmetry plane and the line that passes through the point I have to mirror and with its normal being the symmetry plane.

I think it's more an Algebra problem than a Java one. But I still don't know how to do it without Java. I was trying to calculate a linear system :

Line: $ax+by+cz+d=0$

Plane $a'x+b'y+c'z+d' =0$

But it looks like some informations are missing and I can't solve it (only two equations). I hope I explained myself properly.

share|cite|improve this question

migrated from Dec 6 '11 at 22:09

This question came from our site for professional and enthusiast programmers.

"But I still don't know how to do it without Java" - Sorry, but this really is a math problem. Also, you should put a 'homework' label on this if that's what it is. If you can figure out how to do it mathematically, I'm sure everyone would be happy to help you get it working in java – jeff Dec 6 '11 at 16:17
It's not homework and yes while I was writing I figured that it was more a Math problem than a Java one.. – G4bri3l Dec 6 '11 at 16:25
Should I delete this one and ask it on ? – G4bri3l Dec 6 '11 at 16:27
See this: – leonbloy Dec 6 '11 at 16:30
Thanks leonbloy I think your suggestion should work =D – G4bri3l Dec 6 '11 at 16:38

Your can solve this problem using vector algebra.

Now suppose we have a point $P$ and a plane with normal vector $\vec{n}(|\vec{n}|=1)$ passing through point $P_0$. To find the symmetric point $P'$, we find the projection $K$ of $P$ on the plane first: $$ \vec{KP} = |\vec{KP}|\cdot \vec{n} = (\vec{P_0 P} \cdot \vec{n})\vec{n}$$


Note that $\vec{P_0 P} \cdot \vec{n}$ is actually equals to $$\frac{ax + by + cz + d}{\sqrt{a^2+b^2+c^2}} $$ You can use this form or just use the $P_0$ method in your program. Finally, we get $P'$ easily: $$ \vec{OP'} = \vec{OP} - 2\vec{KP}$$ where $O$ is the origin point $(0, 0, 0)$.

Here I suppose you use a vector library in your Java program, so your functions can handle vectors. The following pseudocode shows how to find $P'$, tough it's not Java.

function findSymmetricPoint(p:vector3D, n:vector3D, p0:vector3D) -> p1:vector3D
    n = n.normalized()
    return p - * (p - p0).dot(n))
share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.