5
$\begingroup$

Bug introduced in 13.0

**Bug is fixed in Version 13.1 **


I came across the following strange behaviour with the GeometricTransformation function.

rt1 = ReflectionTransform[{-1, 1, 0}];
rt1[{x, y, z}]
rt2 = ReflectionTransform[{0, 1, -1}];
rt2[{x, y, z}]
rt3 = ReflectionTransform[{1, 0, -1}];
rt3[{x, y, z}]

The output of this is as expected giving

{y, x, z}
{x, z, y}
{z, y, x}

respectively. These are just reflections in the planes x=y, y=z and x=z.

Now if I now do this for Graphics (I have a tetrahedron that I wish to show with its mirror image).

tetrahedron = Tetrahedron[{{0, 0, 0}, {0, 0, 1}, {1, -1, 1}, {1, 1, 1}}];
tetrahedronmirrorxy = GeometricTransformation[tetrahedron, ReflectionTransform[{-1, 1, 0}]];
tetrahedronmirrorxz = GeometricTransformation[tetrahedron, ReflectionTransform[{1, 0, -1}]];
tetrahedronmirroryz = GeometricTransformation[tetrahedron, ReflectionTransform[{0, 1, -1}]];
GraphicsRow[{Show[Graphics3D[{Opacity[0.1], tetrahedronmirrorxy, tetrahedron}], PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}, Axes -> True, AxesLabel -> {"x", "y", "z"}],
Show[Graphics3D[{Opacity[0.1], tetrahedronmirrorxz, tetrahedron}], PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}, Axes -> True, AxesLabel -> {"x", "y", "z"}],
Show[Graphics3D[{Opacity[0.1], tetrahedronmirroryz, tetrahedron}], PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}, Axes -> True, AxesLabel -> {"x", "y", "z"}]}]

This gives the following output:

Plots of Tetrahedrons and mirror images

Why are the tetrahedrons in the second two images stretched ?

I am using Mathematica 13.0 on Mac OS 12.3.1

$\endgroup$
1
  • 1
    $\begingroup$ I reproduce the bug with version 13.0.1 on Windows 10 x64, but not with version 12.3. So the bug is introduced in 13.0. $\endgroup$ Commented Jun 21, 2022 at 3:40

2 Answers 2

9
$\begingroup$

It must be a bug. If we replace normal from {1, 0, -1} to {1, 0, -1} // N,it work.Here we also draw the mirror plane Hyperplane[normal, {0, 0, 0}

tetrahedron = 
  Tetrahedron[{{0, 0, 0}, {0, 0, 1}, {1, -1, 1}, {1, 1, 1}}];
normal = {1, 0, -1} // N;
Graphics3D[{{Opacity[0.1], 
   GeometricTransformation[tetrahedron, ReflectionTransform[normal]], 
   tetrahedron}, {Opacity[.8], Cyan, Hyperplane[normal, {0, 0, 0}]}}, 
 PlotRange -> {{-2, 2}, {-2, 2}, {-2, 2}}, Axes -> True]

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Thanks I will inform Wolfram Technical Support $\endgroup$
    – Dunlop
    Commented May 5, 2022 at 11:33
1
$\begingroup$

I have an answer from Technical Support.

"ReflectionTransform is not behaving properly" - Suggest that if the community agrees that this is posted as a bug.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.