Transforming polygons from 1 3D Coordinate system to another

*To*: mathgroup at smc.vnet.net*Subject*: [mg15285] Transforming polygons from 1 3D Coordinate system to another*From*: Andrew Bushnell <andy at anisci.com>*Date*: Thu, 31 Dec 1998 04:39:39 -0500*Organization*: Concentric Internet Services*Sender*: owner-wri-mathgroup at wolfram.com

[Mathematica solutions only. Others to the submitter vial email. - moderator] Any help appreciated... Ok, here goes... I need help in converting (or mapping) an arbitrary coplanar polygon (with a minimum of 3 vertices) from its original position to a target polygon (or plane) defined by 3 vertices. An example might help... take a right-handed coordinate system... Y | | |_____ X / / Z Lets say we have a polygon located at (3,0,0) with a normal of (1,0,0) - this example is for easy numbers but the polygon's normal could be oriented any which way. / C(3,1,0) Y / | | D / -|-----> N (1,0,0) | | |B(3,0,0) |_________| |___X / | / / |/ Z A(3,0,1) (again for simplicity) We want to transform this polygon so that its normal is aligned with the Y axis. The point A is moved to the origin (0,0,0)and the edge AB is aligned with the +Z axis. The Body of the polygon will therefor be on the XY plane. Somehow (I think) I need to define a 4x4 matrix that represents the coordinate system convertion and use this to convert all the original polygon coordinates into the new location/orientation. Someone told me that converting the coordinate values into "Vector Basis" was the was to go ???? :^) Could you help. Tx Andy