Now we're ready to create a macro that will do the transformation for us. This is actually very simple. Macro creation always follows the same pattern:
  • First, select the points that the construction depends on (these are called the parameters).
  • Then we select the points that we have constructed from the parameters (these are called the targets).
  • If no targets are selected, then all objects that depend on the parameters will be constructed by the macro -- including their color and style (if targets are selected, then the macro ignores color and style). 
For the macro we're creating 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 Macro. The icon changes to Macro Parameters, indicating that you should now select the parameters.
  • 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 to Macro targets.
  • Select the target object P*. Select the macro icon once more: it changes back to the original icon.
  • A dialog boxopens. Enter a name like "2x dilation 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 what happens. 

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!