Wolfram: Compose Transformations

By Xah Lee. Date: . Last updated: .

Composition of Transformations

Composition[a,b,c,etc]

🔸 SHORT SYNTAX: a @* b @* c @* etc

Return the composition of functions. The application order is right to left.

Composition[a,b,c]
(* a @* b @* c *)

Composition[a,b,c][x]
(* a[b[c[x]]] *)

Example: Composition of Transformations

(* show the input and output of transform functions.
and composition on them. *)

RotationTransform[10 Degree ]
(* TransformationFunction[{{Cos[10*Degree], -Sin[10*Degree], 0}, {Sin[10*Degree], Cos[10*Degree], 0}, {0, 0, 1}}] *)

RotationTransform[10 Degree ][{a,b}]
(* {a*Cos[10*Degree] - b*Sin[10*Degree], b*Cos[10*Degree] + a*Sin[10*Degree]} *)

(* HHHH------------------------------ *)

TranslationTransform[ {1,0} ]
(* TransformationFunction[{{1, 0, 1}, {0, 1, 0}, {0, 0, 1}}] *)

TranslationTransform[ {1,0} ][{a,b}]
(* {1 + a, b} *)

(* HHHH------------------------------ *)

Composition[ RotationTransform[10 Degree ], TranslationTransform[ {1,0} ] ]
(* TransformationFunction[{{Cos[10*Degree], -Sin[10*Degree], Cos[10*Degree]}, {Sin[10*Degree], Cos[10*Degree], Sin[10*Degree]}, {0, 0, 1}}] *)

Composition[ RotationTransform[10 Degree ], TranslationTransform[ {1,0} ] ][{a,b}]
(* {Cos[10*Degree] + a*Cos[10*Degree] - b*Sin[10*Degree], b*Cos[10*Degree] + Sin[10*Degree] + a*Sin[10*Degree]} *)

Wolfram. Graphics Programing