ComposeTransformations - Maple Help

Home : Support : Online Help : Mathematics : DifferentialGeometry : ComposeTransformations

DifferentialGeometry

 ComposeTransformations
 compose a sequence of two or more transformations

 Calling Sequence ComposeTransformation(Phi1, Phi2, Phi3, ...)

Parameters

 Phi1, Phi2, Phi3 - transformations

Description

 • ComposeTransformation(Phi1, Phi2, Phi3, ...) returns the composition of the transformations Phi1, Phi2, Phi3, ..., that is, the transformation Psi = Phi1 o Phi2 o Phi3 ....  The domain frame of Phi1 must coincide with the range frame of Phi2, the domain frame of Phi2 must coincide with the range of frame of Phi3, and so on.
 • This command is part of the DifferentialGeometry package, and so can be used in the form ComposeTransformations(...) only after executing the command with(DifferentialGeometry).  It can always be used in the long form DifferentialGeometry:-ComposeTransformations.

Examples

 > $\mathrm{with}\left(\mathrm{DifferentialGeometry}\right):$

Example 1.

Define some manifolds.

 > $\mathrm{DGsetup}\left(\left[x,y\right],M\right):$$\mathrm{DGsetup}\left(\left[u,v\right],N\right):$$\mathrm{DGsetup}\left(\left[t\right],P\right):$$\mathrm{DGsetup}\left(\left[\mathrm{x1},\mathrm{x2},\mathrm{x3}\right],Q\right):$

Define transformations F: M -> N;  G: P -> M;  H: N -> Q.

 > $F≔\mathrm{Transformation}\left(M,N,\left[u=3x+2y,v=x-y\right]\right)$
 ${F}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{M}{,}{0}\right]{,}\left[{N}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[{\mathrm{RTABLE}}{}\left({36893628017300328804}{,}\left[\begin{array}{cc}{3}& {2}\\ {1}& {-1}\end{array}\right]{,}{\mathrm{Matrix}}\right)\right]\right]{,}\left[\left[{3}{}{x}{+}{2}{}{y}{,}{u}\right]{,}\left[{x}{-}{y}{,}{v}\right]\right]\right]\right)\right]\right)$ (1)
 > $G≔\mathrm{Transformation}\left(P,M,\left[x=\mathrm{cos}\left(t\right),y=\mathrm{sin}\left(t\right)\right]\right)$
 ${G}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{P}{,}{0}\right]{,}\left[{M}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{c}-\mathrm{sin}{}\left(t\right)\\ \mathrm{cos}{}\left(t\right)\end{array}\right]\right]\right]{,}\left[\left[{\mathrm{cos}}{}\left({t}\right){,}{x}\right]{,}\left[{\mathrm{sin}}{}\left({t}\right){,}{y}\right]\right]\right]\right)\right]\right)$ (2)
 > $H≔\mathrm{Transformation}\left(N,Q,\left[\mathrm{x1}=u,\mathrm{x2}=v,\mathrm{x3}=1\right]\right)$
 ${H}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{N}{,}{0}\right]{,}\left[{Q}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[{\mathrm{RTABLE}}{}\left({36893628017300321332}{,}\left[\begin{array}{cc}{1}& {0}\\ {0}& {1}\\ {0}& {0}\end{array}\right]{,}{\mathrm{Matrix}}\right)\right]\right]{,}\left[\left[{u}{,}{\mathrm{x1}}\right]{,}\left[{v}{,}{\mathrm{x2}}\right]{,}\left[{1}{,}{\mathrm{x3}}\right]\right]\right]\right)\right]\right)$ (3)

Compute the compositions F o G, H o F and H o F o G.

 > $\mathrm{ComposeTransformations}\left(F,G\right)$
 ${\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{P}{,}{0}\right]{,}\left[{N}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{c}-3{}\mathrm{sin}{}\left(t\right)+2{}\mathrm{cos}{}\left(t\right)\\ -\mathrm{sin}{}\left(t\right)-\mathrm{cos}{}\left(t\right)\end{array}\right]\right]\right]{,}\left[\left[{3}{}{\mathrm{cos}}{}\left({t}\right){+}{2}{}{\mathrm{sin}}{}\left({t}\right){,}{u}\right]{,}\left[{\mathrm{cos}}{}\left({t}\right){-}{\mathrm{sin}}{}\left({t}\right){,}{v}\right]\right]\right]\right)\right]\right)$ (4)
 > $\mathrm{ComposeTransformations}\left(H,F\right)$
 ${\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{M}{,}{0}\right]{,}\left[{Q}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[{\mathrm{RTABLE}}{}\left({36893628017300315540}{,}\left[\begin{array}{cc}{3}& {2}\\ {1}& {-1}\\ {0}& {0}\end{array}\right]{,}{\mathrm{Matrix}}\right)\right]\right]{,}\left[\left[{3}{}{x}{+}{2}{}{y}{,}{\mathrm{x1}}\right]{,}\left[{x}{-}{y}{,}{\mathrm{x2}}\right]{,}\left[{1}{,}{\mathrm{x3}}\right]\right]\right]\right)\right]\right)$ (5)
 > $\mathrm{ComposeTransformations}\left(H,F,G\right)$
 ${\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{P}{,}{0}\right]{,}\left[{Q}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{c}-3{}\mathrm{sin}{}\left(t\right)+2{}\mathrm{cos}{}\left(t\right)\\ -\mathrm{sin}{}\left(t\right)-\mathrm{cos}{}\left(t\right)\\ 0\end{array}\right]\right]\right]{,}\left[\left[{3}{}{\mathrm{cos}}{}\left({t}\right){+}{2}{}{\mathrm{sin}}{}\left({t}\right){,}{\mathrm{x1}}\right]{,}\left[{\mathrm{cos}}{}\left({t}\right){-}{\mathrm{sin}}{}\left({t}\right){,}{\mathrm{x2}}\right]{,}\left[{1}{,}{\mathrm{x3}}\right]\right]\right]\right)\right]\right)$ (6)

Example 2.

We can express the transformation T: P -> P as the composition of 3 transformations A, B, C.

 > $T≔\mathrm{Transformation}\left(P,P,\left[t=\mathrm{sqrt}\left(\mathrm{sin}\left(t\right)+2\right)\right]\right)$
 ${T}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{P}{,}{0}\right]{,}\left[{P}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{c}\frac{\mathrm{cos}{}\left(t\right)}{2{}\sqrt{\mathrm{sin}{}\left(t\right)+2}}\end{array}\right]\right]\right]{,}\left[\left[\sqrt{{\mathrm{sin}}{}\left({t}\right){+}{2}}{,}{t}\right]\right]\right]\right)\right]\right)$ (7)
 > $A≔\mathrm{Transformation}\left(P,P,\left[t=\mathrm{sin}\left(t\right)\right]\right)$
 ${A}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{P}{,}{0}\right]{,}\left[{P}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{c}\mathrm{cos}{}\left(t\right)\end{array}\right]\right]\right]{,}\left[\left[{\mathrm{sin}}{}\left({t}\right){,}{t}\right]\right]\right]\right)\right]\right)$ (8)
 > $B≔\mathrm{Transformation}\left(P,P,\left[t=t+2\right]\right)$
 ${B}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{P}{,}{0}\right]{,}\left[{P}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[{\mathrm{RTABLE}}{}\left({36893628017300288204}{,}\left[\begin{array}{c}{1}\end{array}\right]{,}{\mathrm{Matrix}}\right)\right]\right]{,}\left[\left[{t}{+}{2}{,}{t}\right]\right]\right]\right)\right]\right)$ (9)
 > $C≔\mathrm{Transformation}\left(P,P,\left[t=\mathrm{sqrt}\left(t\right)\right]\right)$
 ${C}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{P}{,}{0}\right]{,}\left[{P}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{c}\frac{1}{2{}\sqrt{t}}\end{array}\right]\right]\right]{,}\left[\left[\sqrt{{t}}{,}{t}\right]\right]\right]\right)\right]\right)$ (10)
 > $S≔\mathrm{ComposeTransformations}\left(C,B,A\right)$
 ${S}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{P}{,}{0}\right]{,}\left[{P}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{c}\frac{\mathrm{cos}{}\left(t\right)}{2{}\sqrt{\mathrm{sin}{}\left(t\right)+2}}\end{array}\right]\right]\right]{,}\left[\left[\sqrt{{\mathrm{sin}}{}\left({t}\right){+}{2}}{,}{t}\right]\right]\right]\right)\right]\right)$ (11)
 > $\mathrm{Tools}:-\mathrm{DGequal}\left(T,S\right)$
 ${\mathrm{true}}$ (12)

Example 3.

We can check that the transformation K is the inverse of the transformation F.

 > $K≔\mathrm{Transformation}\left(N,M,\left[x=\frac{2}{5}v+\frac{1}{5}u,y=\frac{1}{5}u-\frac{3}{5}v\right]\right)$
 ${K}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{N}{,}{0}\right]{,}\left[{M}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[{\mathrm{RTABLE}}{}\left({36893628017280943636}{,}\left[\begin{array}{cc}\frac{{1}}{{5}}& \frac{{2}}{{5}}\\ \frac{{1}}{{5}}& {-}\frac{{3}}{{5}}\end{array}\right]{,}{\mathrm{Matrix}}\right)\right]\right]{,}\left[\left[\frac{{2}}{{5}}{}{v}{+}\frac{{1}}{{5}}{}{u}{,}{x}\right]{,}\left[\frac{{1}}{{5}}{}{u}{-}\frac{{3}}{{5}}{}{v}{,}{y}\right]\right]\right]\right)\right]\right)$ (13)
 > $\mathrm{ComposeTransformations}\left(F,K\right)$
 ${\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{N}{,}{0}\right]{,}\left[{N}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[{\mathrm{RTABLE}}{}\left({36893628017280939300}{,}\left[\begin{array}{cc}{1}& {0}\\ {0}& {1}\end{array}\right]{,}{\mathrm{Matrix}}\right)\right]\right]{,}\left[\left[{u}{,}{u}\right]{,}\left[{v}{,}{v}\right]\right]\right]\right)\right]\right)$ (14)
 > $\mathrm{ComposeTransformations}\left(K,F\right)$
 ${\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{M}{,}{0}\right]{,}\left[{M}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[{\mathrm{RTABLE}}{}\left({36893628017280934364}{,}\left[\begin{array}{cc}{1}& {0}\\ {0}& {1}\end{array}\right]{,}{\mathrm{Matrix}}\right)\right]\right]{,}\left[\left[{x}{,}{x}\right]{,}\left[{y}{,}{y}\right]\right]\right]\right)\right]\right)$ (15)

Example 4.

If pi: E -> M is a fiber bundle, then a section s of E is a transformation s: M -> E such that pi o s = identity on M.

Check that the map s is a section for E.

 > $\mathrm{DGsetup}\left(\left[u,v,w\right],E\right):$$\mathrm{DGsetup}\left(\left[x,y\right],M\right):$
 > $\mathrm{pi}≔\mathrm{Transformation}\left(E,M,\left[x=uv+{w}^{2},y={u}^{2}+{w}^{2}\right]\right)$
 ${\mathrm{π}}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{E}{,}{0}\right]{,}\left[{M}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{ccc}v& u& 2{}w\\ 2{}u& 0& 2{}w\end{array}\right]\right]\right]{,}\left[\left[{u}{}{v}{+}{{w}}^{{2}}{,}{x}\right]{,}\left[{{u}}^{{2}}{+}{{w}}^{{2}}{,}{y}\right]\right]\right]\right)\right]\right)$ (16)
 > $s≔\mathrm{Transformation}\left(M,E,\left[u=\mathrm{sqrt}\left(y\right),v=\frac{x}{\mathrm{sqrt}\left(y\right)},w=0\right]\right)$
 ${s}{≔}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{M}{,}{0}\right]{,}\left[{E}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[\left[\begin{array}{cc}0& \frac{1}{2{}\sqrt{y}}\\ \frac{1}{\sqrt{y}}& -\frac{x}{2{}{y}^{3}{2}}}\\ 0& 0\end{array}\right]\right]\right]{,}\left[\left[\sqrt{{y}}{,}{u}\right]{,}\left[\frac{{x}}{\sqrt{{y}}}{,}{v}\right]{,}\left[{0}{,}{w}\right]\right]\right]\right)\right]\right)$ (17)
 > $\mathrm{ComposeTransformations}\left(\mathrm{pi},s\right)$
 ${\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{_DG}}{}\left(\left[\left[{"transformation"}{,}\left[\left[{M}{,}{0}\right]{,}\left[{M}{,}{0}\right]\right]{,}\left[{}\right]{,}\left[{\mathrm{RTABLE}}{}\left({36893628017280918580}{,}\left[\begin{array}{cc}{1}& {0}\\ {0}& {1}\end{array}\right]{,}{\mathrm{Matrix}}\right)\right]\right]{,}\left[\left[{x}{,}{x}\right]{,}\left[{y}{,}{y}\right]\right]\right]\right)\right]\right)$ (18)