# Affine

Each xform has an affine transform that is always applied on every iteration. This is known as the pre affine because it is applied before the variations. There is also an optional affine applied after the variations known as the post affine. If the post affine is the identity transform, it is unused.

You can right click in the numeric fields to get a menu of useful constants. Note that if you have `Right Click Toggles Spinboxes` checked in the Options dialog, then you must hold down shift for this menu to appear.

In addition to being editable by using the controls below, affines can also be edited using the following keyboard shortcuts when the focus is on the image area.

Q: rotate counter clockwise
E: rotate clockwise
W: move up
S: move down
A: move left
D: move right
G: shrink
H: grow

Hold shift to decrease amount, control to increase amount.

P: toggle visibility of xforms
L: toggle visibility of all/selected xforms

Hold shift to apply to post xforms.

### Pre affine transform

The affine transform applied to the input points before variations are applied on each iteration.

The values correspond to the usual affine transform syntax of:

```tx = Ax * By + C
ty = Dx * Ey + F
```

like so:

```A: X1, D: X2
B: Y1, E: Y2
C: O1, F: O2```

#### Enable

TogglingÂ shows/hides pre affine transforms and enables/disables the controls.

#### Reset

Reset the pre affine transform to the identity matrix.

Change the values of the pre affine transform as the tool tips describe.

#### Copy/Paste

Copy the six affine values to the clip board, which can then be pasted to any pre/post affine in any xform in any flame.

#### Random

Set each of the six values to a separate random number between -1 and 1, inclusive.

#### Swap

Swap the values of the pre and post affine transforms.

### Post affine transform

The affine transform applied to the sum gotten fromÂ applying the variations.

All controls are the same as for the pre affine, but are applied to the post affine.

### Polar

Check to display affine values in polar coordinates, uncheck to display them in Cartesian form.

### Pivot

This affects the behavior of dragging the affines in the render window.

#### When dragging the X or Y component of an affine transform and holding Shift+Alt:

Local: Rotate the point around the center of the transform.

World: Rotate the point around 0, 0.

#### When dragging the center of an affine transform and holding Shift:

Local: Rotate entire transform around the origin, keeping its local orientation fixed.

World: Rotate entire transform around the origin, also rotating the local orientation.

#### When reflecting an affine transform:

Local: Reflect horizontally and vertically around the center of the transform.

World: Reflect horizontally around the Y axis, and vertically around the X axis.