Script for constructing an
affine transformation
Note: This method allows only positive values of the parameters, but it allows the manipulation separately of each of the six parameters. Available soon is the script for the same form of transformation, but with the column vectors [a c], [b d], and [e f], manipulable as vectors.

The completed product resulting from playing the script (after dragging a few of the given points in order to 'straighten out' the slider bars) looks like this:

More notes: The point (x,y) to be transformed, which appears at
the intersection of the dashed lines, is not actually labeled
by the script, because it is one of the 'givens' of the script,
while its image (x',y') is labeled. The two unlabeled points on
the left just below the x-axis in the diagram control how far
apart the slider bars are; once you have that distance the way
you want it, they can be hidden. Labels can be hidden to avoid
clutter. The labels a, b, c, d, e, and f are the labels for the
segments in thick lines on the sliders. When you play the script,
if you use the origin and unit point of the built-in coordinate
system, those segment lengths are the correct values of the parameters
of the affine transformation. If you don't use the built-in coordinate
system, then you must divide the segment lengths by m(EF) to get
the correct parameter values.
Now for the script, with annotated givens so that by referring
to the picture above, you can place the givens appropriately:
Given:
1. Point A [left-hand endpoint of the slider for parameter a]
2. Point B [right-hand endpoint of the slider for parameter a]
Align A and B so that AB is roughly horizontal - better alignment
can be made after the script is played.
3. Point C [Place out of the way off to the left side.]
4. Point D [Segment CD will determine how far apart the slider
bars are; place D directly below C and close to C.]
5. Point E [E is the origin of a coordinate system; when you play
the script, you can select the origin of the built-in coordinate
system to be E, but if you do so in making the script, that will
limit your ability to build this script into other scripts.]
6. Point F [F will be the unit point of a coordinate system.]
7. Point (x,y) [the point to be affinely transformed]
8. Point H [bottom point of the slider bar for the vertical transformation
component, f]
9. Point I [top point of the slider bar for the vertical transformation
component, f]
Steps:
1. Let k = Segment between Point B and Point A.
2. Let [J] = Random point on Segment A.
3. Let k' = Image of Segment k translated by vector C->D.
4. Let [A'] = Image of Point A translated by vector C->D.
5. Let k'' = Image of Segment k' translated by vector C->D.
6. Let [A''] = Image of Point [A'] translated by vector C->D.
7. Let k''' = Image of Segment k'' translated by vector C->D.
8. Let [A'''] = Image of Point [A''] translated by vector C->D.
9. Let [k''''] = Image of Segment k''' translated by vector
C->D.
10. Let [A''''] = Image of Point [A'''] translated by vector
C->D.
11. Let [K] = Random point on Segment k'.
12. Let [L] = Random point on Segment k''.
13. Let [M] = Random point on Segment k'''.
14. Let [N] = Random point on Segment [k''''].
15. Let unit = Line between Point F and Point E.
16. Let [j] = Perpendicular to Line unit through Point E.
17. Let [k] = Perpendicular to Line unit through Point (x,y).
18. Let [l] = Perpendicular to Line [j] through Point (x,y).
19. Let y = Intersection of Line [l] and Line [j].
20. Let x = Intersection of Line [k] and Line unit.
21. Let [m] = Segment between Point I and Point H.
22. Let [Q] = Random point on Segment [m].
23. Let a = Segment between Point [J] and Point A.
24. Let b = Segment between Point [K] and Point [A'].
25. Let c = Segment between Point [L] and Point [A''].
26. Let d = Segment between Point [M] and Point [A'''].
27. Let [n] = Segment between Point F and Point E.
28. Let ax = Image of Point x dilated by ratio a/[n] about
center Point E.
29. Let [O'] = Image of Point y dilated by ratio b/[n] about
center Point E.
30. Let [O''] = Image of Point [O'] rotated -90 degrees about
center Point E.
31. Let ax+by = Image of Point ax translated by vector E->[O''].
32. Let ax+by+e = Image of Point ax+by translated by vector
[A'''']->[N].
33. Let [o] = Perpendicular to Line unit through Point ax+by+e.
34. Let [P'] = Image of Point x dilated by ratio c/[n] about
center Point E.
35. Let [P''] = Image of Point [P'] rotated 90 degrees about
center Point E.
36. Let dy = Image of Point y dilated by ratio d/[n] about
center Point E.
37. Let cx+dy = Image of Point dy translated by vector E->[P''].
38. Let cx+dy+f = Image of Point cx+dy translated by vector
H->[Q].
39. Let [p] = Perpendicular to Line [j] through Point cx+dy+f.
40. Let e = Segment between Point [N] and Point [A''''].
41. Let f = Segment between Point [Q] and Point H.
42. Let (x',y') = Intersection of Line [o] and Line [p].