This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Reflection of a point w.r.t hyperplane

Tags: None
(comma "," separated)
linello
Registered Member
Posts
56
Karma
0
OS
Hi Eigen users.

Do someone knows if there is a simple way to compute reflections of a point with respect to an hyperplane?

Suppose for example I have a 2-dimensional plane lying in a 3-dimensional space given by the equation x=0 and I want to compute the reflected point of (1,0,0).

The result should be (-1,0,0) for example.

Clearly this method could be useful for higher dimensional hyperplanes too.

How can I do with Eigen 3.0 beta3?
I believe that Householder reflections could do a nice work in this case if paired with Hyperplane class..isn't it?


Thanks again!
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
I'm not sure that Householder reflectors are very well suited because they can only handle planes passing through the origin. With our Hyperplane class you can already do:

p = p - 2*plane.signedDistance(p)*plane.normal();
linello
Registered Member
Posts
56
Karma
0
OS
Thanks again ggael!


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft