MoI discussion forum
MoI discussion forum

Full Version: Symmetry operations, reflection, mirror

From: bemfarmer
22 Feb 2021   [#1]
A physical mirror is a reflective surface, a reflector.
Often the reflector, (mirror), is a flat piece of glass coated with silver or aluminum.
In MoI the planar mirror is accomplished with math. The virtual object is the new mirrored object

Operation of the Mirror command:
1. Select objects to mirror.
2. Pick start point.
3. Pick a (different) end point.

In MoI Top View:
The start point is on the plane of the reflector, and establishes a rotation center.
The end point, with (x and/or y) different from the start point, is also on the plane of the reflector, and determines the angle of the reflector.
The z values of the two points could be different.
Any z value different from the start point z value determines a plane of reflection.
Moving the end point changes the ANGLE of the reflector.
The z value of any point P on the object is the same as its mirror.
The new x and y value of any point P are determined by the ANGLE.

In MoI Front View:
The x and z values of the end point determine the ANGLE of the reflector.

In MoI Right View:
The y and z values of the end point determine the ANGLE of the reflector.

In MoI 3D View:
The x, y, and z values together can change the 3D angle.
****************

Suggestion for another method to perform a mirror.

1. Select objects to mirror.
2. Select the reflector plane, the plane of reflection.
3. Select a point to establish a normal to the reflector plane.
If the point is on the reflector, calculate the normal of the reflector plane, (flipped)?
If the point is not on the reflector, perform drop point to the reflector surface, and find the normal. The point on the reflector surface corresponds to Start Point. Calculate the point corresponding to the End Point. Feed the Mirror factory...
- Brian
From: bemfarmer
4 Mar 2021   [#2] In reply to [#1]
Nodeeditor has Mirror with mirrorFrame input. == Reflection
Also Rotate with Frame or rX, rY, and rZ inputs. == Rotation
Also Move by dX, dY and dZ. == Translation.
So I just have to figure out the matrix for the patch composite Transformations, and then decompose the matrix to Reflection, Rotation, and Translation matrices,
in the proper order.
Column matrices are written last to first operation, left to right, and the matrices are multiplied pairwise from left to right, with the initial point vector on the right.
Homogeneous coordinate 4X4 matrices will be used.
- Brian
From: bemfarmer
9 Mar 2021   [#3]
Attached is a simple example node program to Mirror an object, with the reflective plane located in XY or YZ, or XZ plane. Three macros were created, one for each of the three reflective planes. As can be seen in the example, the output of any one of the three plane macros provides the input for the Mirror node "MirrorFrame" input. Due to the way the two input points of the Mirror factory work, in the Mirror node (Of Karsten?), there is a small amount of difference in the "concept or behavior" between "Frame" and "Plane", but the input points internal to the three macros accomplish the CORRECT and PROPER MirrorFrame input, even though the points used for the "plane" or "frame" might seem a bit off or "strange". The three macros are correct. There is a fourth permutation of points for the ZX plane, but it is redundant and unnecessary. A fifth permutation of points for the reflective plane does not work, and is also not given. The reflective plane, XY, YZ, or XZ, corresponds to the location of a physical mirror. (Planes at other, non-right angles to axes, are not given, but would likely involve trigonometry.)
Perhaps another set of macros with an angle input could be done? Or several angle inputs...?

The zip file "MacrosForMirrorPlanesFrames" should be unzipped, and the three macros copied to the nodeeditor Macro folder, if they are desired for future use-age. The macros should be added to a node screen using right click Macro file list selection. Do not Load the macro like a node, because it comes to the node screen in expanded mode, not in proper form.

- Brian

Attachments:
MacrosForMirrorPlanesFrames.zip
MirrorReflectionPlaneExample.zip