Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Mirror Point Across A Given Plane
Replies: 2   Last Post: Aug 7, 2014 11:44 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
John D'Errico

Posts: 9,058
Registered: 12/7/04
Re: Mirror Point Across A Given Plane
Posted: Aug 4, 2014 6:53 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Connor Pyles" <connor.owen.pyles@gmail.com> wrote in message <lrof52$4og$1@newscl01ah.mathworks.com>...
> Say I have a plane given by a matrix M containing 3 points, and a fourth point like this:
>
> M = [P1x P1y P1z ;
> P2x P2y P2z ;
> P3x P3y P3z ];
>
> P4 = [P4x P4y P4z];
>
> What is the easiest way to mirror the fourth point across the plane?
>
> Thanks,
> Connor


A plane is defined by the equation

dot(X - X0,N) == 0

where X0 is any point in the plane, and N is the normal vector
to that plane. Here

P1=M(1,:)

will suffice. You can get the normal vector from a cross product.

N = cross(P1 - P3,P2 - P3);

Normalize to have unit norm to make things easy...

N = N/norm(N);

Finally, create the new point as

P5 = P4 + 2*dot(P1 - P4, N)*N

John



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.