We now make a macro from the transformation. This is very simple. We need a pattern construction. In this construction, we select the points it depends on (the parameters). Then we select the targets of the macros. The last step is necessary only, if we wish to hide the intermediate steps, or if we want to give the targets the current color and style. If no targets are selected, all objects depending on the parameters will be constructed by the macro. Here, the parameters are O and P, and the target is P*.

 

Create a macro that maps P to P*.

  • Select the macro generation tool. The macro icon changes.
  • Now select O and then P as parameters for your macro.
  • Click the macro icon again to turn on the target selection. The macro icon changes again.
  • Now select the target object P*. Select the macro icon once more. It will changed again.
  • A dialog opens. Enter a name like "2x dilatation and 90° rotation".

Now, apply the macro to the other corner points.

  • Right click at some empty space and select the macro from the list of macros.
  • Click on O, and then on the triangle corner you wish to transform.
  • Repeat the same with all corners of the triangles.
  • Complete the triangle with the tool for filled polygons.
  • Play with the corners of the triangle to see the effect.

For a challenge, create a macro that takes all three sides of the triangle (and O) as parameters and has the three image points and the image triangle as targets.

 

End of the tutorial!