Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm interested in implementing symmetry groups. So it would be useful to have central symmetry (isometry transformation). There are built-in functions: RotationTransform, TranslationTransform and ReflectionTransform, but I was not able to find something like central symmetry. The goal is to translate one object of any kind (image or built-in graphical primitives) into the symmetric analog to it.

If anyone has any thoughts, please write!

share|improve this question
2  
By central symmetry, do you mean point reflection? If that is the case, you can use ScalingTransform[{-1,-1,-1},{p1,p2,p3}]. This will reflect your graphics object about the point $(p1,p2,p3)$. I assume you plan to use it for 3-dimensional graphics object. –  Michael Wijaya Jun 9 '12 at 4:08
    
@MichaelWijaya That sounds like the correct interpretation; you should go ahead and turn that into an answer. –  Brett Champion Jun 9 '12 at 19:22
add comment

migrated from stackoverflow.com Jun 8 '12 at 23:00

This question came from our site for professional and enthusiast programmers.

1 Answer

Point reflection in dimension 2 coincides with a half-turn, so RotationTransform suffices in that case.

In[1]:= TransformationMatrix@ScalingTransform[{-1,-1},{p1,p2}]
Out[1]= {{-1,0,2 p1},{0,-1,2 p2},{0,0,1}}
In[2]:= TransformationMatrix@RotationTransform[Pi,{p1,p2}]
Out[2]= {{-1,0,2 p1},{0,-1,2 p2},{0,0,1}}

In dimension 3, point reflection is an orientation-reversing isometry, so it no longer coincides with RotationTransform. However, it is still an isometry generated by reflections. So strictly speaking, we can obtain point reflection by composing ReflectionTransform along three mutually-orthogonal vectors. Nevertheless, it is more convenient to use ScalingTransform instead.

The following example is adapted from the documentation for ReflectionTransform:

In[3]:= cow=ExampleData[{"Geometry3D","Cow"},"GraphicsComplex"];
In[4]:= Graphics3D[{
          EdgeForm[None],Opacity[0.5],Lighter[ColorData[1,1],0.5],
          cow
         },Boxed->False]

Original cow

Now we apply our point reflection to the cow about the origin:

In[5]:= Graphics3D[{
          EdgeForm[None],Opacity[0.5],Lighter[ColorData[1,1],0.5],
          GeometricTransformation[cow,ScalingTransform[{-1,-1,-1},{0,0,0}]]
         },Boxed->False]

Point-reflected cow

If you are interested in isometries in dimensions higher than 3, then things get more complicated. The isometry group of $\mathbb{R}^{n}$ is the semi-direct product of translations and isometries fixing the origin, so we need only understand the latter (the orthogonal group $O(n)$). The good news is that by the Cartan-Dieudonné theorem, every element of $O(n)$ is a composition of at most $n$ reflections, so there is no need to implement a new geometric transformation. However, see the MathOverflow post for more information about challenges in enumerating even finite subgroups of isometries in dimensions $n\geq5$.

share|improve this answer
    
Szabolcs' image uploader came in handy. –  Michael Wijaya Jun 9 '12 at 20:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.