The general problem is projecting a polygon onto a plane is widely solved, but I was wondering if anybody could make some suggestions for my particular case.
I have a planar polygon P in 3-space and I would like to project it onto the plane through the origin that is orthogonal to the unit vector u. The vertices of P and the coordinates of u are the only data I have (all w.r.t. the standard basis of R^3).
However, I don't just want the projected coordinates. I actually would like to find an orthonormal basis of the plane orthogonal to u and to then find the coordinates of the projected vertices in this new basis.
The basis itself doesn't matter so long as it is orthonormal. So really I need to do two things within the framework of the GNU Scientific Library:
(1) Find two orthonormal basis vectors for the homogeneous plane orthogonal to the unit vector u.
(2) Find the coordinates in this basis of the projection of P's vertices onto the plane.
Any ideas on how to do this using gsl?