i'm trying to write
a tool to mirror the transformation of an object across an arbitrary plane,
and was wondering if anyone could help me out.
i'm only somewhat familiar with vector maths, so go easy.
its application is for an animation package, and basically it will work
like this. the user specifies object A to mirror, and object B to act
as the plane to mirror across. then using the yz plane from object B,
the translation and rotation are then mirrored and re-applied to object
I've been intending
to do some stuff about reflections because its related to rotations. So
I'll try to give a quick answer now, and if no one else does I'll try
to have a fuller answer later.
I assume your objects are defined in terms of 3D points, so the problem
comes down to reflecting a number of 3D points across a plane.
One way I can see to do this graphically, is as follows, if:
P1 = a point you want to reflect (input)
P2 = the reflected point (output)
PN = a point 'P' on the plane such that, a vector from P1 to PN is normal
to the plane
yeah its not quite
as simple as reflecting just points. as my object is essentially a single
body, with rotation as well as translation properties. so i need to reflect
the translation of its origin, but also reflect the rotation of its local
axes. the problem of course is that the reflection won't be a true reflection,
because it has to remain a right handed system.
does that make any sense? it just has to be a visual reflection of the
rotation, as the handedness cannot change.
If you do a reflection (say by inverting one axis) then the component
of any vector which is normal to the mirror plane will be inverted. Rotation
can be represented by a vector along the axis of rotation and this would
be inverted in the same way. Since the rotation vector is inverted and
the coordinate vectors are inverted, they will cancel out and the object
will appear to rotate in the same direction.
Where I can, I have put links to Amazon for books that are relevant to
the subject, click on the appropriate country flag to get more details
of the book or to buy it from them.
Clifford Algebra to Geometric Calculus: A Unified Language for Mathematics and
Physics (Fundamental Theories of Physics). This book is intended for mathematicians
and physicists rather than programmers, it is very theoretical. It covers the
algebra and calculus of multivectors of any dimension and is not specific to 3D modelling.