Wiki page
[Affine Transform] by
sandro
2015-05-23 13:16:37.
0000: 44 20 32 30 31 35 2d 30 35 2d 32 33 54 31 33 3a D 2015-05-23T13:
0010: 31 36 3a 33 37 2e 30 39 36 0a 4c 20 41 66 66 69 16:37.096.L Affi
0020: 6e 65 5c 73 54 72 61 6e 73 66 6f 72 6d 0a 50 20 ne\sTransform.P
0030: 61 61 65 66 35 30 36 39 63 35 35 32 35 36 63 33 aaef5069c55256c3
0040: 61 36 34 38 33 33 63 39 38 31 63 31 30 64 34 65 a64833c981c10d4e
0050: 34 34 62 63 36 36 66 32 0a 55 20 73 61 6e 64 72 44bc66f2.U sandr
0060: 6f 0a 57 20 33 39 33 35 37 0a 3c 61 20 68 72 65 o.W 39357.<a hre
0070: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 f="https://www.g
0080: 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 aia-gis.it/fossi
0090: 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f l/libspatialite/
00a0: 77 69 6b 69 3f 6e 61 6d 65 3d 34 2e 32 2e 30 2d wiki?name=4.2.0-
00b0: 64 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 0d 0a 3c doc">back</a>..<
00c0: 68 32 3e 41 66 66 69 6e 65 20 54 72 61 6e 73 66 h2>Affine Transf
00d0: 6f 72 6d 61 74 69 6f 6e 73 3c 2f 68 32 3e 0d 0a ormations</h2>..
00e0: 53 74 61 72 74 69 6e 67 20 73 69 6e 63 65 20 76 Starting since v
00f0: 65 72 73 69 6f 6e 20 3c 62 3e 34 2e 33 2e 30 3c ersion <b>4.3.0<
0100: 2f 62 3e 20 53 70 61 74 69 61 4c 69 74 65 20 73 /b> SpatiaLite s
0110: 75 70 70 6f 72 74 73 20 73 65 76 65 72 61 6c 20 upports several
0120: 6e 65 77 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e new SQL function
0130: 73 20 62 61 73 65 64 20 6f 6e 20 3c 61 20 68 72 s based on <a hr
0140: 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 ef="http://en.wi
0150: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 kipedia.org/wiki
0160: 2f 41 66 66 69 6e 65 5f 74 72 61 6e 73 66 6f 72 /Affine_transfor
0170: 6d 61 74 69 6f 6e 22 3e 61 66 66 69 6e 65 20 74 mation">affine t
0180: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 3c 2f ransformations</
0190: 61 3e 2c 3c 62 72 3e 0d 0a 55 6e 64 65 72 73 74 a>,<br>..Underst
01a0: 61 6e 64 69 6e 67 20 61 6e 64 20 6d 61 73 74 65 anding and maste
01b0: 72 69 6e 67 20 61 6c 6c 20 74 68 65 20 75 6e 64 ring all the und
01c0: 65 72 6c 61 79 69 6e 67 20 6d 61 74 68 65 6d 61 erlaying mathema
01d0: 74 69 63 73 20 63 6f 75 6c 64 20 65 61 73 69 6c tics could easil
01e0: 79 20 62 65 20 61 20 72 61 74 68 65 72 20 64 69 y be a rather di
01f0: 66 66 69 63 75 6c 74 20 74 61 73 6b 2c 20 6d 6f fficult task, mo
0200: 72 65 20 6e 6f 74 61 62 6c 79 20 69 66 20 79 6f re notably if yo
0210: 75 20 68 61 76 65 20 61 62 73 6f 6c 75 74 65 6c u have absolutel
0220: 79 20 6e 6f 20 66 61 6d 69 6c 69 61 72 69 74 79 y no familiarity
0230: 20 77 69 74 68 20 74 68 69 73 20 6b 69 6e 64 20 with this kind
0240: 6f 66 20 6f 70 65 72 61 74 69 6f 6e 73 2e 3c 62 of operations.<b
0250: 72 3e 0d 0a 53 6f 20 77 65 27 6c 6c 20 73 74 61 r>..So we'll sta
0260: 72 74 20 73 6c 6f 77 6c 79 20 61 6e 64 20 73 6d rt slowly and sm
0270: 6f 6f 74 68 6c 79 20 62 79 20 69 6e 74 72 6f 64 oothly by introd
0280: 75 63 69 6e 67 20 66 69 72 73 74 20 61 20 76 65 ucing first a ve
0290: 72 79 20 73 69 6d 70 6c 65 20 70 72 61 63 74 69 ry simple practi
02a0: 63 61 6c 20 65 78 61 6d 70 6c 65 20 62 61 73 65 cal example base
02b0: 64 20 6f 6e 20 6b 69 6e 64 20 6f 66 20 61 20 6a d on kind of a j
02c0: 6f 6b 65 20 61 62 6f 75 74 20 74 68 65 20 67 65 oke about the ge
02d0: 6f 67 72 61 70 68 79 20 6f 66 20 49 74 61 6c 79 ography of Italy
02e0: 20 61 6e 64 20 53 69 63 69 6c 79 2e 0d 0a 3c 68 and Sicily...<h
02f0: 32 3e 46 61 6e 63 79 20 47 65 6f 67 72 61 70 68 2>Fancy Geograph
0300: 79 20 61 6e 64 20 61 6d 75 73 69 6e 67 20 4d 61 y and amusing Ma
0310: 74 68 3c 2f 68 32 3e 0d 0a 3c 74 61 62 6c 65 20 th</h2>..<table
0320: 62 6f 72 64 65 72 3d 22 31 22 20 63 65 6c 6c 73 border="1" cells
0330: 70 61 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c 70 pacing="4" cellp
0340: 61 64 64 69 6e 67 3d 22 38 22 3e 0d 0a 3c 74 72 adding="8">..<tr
0350: 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 50 72 65 70 61 ><td>..<h3>Prepa
0360: 72 69 6e 67 20 74 6f 20 73 74 61 72 74 3c 2f 68 ring to start</h
0370: 33 3e 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 64 6f 3>..<ol>..<li>do
0380: 77 6e 6c 6f 61 64 20 74 68 65 20 3c 61 20 68 72 wnload the <a hr
0390: 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e ef="https://www.
03a0: 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 gaia-gis.it/gaia
03b0: 2d 73 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 63 -sins/affine-pic
03c0: 73 2f 69 74 61 6c 79 2e 7a 69 70 22 3e 73 61 6d s/italy.zip">sam
03d0: 70 6c 65 20 64 61 74 61 73 65 74 3c 2f 61 3e 3c ple dataset</a><
03e0: 62 72 3e 0d 0a 28 69 74 20 73 69 6d 70 6c 79 20 br>..(it simply
03f0: 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 61 corresponds to a
0400: 20 73 6c 69 67 68 74 6c 79 20 72 65 2d 61 64 61 slightly re-ada
0410: 70 74 65 64 20 76 65 63 74 6f 72 20 6d 61 70 20 pted vector map
0420: 6f 66 20 49 74 61 6c 79 27 73 20 52 65 67 69 6f of Italy's Regio
0430: 6e 73 20 61 73 20 6f 72 69 67 69 6e 61 6c 6c 79 ns as originally
0440: 20 72 65 6c 65 61 73 65 64 20 62 79 20 3c 61 20 released by <a
0450: 68 72 65 66 3f 22 68 74 74 70 3a 2f 2f 77 77 77 href?"http://www
0460: 2e 69 73 74 61 74 2e 69 74 2f 69 74 2f 61 72 63 .istat.it/it/arc
0470: 68 69 76 69 6f 2f 31 30 34 33 31 37 22 3e 49 53 hivio/104317">IS
0480: 54 41 54 3c 2f 61 3e 20 75 6e 64 65 72 20 43 43 TAT</a> under CC
0490: 2d 42 59 20 6c 69 63 65 6e 73 65 20 74 65 72 6d -BY license term
04a0: 73 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 s).</li>..<li><i
04b0: 3e 75 6e 7a 69 70 3c 2f 69 3e 20 74 68 65 20 64 >unzip</i> the d
04c0: 6f 77 6e 6c 6f 61 64 65 64 20 64 61 74 61 73 65 ownloaded datase
04d0: 74 20 61 6e 64 20 69 6d 70 6f 72 74 20 74 68 65 t and import the
04e0: 20 53 68 61 70 65 66 69 6c 65 20 69 6e 74 6f 20 Shapefile into
04f0: 61 20 53 70 61 74 69 61 4c 69 74 65 20 44 42 20 a SpatiaLite DB
0500: 66 69 6c 65 2e 0d 0a 54 68 65 20 61 70 70 72 6f file...The appro
0510: 70 72 69 61 74 65 20 69 6d 70 6f 72 74 20 73 65 priate import se
0520: 74 74 69 6e 67 73 20 61 72 65 20 73 68 6f 77 6e ttings are shown
0530: 20 69 6e 20 74 68 65 20 73 69 64 65 20 66 69 67 in the side fig
0540: 75 72 65 3a 3c 62 72 3e 0d 0a 3c 69 3e 53 52 49 ure:<br>..<i>SRI
0550: 44 3c 2f 69 3e 3d 3c 62 3e 33 32 36 33 32 3c 2f D</i>=<b>32632</
0560: 62 3e 2c 20 3c 69 3e 63 68 61 72 73 65 74 3c 2f b>, <i>charset</
0570: 69 3e 3d 3c 62 3e 43 50 31 32 35 32 3c 2f 62 3e i>=<b>CP1252</b>
0580: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 45 78 74 72 .</li>..<li>Extr
0590: 61 63 74 20 53 69 63 69 6c 79 20 69 6e 20 61 20 act Sicily in a
05a0: 73 65 6c 66 20 73 74 61 6e 64 69 6e 67 20 44 42 self standing DB
05b0: 20 74 61 62 6c 65 20 62 79 20 65 78 65 63 75 74 table by execut
05c0: 69 6e 67 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e ing the followin
05d0: 67 20 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 73 g SQL statements
05e0: 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 43 :..<verbatim>..C
05f0: 52 45 41 54 45 20 54 41 42 4c 45 20 73 69 63 69 REATE TABLE sici
0600: 6c 69 61 20 41 53 0d 0a 53 45 4c 45 43 54 20 2a lia AS..SELECT *
0610: 20 46 52 4f 4d 20 69 74 61 6c 79 20 57 48 45 52 FROM italy WHER
0620: 45 20 63 6f 64 5f 72 65 67 20 3d 20 31 39 3b 0d E cod_reg = 19;.
0630: 0a 0d 0a 53 45 4c 45 43 54 20 52 65 63 6f 76 65 ...SELECT Recove
0640: 72 47 65 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 rGeometryColumn(
0650: 27 73 69 63 69 6c 69 61 27 2c 20 27 67 65 6f 6d 'sicilia', 'geom
0660: 65 74 72 79 27 2c 20 33 32 36 33 32 2c 20 27 4d etry', 32632, 'M
0670: 55 4c 54 49 50 4f 4c 59 47 4f 4e 27 2c 20 27 58 ULTIPOLYGON', 'X
0680: 59 27 29 3b 0d 0a 0d 0a 44 45 4c 45 54 45 20 46 Y');....DELETE F
0690: 52 4f 4d 20 69 74 61 6c 79 20 57 48 45 52 45 20 ROM italy WHERE
06a0: 63 6f 64 5f 72 65 67 20 3d 20 31 39 3b 0d 0a 3c cod_reg = 19;..<
06b0: 2f 76 65 72 62 61 74 69 6d 3e 0d 0a 3c 2f 6c 69 /verbatim>..</li
06c0: 3e 0d 0a 3c 6c 69 3e 74 68 61 74 27 73 20 61 6c >..<li>that's al
06d0: 6c 3a 20 79 6f 75 20 61 72 65 20 6e 6f 77 20 72 l: you are now r
06e0: 65 61 64 79 20 74 6f 20 73 74 61 72 74 20 74 68 eady to start th
06f0: 69 73 20 66 75 6e 6e 79 20 28 61 6e 64 20 6e 6f is funny (and no
0700: 74 20 74 6f 6f 20 6d 75 63 68 20 73 65 72 69 6f t too much serio
0710: 75 73 29 20 74 75 74 6f 72 69 61 6c 20 61 62 6f us) tutorial abo
0720: 75 74 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 ut Affine Transf
0730: 6f 72 6d 61 74 69 6f 6e 73 2e 3c 2f 6c 69 3e 0d ormations.</li>.
0740: 0a 3c 2f 6f 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 .</ol>..</td><td
0750: 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 >..<img src="htt
0760: 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 ps://www.gaia-gi
0770: 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 61 s.it/gaia-sins/a
0780: 66 66 69 6e 65 2d 70 69 63 73 2f 6c 6f 61 64 2d ffine-pics/load-
0790: 73 68 70 2e 70 6e 67 22 20 61 6c 74 3d 22 6c 6f shp.png" alt="lo
07a0: 61 64 2d 73 68 70 22 20 62 6f 72 64 65 72 3d 22 ad-shp" border="
07b0: 31 22 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 1">..</td></tr>.
07c0: 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 50 .<tr><td>..<h3>P
07d0: 72 65 66 61 63 65 3c 2f 68 33 3e 0d 0a 4c 6f 6f reface</h3>..Loo
07e0: 6b 20 61 74 20 61 20 6d 61 70 20 6f 66 20 49 74 k at a map of It
07f0: 61 6c 79 3b 20 69 74 20 61 70 70 65 61 72 73 20 aly; it appears
0800: 6f 62 76 69 6f 75 73 20 61 74 20 66 69 72 73 74 obvious at first
0810: 20 67 6c 61 6e 63 65 20 74 68 61 74 20 53 69 63 glance that Sic
0820: 69 6c 79 20 69 73 20 6c 6f 63 61 74 65 64 20 69 ily is located i
0830: 6e 20 61 20 76 65 72 79 20 69 6e 63 6f 6e 76 65 n a very inconve
0840: 6e 69 65 6e 74 20 70 6f 73 69 74 69 6f 6e 3a 0d nient position:.
0850: 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 53 69 63 69 6c .<ol>..<li>Sicil
0860: 79 20 69 73 20 70 6c 61 63 65 64 20 74 6f 6f 20 y is placed too
0870: 66 61 72 20 53 6f 75 74 68 20 61 6e 64 20 74 6f far South and to
0880: 6f 20 6d 75 63 68 20 63 6c 6f 73 65 20 74 6f 20 o much close to
0890: 4e 6f 72 74 68 20 41 66 72 69 63 61 3b 20 74 68 North Africa; th
08a0: 69 73 20 69 6d 70 6c 69 65 73 20 61 6e 20 75 6e is implies an un
08b0: 70 6c 65 61 73 61 6e 74 20 74 6f 72 72 69 64 20 pleasant torrid
08c0: 73 75 6d 6d 65 72 2c 20 61 6e 64 20 74 68 69 73 summer, and this
08d0: 20 6c 61 74 65 72 20 70 6f 73 65 73 20 69 6e 20 later poses in
08e0: 74 75 72 6e 20 6d 61 6e 79 20 73 65 76 65 72 65 turn many severe
08f0: 20 6c 69 6d 69 74 61 74 69 6f 6e 73 20 74 6f 20 limitations to
0900: 61 67 72 69 63 75 6c 74 75 72 61 6c 20 61 63 74 agricultural act
0910: 69 76 69 74 69 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c ivities.</li>..<
0920: 6c 69 3e 54 68 65 20 3c 61 20 68 72 65 66 3d 22 li>The <a href="
0930: 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 http://en.wikipe
0940: 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 53 74 72 dia.org/wiki/Str
0950: 61 69 74 5f 6f 66 5f 4d 65 73 73 69 6e 61 22 3e ait_of_Messina">
0960: 53 74 72 61 69 74 20 6f 66 20 4d 65 73 73 69 6e Strait of Messin
0970: 61 3c 2f 61 3e 20 69 73 20 65 78 61 67 67 65 72 a</a> is exagger
0980: 61 74 65 64 6c 79 20 6e 61 72 72 6f 77 2c 20 74 atedly narrow, t
0990: 68 75 73 20 70 6f 73 69 6e 67 20 73 65 76 65 72 hus posing sever
09a0: 65 20 73 61 66 65 74 79 20 72 69 73 6b 73 20 20 e safety risks
09b0: 74 6f 20 74 68 65 20 6e 61 76 69 67 61 74 69 6f to the navigatio
09c0: 6e 20 6f 66 20 63 61 70 69 74 61 6c 20 73 68 69 n of capital shi
09d0: 70 73 2c 20 62 69 67 20 63 6f 6e 74 61 69 6e 65 ps, big containe
09e0: 72 20 73 68 69 70 73 2c 20 63 72 75 69 73 65 20 r ships, cruise
09f0: 6c 69 6e 65 72 73 20 61 6e 64 20 73 75 70 65 72 liners and super
0a00: 74 61 6e 6b 65 72 73 2e 3c 62 72 3e 0d 0a 45 76 tankers.<br>..Ev
0a10: 65 6e 20 77 6f 72 73 74 2c 20 66 72 6f 6d 20 74 en worst, from t
0a20: 69 6d 65 20 74 6f 20 74 69 6d 65 20 73 6f 6d 65 ime to time some
0a30: 20 63 72 61 7a 79 20 70 6f 6c 69 74 69 63 69 61 crazy politicia
0a40: 6e 20 73 74 61 72 74 73 20 73 74 72 6f 6e 67 6c n starts strongl
0a50: 79 20 61 64 76 6f 63 61 74 69 6e 67 20 74 68 65 y advocating the
0a60: 20 76 65 72 79 20 73 74 75 70 69 64 20 69 64 65 very stupid ide
0a70: 61 20 74 6f 20 62 75 69 6c 64 20 61 6e 20 69 6e a to build an in
0a80: 63 72 65 64 69 62 6c 79 20 63 6f 73 74 6c 79 20 credibly costly
0a90: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f <a href="http://
0aa0: 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 en.wikipedia.org
0ab0: 2f 77 69 6b 69 2f 53 74 72 61 69 74 5f 6f 66 5f /wiki/Strait_of_
0ac0: 4d 65 73 73 69 6e 61 5f 42 72 69 64 67 65 22 3e Messina_Bridge">
0ad0: 62 72 69 64 67 65 20 63 72 6f 73 73 69 6e 67 20 bridge crossing
0ae0: 74 68 65 20 53 74 72 61 69 74 3c 2f 61 3e 2c 20 the Strait</a>,
0af0: 63 6f 6d 70 6c 65 74 65 6c 79 20 6f 76 65 72 6c completely overl
0b00: 6f 6f 6b 69 6e 67 20 74 68 65 20 76 65 72 79 20 ooking the very
0b10: 68 69 67 68 20 73 65 69 73 6d 69 63 20 72 69 73 high seismic ris
0b20: 6b 20 6f 66 20 74 68 69 73 20 64 69 73 74 72 69 k of this distri
0b30: 63 74 20 61 6e 64 20 70 75 72 70 6f 73 65 6c 79 ct and purposely
0b40: 20 66 6f 72 67 65 74 74 69 6e 67 20 74 6f 20 72 forgetting to r
0b50: 65 6d 65 6d 62 65 72 20 74 68 61 74 20 69 6e 20 emember that in
0b60: 31 39 30 38 20 62 6f 74 68 20 74 6f 77 6e 73 20 1908 both towns
0b70: 6f 66 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 of <a href="http
0b80: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e ://en.wikipedia.
0b90: 6f 72 67 2f 77 69 6b 69 2f 31 39 30 38 5f 4d 65 org/wiki/1908_Me
0ba0: 73 73 69 6e 61 5f 65 61 72 74 68 71 75 61 6b 65 ssina_earthquake
0bb0: 22 3e 4d 65 73 73 69 6e 61 20 61 6e 64 20 52 65 ">Messina and Re
0bc0: 67 67 69 6f 20 43 61 6c 61 62 72 69 61 3c 2f 61 ggio Calabria</a
0bd0: 3e 20 77 65 72 65 20 63 6f 6d 70 6c 65 74 65 6c > were completel
0be0: 79 20 64 65 73 74 72 6f 79 65 64 20 62 79 20 61 y destroyed by a
0bf0: 6e 20 65 61 72 74 68 71 75 61 6b 65 20 66 6f 6c n earthquake fol
0c00: 6c 6f 77 65 64 20 62 79 20 61 20 74 73 75 6e 61 lowed by a tsuna
0c10: 6d 69 2e 3c 62 72 3e 0d 0a 4d 6f 72 65 20 74 68 mi.<br>..More th
0c20: 61 6e 20 31 32 30 2c 30 30 30 20 70 65 6f 70 6c an 120,000 peopl
0c30: 65 73 20 6c 6f 73 74 20 74 68 65 69 72 20 6c 69 es lost their li
0c40: 76 65 73 2c 20 61 6e 64 20 69 74 20 77 61 73 20 ves, and it was
0c50: 6f 6e 65 20 6f 66 20 74 68 65 20 6d 6f 73 74 20 one of the most
0c60: 66 72 69 67 68 74 65 6e 69 6e 67 20 6e 61 74 75 frightening natu
0c70: 72 61 6c 20 64 69 73 61 73 74 65 72 73 20 72 65 ral disasters re
0c80: 67 69 73 74 65 72 65 64 20 69 6e 20 45 75 72 6f gistered in Euro
0c90: 70 65 20 64 75 72 69 6e 67 20 6d 6f 64 65 72 6e pe during modern
0ca0: 20 74 69 6d 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f times.</li>..</
0cb0: 6f 6c 3e 0d 0a 53 6f 20 77 65 27 6c 6c 20 69 6d ol>..So we'll im
0cc0: 6d 65 64 69 61 74 65 6c 79 20 73 74 61 72 74 20 mediately start
0cd0: 61 20 74 68 65 6f 72 65 74 69 63 61 6c 20 63 61 a theoretical ca
0ce0: 73 65 20 73 74 75 64 79 20 69 6e 74 65 6e 64 65 se study intende
0cf0: 64 20 74 6f 20 69 64 65 6e 74 69 66 79 20 61 20 d to identify a
0d00: 70 6f 73 73 69 62 6c 65 20 61 6c 74 65 72 6e 61 possible alterna
0d10: 74 69 76 65 20 6c 6f 63 61 74 69 6f 6e 20 66 6f tive location fo
0d20: 72 20 53 69 63 69 6c 79 2e 3c 62 72 3e 0d 0a 49 r Sicily.<br>..I
0d30: 6e 63 69 64 65 6e 74 61 6c 6c 79 20 77 65 27 6c ncidentally we'l
0d40: 6c 20 75 73 65 20 74 68 65 20 6e 65 77 20 53 51 l use the new SQ
0d50: 4c 20 66 75 6e 63 74 69 6f 6e 73 20 62 61 73 65 L functions base
0d60: 64 20 6f 6e 20 41 66 66 69 6e 65 20 54 72 61 6e d on Affine Tran
0d70: 73 66 6f 72 6d 61 74 69 6f 6e 73 20 66 6f 72 20 sformations for
0d80: 74 68 69 73 20 74 61 73 6b 2e 3c 62 72 3e 0d 0a this task.<br>..
0d90: 4c 65 74 27 73 20 67 6f 20 6f 6e 2e 20 20 0d 0a Let's go on. ..
0da0: 3c 2f 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 </td><td>..<img
0db0: 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 src="https://www
0dc0: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 .gaia-gis.it/gai
0dd0: 61 2d 73 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 a-sins/affine-pi
0de0: 63 73 2f 73 69 63 69 6c 79 5f 30 2e 70 6e 67 22 cs/sicily_0.png"
0df0: 20 61 6c 74 3d 22 73 69 63 69 6c 79 2d 30 22 20 alt="sicily-0"
0e00: 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74 border="1">..</t
0e10: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
0e20: 3e 0d 0a 3c 68 33 3e 53 74 65 70 20 23 31 3a 20 >..<h3>Step #1:
0e30: 74 72 61 6e 73 6c 61 74 69 6e 67 20 53 69 63 69 translating Sici
0e40: 6c 79 20 69 6e 74 6f 20 61 20 6d 6f 72 65 20 63 ly into a more c
0e50: 6f 6e 76 65 6e 69 65 6e 74 20 70 6f 73 69 74 69 onvenient positi
0e60: 6f 6e 3c 2f 68 33 3e 0d 0a 54 68 65 72 65 20 69 on</h3>..There i
0e70: 73 20 70 6c 65 6e 74 79 20 6f 66 20 66 72 65 65 s plenty of free
0e80: 20 72 6f 6f 6d 20 69 6e 20 74 68 65 20 4c 6f 77 room in the Low
0e90: 65 72 20 54 79 72 72 68 65 6e 69 61 6e 20 53 65 er Tyrrhenian Se
0ea0: 61 2c 20 73 6f 20 77 65 27 6c 6c 20 73 74 61 72 a, so we'll star
0eb0: 74 20 62 79 20 61 70 70 6c 79 69 6e 67 20 61 20 t by applying a
0ec0: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f <a href="http://
0ed0: 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 en.wikipedia.org
0ee0: 2f 77 69 6b 69 2f 54 72 61 6e 73 6c 61 74 69 6f /wiki/Translatio
0ef0: 6e 5f 25 32 38 67 65 6f 6d 65 74 72 79 25 32 39 n_%28geometry%29
0f00: 22 3e 74 72 61 6e 73 6c 61 74 69 6f 6e 3c 2f 61 ">translation</a
0f10: 3e 20 74 6f 20 53 69 63 69 6c 79 3a 20 74 68 69 > to Sicily: thi
0f20: 73 20 70 72 61 63 74 69 63 61 6c 6c 79 20 6d 65 s practically me
0f30: 61 6e 73 20 61 64 64 69 6e 67 20 28 6f 72 20 73 ans adding (or s
0f40: 75 62 74 72 61 63 74 69 6e 67 29 20 61 20 63 6f ubtracting) a co
0f50: 6e 73 74 61 6e 74 20 76 61 6c 75 65 20 74 6f 20 nstant value to
0f60: 74 68 65 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 the coordinates
0f70: 6f 6e 20 62 6f 74 68 20 3c 62 3e 78 3c 2f 62 3e on both <b>x</b>
0f80: 20 61 6e 64 20 3c 62 3e 79 3c 2f 62 3e 20 61 78 and <b>y</b> ax
0f90: 65 73 2e 3c 62 72 3e 0d 0a 41 66 74 65 72 20 61 es.<br>..After a
0fa0: 20 76 65 72 79 20 71 75 69 63 6b 20 65 78 61 6d very quick exam
0fb0: 69 6e 61 74 69 6f 6e 20 6d 6f 76 69 6e 67 20 53 ination moving S
0fc0: 69 63 69 6c 79 20 3c 62 3e 31 35 30 20 6b 6d 3c icily <b>150 km<
0fd0: 2f 62 3e 20 28 69 2e 65 2e 20 3c 62 3e 31 35 30 /b> (i.e. <b>150
0fe0: 2c 30 30 30 20 6d 3c 2f 62 3e 29 20 77 65 73 74 ,000 m</b>) west
0ff0: 77 61 72 64 20 61 6e 64 20 3c 62 3e 31 35 30 20 ward and <b>150
1000: 6b 6d 3c 2f 62 3e 20 6e 6f 72 74 68 77 61 72 64 km</b> northward
1010: 20 73 65 65 6d 73 20 74 6f 20 62 65 20 61 6e 20 seems to be an
1020: 61 62 73 6f 6c 75 74 65 6c 79 20 72 65 61 73 6f absolutely reaso
1030: 6e 61 62 6c 65 20 63 68 6f 69 63 65 2e 3c 62 72 nable choice.<br
1040: 3e 0d 0a 53 6f 20 75 73 69 6e 67 20 74 68 65 20 >..So using the
1050: 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d Affine Transform
1060: 61 74 69 6f 6e 20 53 51 4c 20 66 75 6e 63 74 69 ation SQL functi
1070: 6f 6e 73 20 77 65 27 6c 6c 20 64 75 6c 79 20 65 ons we'll duly e
1080: 78 65 63 75 74 65 20 74 68 65 20 66 6f 6c 6c 6f xecute the follo
1090: 77 69 6e 67 20 53 51 4c 20 73 74 61 74 65 6d 65 wing SQL stateme
10a0: 6e 74 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d nt:..<verbatim>.
10b0: 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 73 69 .CREATE TABLE si
10c0: 63 69 6c 69 61 5f 31 20 41 53 0d 0a 53 45 4c 45 cilia_1 AS..SELE
10d0: 43 54 20 63 6f 64 5f 72 65 67 2c 20 0d 0a 20 20 CT cod_reg, ..
10e0: 20 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 67 ATM_Transform(g
10f0: 65 6f 6d 65 74 72 79 2c 0d 0a 20 20 20 20 20 20 eometry,..
1100: 41 54 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c ATM_CreateTransl
1110: 61 74 65 28 2d 31 35 30 30 30 30 2c 20 31 35 30 ate(-150000, 150
1120: 30 30 30 29 29 20 41 53 20 67 65 6f 6d 0d 0a 46 000)) AS geom..F
1130: 52 4f 4d 20 73 69 63 69 6c 69 61 3b 0d 0a 0d 0a ROM sicilia;....
1140: 53 45 4c 45 43 54 20 52 65 63 6f 76 65 72 47 65 SELECT RecoverGe
1150: 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27 73 69 ometryColumn('si
1160: 63 69 6c 69 61 5f 31 27 2c 20 27 67 65 6f 6d 27 cilia_1', 'geom'
1170: 2c 20 33 32 36 33 32 2c 20 27 4d 55 4c 54 49 50 , 32632, 'MULTIP
1180: 4f 4c 59 47 4f 4e 27 2c 20 27 58 59 27 29 3b 0d OLYGON', 'XY');.
1190: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 20 0d 0a 3c .</verbatim> ..<
11a0: 62 3e 52 65 6d 61 72 6b 73 3c 2f 62 3e 3a 0d 0a b>Remarks</b>:..
11b0: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 61 6c 6c 20 61 66 <ul>..<li>all af
11c0: 66 69 6e 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 fine transformat
11d0: 69 6f 6e 20 72 65 6c 61 74 65 64 20 53 51 4c 20 ion related SQL
11e0: 66 75 6e 63 74 69 6f 6e 20 6e 61 6d 65 73 20 73 function names s
11f0: 74 61 72 74 20 77 69 74 68 20 61 6e 20 3c 62 3e tart with an <b>
1200: 41 54 4d 5f 3c 2f 62 3e 20 70 72 65 66 69 78 3a ATM_</b> prefix:
1210: 20 74 68 69 73 20 73 69 6d 70 6c 79 20 73 74 61 this simply sta
1220: 6e 64 73 20 66 6f 72 20 3c 69 3e 3c 62 3e 3c 75 nds for <i><b><u
1230: 3e 41 3c 2f 75 3e 3c 2f 62 3e 66 66 69 6e 65 20 >A</u></b>ffine
1240: 3c 62 3e 3c 75 3e 54 3c 2f 75 3e 3c 2f 62 3e 72 <b><u>T</u></b>r
1250: 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 3c 62 3e ansformation <b>
1260: 3c 75 3e 4d 3c 2f 75 3e 3c 2f 62 3e 61 74 72 69 <u>M</u></b>atri
1270: 78 3c 2f 69 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 x</i>.</li>..<li
1280: 3e 3c 62 3e 41 54 4d 5f 54 72 61 6e 73 66 6f 72 ><b>ATM_Transfor
1290: 6d 28 29 3c 2f 62 3e 20 69 73 20 76 65 72 79 20 m()</b> is very
12a0: 73 69 6d 69 6c 61 72 20 74 6f 20 3c 62 3e 53 54 similar to <b>ST
12b0: 5f 54 72 61 6e 73 66 6f 72 6d 28 29 3c 2f 62 3e _Transform()</b>
12c0: 3b 20 74 68 65 20 6d 6f 73 74 20 6f 62 76 69 6f ; the most obvio
12d0: 75 73 20 64 69 66 66 65 72 65 6e 63 65 20 69 73 us difference is
12e0: 20 69 6e 20 74 68 61 74 20 61 6c 6c 20 74 72 61 in that all tra
12f0: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 61 72 67 75 nsformation argu
1300: 6d 65 6e 74 73 20 61 72 65 20 6e 6f 77 20 65 78 ments are now ex
1310: 70 65 63 74 65 64 20 74 6f 20 62 65 20 70 61 73 pected to be pas
1320: 73 65 64 20 75 6e 64 65 72 20 74 68 65 20 66 6f sed under the fo
1330: 72 6d 20 6f 66 20 61 6e 20 61 70 70 72 6f 70 72 rm of an appropr
1340: 69 61 74 65 20 3c 62 3e 42 4c 4f 42 2d 73 65 72 iate <b>BLOB-ser
1350: 69 61 6c 69 7a 65 64 3c 2f 62 3e 20 41 66 66 69 ialized</b> Affi
1360: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f ne Transformatio
1370: 6e 20 4d 61 74 72 69 78 2e 3c 2f 6c 69 3e 0d 0a n Matrix.</li>..
1380: 3c 6c 69 3e 3c 62 3e 41 54 4d 5f 43 72 65 61 74 <li><b>ATM_Creat
1390: 65 54 72 61 6e 73 6c 61 74 65 28 29 3c 2f 62 3e eTranslate()</b>
13a0: 20 73 69 6d 70 6c 79 20 69 73 20 61 6e 20 53 51 simply is an SQ
13b0: 4c 20 66 75 6e 63 74 69 6f 6e 20 72 65 74 75 72 L function retur
13c0: 6e 69 6e 67 20 61 20 3c 62 3e 42 4c 4f 42 2d 73 ning a <b>BLOB-s
13d0: 65 72 69 61 6c 69 7a 65 64 3c 2f 62 3e 20 41 66 erialized</b> Af
13e0: 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 fine Transformat
13f0: 69 6f 6e 20 4d 61 74 72 69 78 20 69 6e 69 74 69 ion Matrix initi
1400: 61 6c 69 7a 65 64 20 69 6e 20 73 75 63 68 20 61 alized in such a
1410: 20 77 61 79 20 74 6f 20 72 65 70 72 65 73 65 6e way to represen
1420: 74 20 61 20 73 69 6d 70 6c 65 20 3c 62 3e 32 44 t a simple <b>2D
1430: 20 54 72 61 6e 73 6c 61 74 65 3c 2f 62 3e 20 61 Translate</b> a
1440: 63 63 6f 72 64 69 6e 67 6c 79 20 74 6f 20 3c 62 ccordingly to <b
1450: 3e 28 74 78 2c 20 74 79 29 3c 2f 62 3e 20 61 72 >(tx, ty)</b> ar
1460: 67 75 6d 65 6e 74 73 2e 3c 62 72 3e 0d 0a 59 6f guments.<br>..Yo
1470: 75 20 63 6f 75 6c 64 20 65 76 65 6e 74 75 61 6c u could eventual
1480: 6c 79 20 64 65 66 69 6e 65 20 61 20 63 6f 6d 70 ly define a comp
1490: 6c 65 74 65 20 3c 62 3e 33 44 20 54 72 61 6e 73 lete <b>3D Trans
14a0: 6c 61 74 65 3c 2f 62 3e 20 62 79 20 70 61 73 73 late</b> by pass
14b0: 69 6e 67 20 3c 62 3e 28 74 78 2c 20 74 79 2c 20 ing <b>(tx, ty,
14c0: 74 7a 29 3c 2f 62 3e 20 61 72 67 75 6d 65 6e 74 tz)</b> argument
14d0: 73 2c 20 62 75 74 20 74 68 69 73 20 69 73 6e 27 s, but this isn'
14e0: 74 20 73 74 72 69 63 74 6c 79 20 72 65 71 75 69 t strictly requi
14f0: 72 65 64 20 69 6e 20 6f 75 72 20 63 75 72 72 65 red in our curre
1500: 6e 74 20 65 78 61 6d 70 6c 65 2e 0d 0a 3c 2f 75 nt example...</u
1510: 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 0d 0a 3c l>..</td><td>..<
1520: 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73 3a 2f img src="https:/
1530: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 /www.gaia-gis.it
1540: 2f 67 61 69 61 2d 73 69 6e 73 2f 61 66 66 69 6e /gaia-sins/affin
1550: 65 2d 70 69 63 73 2f 73 69 63 69 6c 79 5f 31 2e e-pics/sicily_1.
1560: 70 6e 67 22 20 61 6c 74 3d 22 73 69 63 69 6c 69 png" alt="sicili
1570: 61 2d 31 22 20 62 6f 72 64 65 72 3d 22 31 22 3e a-1" border="1">
1580: 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 ..</td></tr>..<t
1590: 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 53 74 65 70 r><td>..<h3>Step
15a0: 20 23 32 3a 20 72 6f 74 61 74 69 6e 67 20 53 69 #2: rotating Si
15b0: 63 69 6c 79 20 73 6f 20 74 6f 20 67 65 74 20 61 cily so to get a
15c0: 20 6e 69 63 65 20 68 6f 72 69 7a 6f 6e 74 61 6c nice horizontal
15d0: 20 61 6c 69 67 6e 6d 65 6e 74 3c 2f 68 33 3e 0d alignment</h3>.
15e0: 0a 41 6c 69 67 6e 69 6e 67 20 74 68 65 20 73 6f .Aligning the so
15f0: 75 74 68 65 72 6e 20 73 68 6f 72 65 73 20 6f 66 uthern shores of
1600: 20 53 69 63 69 6c 79 20 74 6f 20 61 6e 20 61 6c Sicily to an al
1610: 6d 6f 73 74 20 68 6f 72 69 7a 6f 6e 74 61 6c 20 most horizontal
1620: 6c 69 6e 65 20 77 69 6c 6c 20 73 75 72 65 6c 79 line will surely
1630: 20 6c 65 61 64 20 74 6f 20 61 20 6d 6f 72 65 20 lead to a more
1640: 6e 69 63 65 6c 79 20 6f 72 64 65 72 65 64 20 6c nicely ordered l
1650: 61 79 6f 75 74 3a 20 73 6f 20 77 65 20 68 61 76 ayout: so we hav
1660: 65 20 6e 6f 77 20 74 6f 20 61 70 70 6c 79 20 61 e now to apply a
1670: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f <a href="http:/
1680: 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 /en.wikipedia.or
1690: 67 2f 77 69 6b 69 2f 52 6f 74 61 74 69 6f 6e 5f g/wiki/Rotation_
16a0: 25 32 38 6d 61 74 68 65 6d 61 74 69 63 73 25 32 %28mathematics%2
16b0: 39 22 3e 63 6f 75 6e 74 65 72 63 6c 6f 63 6b 77 9">counterclockw
16c0: 69 73 65 20 72 6f 74 61 74 69 6f 6e 3c 2f 61 3e ise rotation</a>
16d0: 20 6f 66 20 61 62 6f 75 74 20 3c 62 3e 32 35 2e of about <b>25.
16e0: 30 20 64 65 67 72 65 65 73 3c 2f 62 3e 2e 3c 62 0 degrees</b>.<b
16f0: 72 3e 0d 0a 54 68 61 6e 6b 73 20 74 6f 20 41 66 r>..Thanks to Af
1700: 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 fine Transformat
1710: 69 6f 6e 73 2c 20 77 65 20 63 61 6e 20 63 6f 6d ions, we can com
1720: 62 69 6e 65 20 62 6f 74 68 20 74 68 65 20 70 72 bine both the pr
1730: 65 76 69 6f 75 73 20 74 72 61 6e 73 6c 61 74 69 evious translati
1740: 6f 6e 20 61 6e 64 20 74 68 65 20 63 75 72 72 65 on and the curre
1750: 6e 74 20 72 6f 74 61 74 69 6f 6e 20 69 6e 74 6f nt rotation into
1760: 20 61 20 73 69 6e 67 6c 65 20 6d 6f 76 65 6d 65 a single moveme
1770: 6e 74 20 28 61 20 73 6f 20 63 61 6c 6c 65 64 20 nt (a so called
1780: 3c 62 3e 72 6f 74 6f 74 72 61 6e 73 6c 61 74 69 <b>rototranslati
1790: 6f 6e 3c 2f 62 3e 29 2e 3c 62 72 3e 0d 0a 57 65 on</b>).<br>..We
17a0: 20 73 69 6d 70 6c 79 20 68 61 76 65 20 74 6f 20 simply have to
17b0: 65 78 65 63 75 74 65 20 74 68 65 20 66 6f 6c 6c execute the foll
17c0: 6f 77 69 6e 67 20 53 51 4c 20 73 74 61 74 65 6d owing SQL statem
17d0: 65 6e 74 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e ent:..<verbatim>
17e0: 0d 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 73 ..CREATE TABLE s
17f0: 69 63 69 6c 69 61 5f 32 20 41 53 0d 0a 53 45 4c icilia_2 AS..SEL
1800: 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 0d 0a 20 ECT cod_reg, ..
1810: 20 20 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 ATM_Transform(
1820: 67 65 6f 6d 65 74 72 79 2c 0d 0a 20 20 20 20 20 geometry,..
1830: 20 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 0d ATM_Translate(.
1840: 0a 20 20 20 20 20 20 20 20 20 41 54 4d 5f 54 72 . ATM_Tr
1850: 61 6e 73 6c 61 74 65 28 0d 0a 20 20 20 20 20 20 anslate(..
1860: 20 20 20 20 20 20 41 54 4d 5f 52 6f 74 61 74 65 ATM_Rotate
1870: 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 (..
1880: 20 20 41 54 4d 5f 43 72 65 61 74 65 54 72 61 6e ATM_CreateTran
1890: 73 6c 61 74 65 28 2d 63 78 2c 20 2d 63 79 29 2c slate(-cx, -cy),
18a0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 32 35 .. 25
18b0: 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 63 78 2c ),.. cx,
18c0: 20 63 79 29 2c 0d 0a 20 20 20 20 20 20 2d 31 35 cy),.. -15
18d0: 30 30 30 30 2c 20 31 35 30 30 30 30 29 0d 0a 20 0000, 150000)..
18e0: 20 20 29 20 41 53 20 67 65 6f 6d 0d 0a 46 52 4f ) AS geom..FRO
18f0: 4d 20 28 53 45 4c 45 43 54 20 63 6f 64 5f 72 65 M (SELECT cod_re
1900: 67 2c 20 53 54 5f 58 28 63 65 6e 74 72 6f 69 64 g, ST_X(centroid
1910: 29 20 41 53 20 63 78 2c 20 53 54 5f 59 28 63 65 ) AS cx, ST_Y(ce
1920: 6e 74 72 6f 69 64 29 20 41 53 20 63 79 2c 20 67 ntroid) AS cy, g
1930: 65 6f 6d 65 74 72 79 0d 0a 20 20 20 20 20 20 46 eometry.. F
1940: 52 4f 4d 20 28 53 45 4c 45 43 54 20 63 6f 64 5f ROM (SELECT cod_
1950: 72 65 67 2c 20 53 54 5f 43 65 6e 74 72 6f 69 64 reg, ST_Centroid
1960: 28 67 65 6f 6d 65 74 72 79 29 20 41 53 20 63 65 (geometry) AS ce
1970: 6e 74 72 6f 69 64 2c 20 67 65 6f 6d 65 74 72 79 ntroid, geometry
1980: 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 .. F
1990: 52 4f 4d 20 73 69 63 69 6c 69 61 29 20 41 53 20 ROM sicilia) AS
19a0: 67 31 0d 0a 29 20 41 53 20 67 32 3b 0d 0a 0d 0a g1..) AS g2;....
19b0: 53 45 4c 45 43 54 20 52 65 63 6f 76 65 72 47 65 SELECT RecoverGe
19c0: 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27 73 69 ometryColumn('si
19d0: 63 69 6c 69 61 5f 32 27 2c 20 27 67 65 6f 6d 27 cilia_2', 'geom'
19e0: 2c 20 33 32 36 33 32 2c 20 27 4d 55 4c 54 49 50 , 32632, 'MULTIP
19f0: 4f 4c 59 47 4f 4e 27 2c 20 27 58 59 27 29 3b 0d OLYGON', 'XY');.
1a00: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 20 20 0d 0a .</verbatim> ..
1a10: 3c 62 3e 52 65 6d 61 72 6b 73 3c 2f 62 3e 3a 0d <b>Remarks</b>:.
1a20: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 63 6f 72 72 65 .<ul>..<li>corre
1a30: 63 74 6c 79 20 68 61 6e 64 6c 69 6e 67 20 52 6f ctly handling Ro
1a40: 74 61 74 65 20 69 73 20 61 20 6c 69 74 74 6c 65 tate is a little
1a50: 20 62 69 74 20 6d 6f 72 65 20 64 69 66 66 69 63 bit more diffic
1a60: 75 6c 74 2e 0d 0a 41 6e 79 20 72 6f 74 61 74 69 ult...Any rotati
1a70: 6f 6e 20 77 69 6c 6c 20 61 6c 77 61 79 73 20 69 on will always i
1a80: 6d 70 6c 79 20 61 20 3c 62 3e 66 69 78 65 64 20 mply a <b>fixed
1a90: 63 65 6e 74 65 72 20 70 6f 69 6e 74 3c 2f 62 3e center point</b>
1aa0: 2c 20 61 6e 64 20 62 79 20 64 65 66 61 75 6c 74 , and by default
1ab0: 20 74 68 69 73 20 69 73 20 65 78 61 63 74 6c 79 this is exactly
1ac0: 20 70 6c 61 63 65 64 20 61 74 20 74 68 65 20 63 placed at the c
1ad0: 6f 6f 72 64 69 6e 61 74 65 73 20 6f 72 69 67 69 oordinates origi
1ae0: 6e 3a 20 3c 62 3e 28 30 2c 20 30 29 3c 2f 62 3e n: <b>(0, 0)</b>
1af0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 73 6f 20 61 .</li>..<li>so a
1b00: 20 76 65 72 79 20 6e 61 69 76 65 20 61 74 74 65 very naive atte
1b10: 6d 70 74 20 74 6f 20 64 69 72 65 63 74 6c 79 20 mpt to directly
1b20: 69 6e 76 6f 6b 65 20 3c 62 3e 41 54 4d 5f 52 6f invoke <b>ATM_Ro
1b30: 74 61 74 65 28 32 35 29 3c 2f 62 3e 20 77 69 6c tate(25)</b> wil
1b40: 6c 20 73 69 6d 70 6c 79 20 72 65 6c 6f 63 61 74 l simply relocat
1b50: 65 20 53 69 63 69 6c 79 20 69 6e 20 53 6f 75 74 e Sicily in Sout
1b60: 68 65 72 6e 20 53 70 61 69 6e 2c 20 61 6e 64 20 hern Spain, and
1b70: 74 68 69 73 20 61 62 73 6f 6c 75 74 65 6c 79 20 this absolutely
1b80: 69 73 6e 27 74 20 6f 75 72 20 69 6e 74 65 6e 74 isn't our intent
1b90: 69 6f 6e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 77 ion.</li>..<li>w
1ba0: 68 61 74 20 77 65 20 72 65 61 6c 6c 79 20 6e 65 hat we really ne
1bb0: 65 64 20 69 73 20 61 20 6d 6f 72 65 20 63 6f 6d ed is a more com
1bc0: 70 6c 65 78 20 73 65 71 75 65 6e 63 65 20 6f 66 plex sequence of
1bd0: 20 63 68 61 69 6e 65 64 20 74 72 61 6e 73 66 6f chained transfo
1be0: 72 6d 61 74 69 6f 6e 73 3a 0d 0a 3c 6f 6c 3e 0d rmations:..<ol>.
1bf0: 0a 3c 6c 69 3e 77 65 27 6c 6c 20 73 74 61 72 74 .<li>we'll start
1c00: 20 66 69 72 73 74 20 62 79 20 63 72 65 61 74 69 first by creati
1c10: 6e 67 20 61 20 6e 65 77 20 3c 62 3e 42 4c 4f 42 ng a new <b>BLOB
1c20: 2d 4d 61 74 72 69 78 3c 2f 62 3e 20 69 6e 74 65 -Matrix</b> inte
1c30: 6e 64 65 64 20 74 6f 20 72 65 6c 6f 63 61 74 65 nded to relocate
1c40: 20 53 69 63 69 6c 79 27 73 20 3c 61 20 68 72 65 Sicily's <a hre
1c50: 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b f="http://en.wik
1c60: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f ipedia.org/wiki/
1c70: 43 65 6e 74 72 6f 69 64 22 3e 63 65 6e 74 72 6f Centroid">centro
1c80: 69 64 3c 2f 61 3e 20 65 78 61 63 74 6c 79 20 6f id</a> exactly o
1c90: 6e 20 74 68 65 20 63 6f 6f 72 64 69 6e 61 74 65 n the coordinate
1ca0: 73 20 6f 72 69 67 69 6e 3a 20 3c 62 3e 41 54 4d s origin: <b>ATM
1cb0: 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61 74 65 _CreateTranslate
1cc0: 28 2d 63 78 2c 20 2d 63 79 29 3c 2f 62 3e 3c 2f (-cx, -cy)</b></
1cd0: 6c 69 3e 20 0d 0a 3c 6c 69 3e 6e 6f 77 20 77 65 li> ..<li>now we
1ce0: 20 63 61 6e 20 73 61 66 65 6c 79 20 63 68 61 69 can safely chai
1cf0: 6e 20 74 68 65 20 69 6e 74 65 6e 64 65 64 20 52 n the intended R
1d00: 6f 74 61 74 65 3a 20 3c 62 3e 41 54 4d 5f 52 6f otate: <b>ATM_Ro
1d10: 74 61 74 65 28 61 74 6d 2d 62 6c 6f 62 2c 20 32 tate(atm-blob, 2
1d20: 35 29 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 5)</b></li>..<li
1d30: 3e 61 66 74 65 72 20 61 70 70 6c 79 69 6e 67 20 >after applying
1d40: 52 6f 74 61 74 65 20 77 65 20 68 61 76 65 20 6e Rotate we have n
1d50: 6f 77 20 74 6f 20 72 65 73 74 6f 72 65 20 74 68 ow to restore th
1d60: 65 20 69 6e 69 74 69 61 6c 20 70 6f 73 69 74 69 e initial positi
1d70: 6f 6e 3a 20 3c 62 3e 41 54 4d 5f 54 72 61 6e 73 on: <b>ATM_Trans
1d80: 6c 61 74 65 28 61 74 6d 2d 62 6c 6f 62 2c 20 63 late(atm-blob, c
1d90: 78 2c 20 63 79 29 3c 2f 62 3e 3c 2f 6c 69 3e 0d x, cy)</b></li>.
1da0: 0a 3c 6c 69 3e 61 6e 64 20 66 69 6e 61 6c 6c 79 .<li>and finally
1db0: 20 77 65 27 6c 6c 20 61 70 70 6c 79 20 74 68 65 we'll apply the
1dc0: 20 54 72 61 6e 73 6c 61 74 69 6f 6e 20 69 6e 74 Translation int
1dd0: 65 6e 64 65 64 20 74 6f 20 72 65 70 6f 73 69 74 ended to reposit
1de0: 69 6f 6e 20 53 69 63 69 6c 79 20 77 65 73 74 77 ion Sicily westw
1df0: 61 72 64 20 61 6e 64 20 6e 6f 72 74 68 77 61 72 ard and northwar
1e00: 64 3a 20 3c 62 3e 41 54 4d 5f 54 72 61 6e 73 6c d: <b>ATM_Transl
1e10: 61 74 65 28 61 74 6d 2d 62 6c 6f 62 2c 20 2d 31 ate(atm-blob, -1
1e20: 35 30 30 30 30 2c 20 31 35 30 30 30 30 29 3c 2f 50000, 150000)</
1e30: 62 3e 3c 62 72 3e 0d 0a 3c 69 3e 77 65 27 76 65 b><br>..<i>we've
1e40: 20 75 73 65 64 20 74 77 6f 20 73 65 70 61 72 61 used two separa
1e50: 74 65 20 74 72 61 6e 73 6c 61 74 69 6f 6e 73 20 te translations
1e60: 73 69 6d 70 6c 79 20 66 6f 72 20 64 69 64 61 63 simply for didac
1e70: 74 69 63 20 63 6c 61 72 69 74 79 3a 20 77 65 20 tic clarity: we
1e80: 63 6f 75 6c 64 20 65 61 73 69 6c 79 20 6d 65 72 could easily mer
1e90: 67 65 20 62 6f 74 68 20 74 68 65 6d 20 69 6e 74 ge both them int
1ea0: 6f 20 61 20 73 69 6e 67 6c 65 20 74 72 61 6e 73 o a single trans
1eb0: 6c 61 74 69 6f 6e 3a 3c 62 72 3e 20 41 54 4d 5f lation:<br> ATM_
1ec0: 54 72 61 6e 73 6c 61 74 65 28 61 74 6d 2d 62 6c Translate(atm-bl
1ed0: 6f 62 2c 20 63 78 20 2d 20 31 35 30 30 30 30 2c ob, cx - 150000,
1ee0: 20 63 79 20 2b 20 31 35 30 30 30 30 29 3c 2f 69 cy + 150000)</i
1ef0: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 69 73 ></li>..<li>this
1f00: 20 77 61 79 20 3c 62 3e 41 54 4d 5f 54 72 61 6e way <b>ATM_Tran
1f10: 73 66 6f 72 6d 28 29 3c 2f 62 3e 20 77 69 6c 6c sform()</b> will
1f20: 20 72 65 63 65 69 76 65 20 74 68 65 20 66 69 6e receive the fin
1f30: 61 6c 20 3c 62 3e 42 4c 4f 42 2d 4d 61 74 72 69 al <b>BLOB-Matri
1f40: 78 3c 2f 62 3e 20 72 65 73 75 6c 74 69 6e 67 20 x</b> resulting
1f50: 62 79 20 63 68 61 69 6e 69 6e 67 20 61 6c 6c 20 by chaining all
1f60: 74 68 65 20 61 62 6f 76 65 20 74 72 61 6e 73 66 the above transf
1f70: 6f 72 6d 61 74 69 6f 6e 20 73 74 65 70 73 20 69 ormation steps i
1f80: 6e 20 74 68 65 20 63 6f 72 72 65 63 74 20 73 65 n the correct se
1f90: 71 75 65 6e 63 65 2e 3c 2f 6c 69 3e 0d 0a 3c 2f quence.</li>..</
1fa0: 6f 6c 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 ol></li>..<li><b
1fb0: 3e 3c 75 3e 56 65 72 79 20 69 6d 70 6f 72 74 61 ><u>Very importa
1fc0: 6e 74 20 6e 6f 74 69 63 65 3c 2f 75 3e 3c 2f 62 nt notice</u></b
1fd0: 3e 3a 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 >: Affine Transf
1fe0: 6f 72 6d 61 74 69 6f 6e 73 20 3c 75 3e 61 72 65 ormations <u>are
1ff0: 20 6e 6f 74 20 63 6f 6d 6d 75 74 61 74 69 76 65 not commutative
2000: 3c 2f 75 3e 3a 20 74 68 65 20 72 65 6c 61 74 69 </u>: the relati
2010: 76 65 20 6f 72 64 65 72 20 6f 66 20 73 75 62 73 ve order of subs
2020: 65 71 75 65 6e 74 20 6f 70 65 72 61 74 69 6f 6e equent operation
2030: 73 20 69 6e 20 61 20 63 6f 6d 70 6c 65 78 20 74 s in a complex t
2040: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 63 68 ransformation ch
2050: 61 69 6e 20 73 68 6f 75 6c 64 20 61 6c 77 61 79 ain should alway
2060: 73 20 62 65 20 76 65 72 79 20 63 61 72 65 66 75 s be very carefu
2070: 6c 6c 79 20 63 6f 6e 73 69 64 65 72 65 64 2e 3c lly considered.<
2080: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 61 6c 6c 20 74 68 /li>..<li>all th
2090: 65 20 3c 62 3e 46 52 4f 4d 20 28 53 45 4c 45 43 e <b>FROM (SELEC
20a0: 54 20 2e 2e 2e 20 46 52 4f 4d 20 28 53 45 4c 45 T ... FROM (SELE
20b0: 43 54 20 2e 2e 2e 29 20 41 53 20 67 31 29 20 41 CT ...) AS g1) A
20c0: 53 20 67 32 3c 2f 62 3e 20 73 74 75 66 66 20 73 S g2</b> stuff s
20d0: 69 6d 70 6c 79 20 69 73 20 61 20 72 61 74 68 65 imply is a rathe
20e0: 72 20 74 72 69 76 69 61 6c 20 53 51 4c 20 74 72 r trivial SQL tr
20f0: 69 63 6b 20 62 61 73 65 64 20 6f 6e 20 74 77 6f ick based on two
2100: 20 6e 65 73 74 65 64 20 73 75 62 2d 71 75 65 72 nested sub-quer
2110: 69 65 73 2e 3c 62 72 3e 0d 0a 69 74 27 73 20 69 ies.<br>..it's i
2120: 6e 64 65 6e 74 65 64 20 73 63 6f 70 65 20 73 69 ndented scope si
2130: 6d 70 6c 79 20 69 73 20 61 76 6f 69 64 69 6e 67 mply is avoiding
2140: 20 74 6f 20 63 61 6c 6c 20 74 6f 6f 20 6d 61 6e to call too man
2150: 79 20 74 69 6d 65 73 20 53 54 5f 43 65 6e 74 72 y times ST_Centr
2160: 6f 69 64 28 29 2c 20 53 54 5f 58 28 29 20 61 6e oid(), ST_X() an
2170: 64 20 53 54 5f 59 28 29 20 69 6e 20 6f 72 64 65 d ST_Y() in orde
2180: 72 20 74 6f 20 67 65 74 20 74 68 65 20 63 65 6e r to get the cen
2190: 74 72 6f 69 64 20 63 6f 6f 72 64 69 6e 61 74 65 troid coordinate
21a0: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a s.</li>..</ul>..
21b0: 3c 2f 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 </td><td>..<img
21c0: 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 src="https://www
21d0: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 .gaia-gis.it/gai
21e0: 61 2d 73 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 a-sins/affine-pi
21f0: 63 73 2f 73 69 63 69 6c 79 5f 32 2e 70 6e 67 22 cs/sicily_2.png"
2200: 20 61 6c 74 3d 22 73 69 63 69 6c 69 61 2d 32 22 alt="sicilia-2"
2210: 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f border="1">..</
2220: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
2230: 64 3e 0d 0a 3c 68 33 3e 53 74 65 70 20 23 33 3a d>..<h3>Step #3:
2240: 20 69 6e 66 6c 61 74 69 6e 67 20 61 6e 64 20 72 inflating and r
2250: 65 73 68 61 70 69 6e 67 20 53 69 63 69 6c 79 3c eshaping Sicily<
2260: 2f 68 33 3e 0d 0a 41 6e 20 69 6e 63 72 65 61 73 /h3>..An increas
2270: 65 64 20 73 75 72 66 61 63 65 20 69 73 20 73 75 ed surface is su
2280: 72 65 6c 79 20 77 65 6c 63 6f 6d 65 2c 20 62 65 rely welcome, be
2290: 63 61 75 73 65 20 69 74 20 61 75 74 6f 6d 61 74 cause it automat
22a0: 69 63 61 6c 6c 79 20 69 6d 70 6c 69 65 73 20 6d ically implies m
22b0: 6f 72 65 20 61 67 72 69 63 75 6c 74 75 72 61 6c ore agricultural
22c0: 20 6c 61 6e 64 73 3a 20 6f 6e 20 74 68 65 20 6f lands: on the o
22d0: 74 68 65 72 20 68 61 6e 64 20 73 68 6f 72 74 65 ther hand shorte
22e0: 6e 69 6e 67 20 61 20 6c 69 74 74 6c 65 20 62 69 ning a little bi
22f0: 74 20 74 68 65 20 6c 65 6e 67 74 68 20 6f 66 20 t the length of
2300: 74 68 65 20 73 6f 75 74 68 65 72 6e 20 63 6f 61 the southern coa
2310: 73 74 6c 69 6e 65 20 77 69 6c 6c 20 73 75 72 65 stline will sure
2320: 6c 79 20 66 61 63 69 6c 69 74 61 74 65 20 6d 6f ly facilitate mo
2330: 62 69 6c 69 74 79 20 61 6e 64 20 63 6f 6d 6d 75 bility and commu
2340: 6e 69 63 61 74 69 6f 6e 73 2e 3c 62 72 3e 0d 0a nications.<br>..
2350: 53 6f 20 77 65 27 6c 6c 20 6e 6f 77 20 61 70 70 So we'll now app
2360: 6c 79 20 61 20 3c 61 20 68 72 65 66 3d 22 68 74 ly a <a href="ht
2370: 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 tp://en.wikipedi
2380: 61 2e 6f 72 67 2f 77 69 6b 69 2f 53 63 61 6c 69 a.org/wiki/Scali
2390: 6e 67 5f 25 32 38 67 65 6f 6d 65 74 72 79 25 32 ng_%28geometry%2
23a0: 39 22 3e 73 63 61 6c 69 6e 67 3c 2f 61 3e 20 74 9">scaling</a> t
23b0: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 75 73 ransformation us
23c0: 69 6e 67 20 74 77 6f 20 64 69 66 66 65 72 65 6e ing two differen
23d0: 74 20 76 61 6c 75 65 73 3a 20 3c 62 3e 73 78 3d t values: <b>sx=
23e0: 30 2e 39 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 73 0.9</b> and <b>s
23f0: 79 3d 31 2e 33 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a y=1.3</b>.<br>..
2400: 4f 6e 63 65 20 61 67 61 69 6e 2c 20 41 66 66 69 Once again, Affi
2410: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f ne Transformatio
2420: 6e 73 20 65 6e 61 62 6c 65 20 75 73 20 74 6f 20 ns enable us to
2430: 63 6f 6d 62 69 6e 65 20 61 6c 74 6f 67 65 74 68 combine altogeth
2440: 65 72 20 62 6f 74 68 20 74 72 61 6e 73 6c 61 74 er both translat
2450: 65 2c 20 72 6f 74 61 74 65 20 61 6e 64 20 73 63 e, rotate and sc
2460: 61 6c 65 20 69 6e 74 6f 20 61 20 73 69 6e 67 6c ale into a singl
2470: 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e e transformation
2480: 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 69 73 20 74 .<br>..This is t
2490: 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 he corresponding
24a0: 20 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 3a 0d SQL statement:.
24b0: 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 43 52 45 .<verbatim>..CRE
24c0: 41 54 45 20 54 41 42 4c 45 20 73 69 63 69 6c 69 ATE TABLE sicili
24d0: 61 5f 33 20 41 53 0d 0a 53 45 4c 45 43 54 20 63 a_3 AS..SELECT c
24e0: 6f 64 5f 72 65 67 2c 20 0d 0a 20 20 20 41 54 4d od_reg, .. ATM
24f0: 5f 54 72 61 6e 73 66 6f 72 6d 28 67 65 6f 6d 65 _Transform(geome
2500: 74 72 79 2c 0d 0a 20 20 20 20 20 20 41 54 4d 5f try,.. ATM_
2510: 54 72 61 6e 73 6c 61 74 65 28 0d 0a 20 20 20 20 Translate(..
2520: 20 20 20 20 20 41 54 4d 5f 54 72 61 6e 73 6c 61 ATM_Transla
2530: 74 65 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 te(..
2540: 20 41 54 4d 5f 53 63 61 6c 65 28 0d 0a 20 20 20 ATM_Scale(..
2550: 20 20 20 20 20 20 20 20 20 20 20 20 41 54 4d 5f ATM_
2560: 52 6f 74 61 74 65 28 0d 0a 20 20 20 20 20 20 20 Rotate(..
2570: 20 20 20 20 20 20 20 20 20 20 20 41 54 4d 5f 43 ATM_C
2580: 72 65 61 74 65 54 72 61 6e 73 6c 61 74 65 28 2d reateTranslate(-
2590: 63 78 2c 20 2d 63 79 29 2c 0d 0a 20 20 20 20 20 cx, -cy),..
25a0: 20 20 20 20 20 20 20 20 20 20 32 35 29 2c 0d 0a 25),..
25b0: 20 20 20 20 20 20 20 20 20 20 20 20 30 2e 39 2c 0.9,
25c0: 20 31 2e 33 29 2c 0d 0a 20 20 20 20 20 20 20 20 1.3),..
25d0: 20 63 78 2c 20 63 79 29 2c 0d 0a 20 20 20 20 20 cx, cy),..
25e0: 20 2d 31 35 30 30 30 30 2c 20 31 35 30 30 30 30 -150000, 150000
25f0: 29 0d 0a 20 20 20 29 20 41 53 20 67 65 6f 6d 0d ).. ) AS geom.
2600: 0a 46 52 4f 4d 20 28 53 45 4c 45 43 54 20 63 6f .FROM (SELECT co
2610: 64 5f 72 65 67 2c 20 53 54 5f 58 28 63 65 6e 74 d_reg, ST_X(cent
2620: 72 6f 69 64 29 20 41 53 20 63 78 2c 20 53 54 5f roid) AS cx, ST_
2630: 59 28 63 65 6e 74 72 6f 69 64 29 20 41 53 20 63 Y(centroid) AS c
2640: 79 2c 20 67 65 6f 6d 65 74 72 79 0d 0a 20 20 20 y, geometry..
2650: 20 20 20 46 52 4f 4d 20 28 53 45 4c 45 43 54 20 FROM (SELECT
2660: 63 6f 64 5f 72 65 67 2c 20 53 54 5f 43 65 6e 74 cod_reg, ST_Cent
2670: 72 6f 69 64 28 67 65 6f 6d 65 74 72 79 29 20 41 roid(geometry) A
2680: 53 20 63 65 6e 74 72 6f 69 64 2c 20 67 65 6f 6d S centroid, geom
2690: 65 74 72 79 20 0d 0a 20 20 20 20 20 20 20 20 20 etry ..
26a0: 20 20 20 46 52 4f 4d 20 73 69 63 69 6c 69 61 29 FROM sicilia)
26b0: 20 41 53 20 67 31 0d 0a 29 20 41 53 20 67 32 3b AS g1..) AS g2;
26c0: 0d 0a 0d 0a 53 45 4c 45 43 54 20 52 65 63 6f 76 ....SELECT Recov
26d0: 65 72 47 65 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e erGeometryColumn
26e0: 28 27 73 69 63 69 6c 69 61 5f 33 27 2c 20 27 67 ('sicilia_3', 'g
26f0: 65 6f 6d 27 2c 20 33 32 36 33 32 2c 20 27 4d 55 eom', 32632, 'MU
2700: 4c 54 49 50 4f 4c 59 47 4f 4e 27 2c 20 27 58 59 LTIPOLYGON', 'XY
2710: 27 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e ');..</verbatim>
2720: 20 0d 0a 3c 62 3e 52 65 6d 61 72 6b 73 3c 2f 62 ..<b>Remarks</b
2730: 3e 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 >:..<ul>..<li>th
2740: 65 72 65 20 69 73 20 6e 6f 74 68 69 6e 67 20 72 ere is nothing r
2750: 65 61 6c 6c 79 20 6e 65 77 20 69 6e 20 74 68 69 eally new in thi
2760: 73 3a 20 77 65 27 6c 6c 20 73 69 6d 70 6c 79 20 s: we'll simply
2770: 63 68 61 69 6e 20 79 65 74 20 61 6e 6f 74 68 65 chain yet anothe
2780: 72 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e r transformation
2790: 20 69 6e 20 74 68 65 20 61 70 70 72 6f 70 72 69 in the appropri
27a0: 61 74 65 20 73 65 71 75 65 6e 63 65 20 6f 72 64 ate sequence ord
27b0: 65 72 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 er.</li>..<li><b
27c0: 3e 41 54 4d 5f 53 63 61 6c 65 28 61 74 6d 2d 62 >ATM_Scale(atm-b
27d0: 6c 6f 62 2c 20 73 78 2c 20 73 79 29 3c 2f 62 3e lob, sx, sy)</b>
27e0: 20 69 73 20 69 6e 74 65 6e 64 65 64 20 66 6f 72 is intended for
27f0: 20 74 68 65 20 73 69 6d 70 6c 65 72 20 3c 62 3e the simpler <b>
2800: 32 44 3c 2f 62 3e 20 63 61 73 65 2e 3c 2f 6c 69 2D</b> case.</li
2810: 3e 0d 0a 3c 6c 69 3e 69 6e 20 74 68 65 20 6d 6f >..<li>in the mo
2820: 72 65 20 67 65 6e 65 72 61 6c 20 3c 62 3e 33 44 re general <b>3D
2830: 3c 2f 62 3e 20 63 61 73 65 20 79 6f 75 20 63 61 </b> case you ca
2840: 6e 20 69 6e 76 6f 6b 65 20 3c 62 3e 41 54 4d 5f n invoke <b>ATM_
2850: 53 63 61 6c 65 28 61 74 6d 2d 62 6c 6f 62 2c 20 Scale(atm-blob,
2860: 73 78 2c 20 73 79 2c 20 73 7a 29 3c 2f 62 3e 3c sx, sy, sz)</b><
2870: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 /li>..</ul>..</t
2880: 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73 72 63 d><td>..<img src
2890: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 ="https://www.ga
28a0: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73 ia-gis.it/gaia-s
28b0: 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 63 73 2f ins/affine-pics/
28c0: 73 69 63 69 6c 79 5f 33 2e 70 6e 67 22 20 61 6c sicily_3.png" al
28d0: 74 3d 22 73 69 63 69 6c 69 61 2d 33 22 20 62 6f t="sicilia-3" bo
28e0: 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74 64 3e rder="1">..</td>
28f0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d </tr>..<tr><td>.
2900: 0a 3c 68 33 3e 53 74 65 70 20 23 34 3a 20 66 69 .<h3>Step #4: fi
2910: 6e 61 6c 20 74 6f 75 63 68 3a 20 72 65 66 6c 65 nal touch: refle
2920: 63 74 69 6e 67 20 53 69 63 69 6c 79 3c 2f 68 33 cting Sicily</h3
2930: 3e 0d 0a 41 20 72 65 66 6c 65 63 74 65 64 20 53 >..A reflected S
2940: 69 63 69 6c 79 20 70 72 65 73 65 6e 74 73 20 6d icily presents m
2950: 61 6e 79 20 69 6e 74 65 72 65 73 74 69 6e 67 20 any interesting
2960: 61 64 76 61 6e 74 61 67 65 73 3a 20 77 65 27 6c advantages: we'l
2970: 6c 20 65 78 61 6d 69 6e 65 20 61 6c 6c 20 74 68 l examine all th
2980: 65 6d 20 69 6e 20 66 75 6c 6c 20 64 65 74 61 69 em in full detai
2990: 6c 20 69 6e 20 74 68 65 20 66 69 6e 61 6c 20 63 l in the final c
29a0: 6f 6e 63 6c 75 73 69 6f 6e 73 20 6f 66 20 74 68 onclusions of th
29b0: 65 20 70 72 65 73 65 6e 74 20 73 74 75 64 79 2e e present study.
29c0: 3c 62 72 3e 0d 0a 53 6f 20 77 65 27 6c 6c 20 6e <br>..So we'll n
29d0: 6f 77 20 61 70 70 6c 79 20 61 20 66 69 6e 61 6c ow apply a final
29e0: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f <a href="http:/
29f0: 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 /en.wikipedia.or
2a00: 67 2f 77 69 6b 69 2f 52 65 66 6c 65 63 74 69 6f g/wiki/Reflectio
2a10: 6e 5f 25 32 38 6d 61 74 68 65 6d 61 74 69 63 73 n_%28mathematics
2a20: 25 32 39 22 3e 72 65 66 6c 65 63 74 69 6f 6e 3c %29">reflection<
2a30: 2f 61 3e 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 /a> transformati
2a40: 6f 6e 3b 20 74 68 69 73 20 73 69 6d 70 6c 79 20 on; this simply
2a50: 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 61 corresponds to a
2a60: 20 3c 62 3e 31 38 30 20 64 65 67 72 65 65 73 3c <b>180 degrees<
2a70: 2f 62 3e 20 72 6f 74 61 74 69 6f 6e 20 61 72 6f /b> rotation aro
2a80: 75 6e 64 20 74 68 65 20 3c 62 3e 59 20 61 78 69 und the <b>Y axi
2a90: 73 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 41 6e 64 20 s</b>.<br>..And
2aa0: 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 69 73 the following is
2ab0: 20 74 68 65 20 66 69 6e 61 6c 20 53 51 4c 20 73 the final SQL s
2ac0: 74 61 74 65 6d 65 6e 74 20 61 70 70 6c 79 69 6e tatement applyin
2ad0: 67 20 61 6c 6c 20 74 68 65 20 61 62 6f 76 65 20 g all the above
2ae0: 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 20 transformations
2af0: 69 6e 20 61 20 73 69 6e 67 6c 65 20 73 68 6f 74 in a single shot
2b00: 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 43 :..<verbatim>..C
2b10: 52 45 41 54 45 20 54 41 42 4c 45 20 73 69 63 69 REATE TABLE sici
2b20: 6c 69 61 5f 34 20 41 53 0d 0a 53 45 4c 45 43 54 lia_4 AS..SELECT
2b30: 20 63 6f 64 5f 72 65 67 2c 20 0d 0a 20 20 20 41 cod_reg, .. A
2b40: 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 67 65 6f TM_Transform(geo
2b50: 6d 65 74 72 79 2c 0d 0a 20 20 20 20 20 20 41 54 metry,.. AT
2b60: 4d 5f 54 72 61 6e 73 6c 61 74 65 28 0d 0a 20 20 M_Translate(..
2b70: 20 20 20 20 20 20 20 41 54 4d 5f 54 72 61 6e 73 ATM_Trans
2b80: 6c 61 74 65 28 0d 0a 20 20 20 20 20 20 20 20 20 late(..
2b90: 20 20 20 41 54 4d 5f 59 52 6f 6c 6c 28 0d 0a 20 ATM_YRoll(..
2ba0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 54 AT
2bb0: 4d 5f 53 63 61 6c 65 28 0d 0a 20 20 20 20 20 20 M_Scale(..
2bc0: 20 20 20 20 20 20 20 20 20 20 20 20 41 54 4d 5f ATM_
2bd0: 52 6f 74 61 74 65 28 0d 0a 20 20 20 20 20 20 20 Rotate(..
2be0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41 54 AT
2bf0: 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61 74 M_CreateTranslat
2c00: 65 28 2d 63 78 2c 20 2d 63 79 29 2c 0d 0a 20 20 e(-cx, -cy),..
2c10: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
2c20: 32 35 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 25),..
2c30: 20 20 20 20 20 30 2e 39 2c 20 31 2e 33 29 2c 0d 0.9, 1.3),.
2c40: 0a 20 20 20 20 20 20 20 20 20 20 20 20 31 38 30 . 180
2c50: 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 63 78 2c ),.. cx,
2c60: 20 63 79 29 2c 0d 0a 20 20 20 20 20 20 2d 31 35 cy),.. -15
2c70: 30 30 30 30 2c 20 31 35 30 30 30 30 29 0d 0a 20 0000, 150000)..
2c80: 20 20 29 20 41 53 20 67 65 6f 6d 0d 0a 46 52 4f ) AS geom..FRO
2c90: 4d 20 28 53 45 4c 45 43 54 20 63 6f 64 5f 72 65 M (SELECT cod_re
2ca0: 67 2c 20 53 54 5f 58 28 63 65 6e 74 72 6f 69 64 g, ST_X(centroid
2cb0: 29 20 41 53 20 63 78 2c 20 53 54 5f 59 28 63 65 ) AS cx, ST_Y(ce
2cc0: 6e 74 72 6f 69 64 29 20 41 53 20 63 79 2c 20 67 ntroid) AS cy, g
2cd0: 65 6f 6d 65 74 72 79 0d 0a 20 20 20 20 20 20 46 eometry.. F
2ce0: 52 4f 4d 20 28 53 45 4c 45 43 54 20 63 6f 64 5f ROM (SELECT cod_
2cf0: 72 65 67 2c 20 53 54 5f 43 65 6e 74 72 6f 69 64 reg, ST_Centroid
2d00: 28 67 65 6f 6d 65 74 72 79 29 20 41 53 20 63 65 (geometry) AS ce
2d10: 6e 74 72 6f 69 64 2c 20 67 65 6f 6d 65 74 72 79 ntroid, geometry
2d20: 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 46 .. F
2d30: 52 4f 4d 20 73 69 63 69 6c 69 61 29 20 41 53 20 ROM sicilia) AS
2d40: 67 31 0d 0a 29 20 41 53 20 67 32 3b 0d 0a 0d 0a g1..) AS g2;....
2d50: 53 45 4c 45 43 54 20 52 65 63 6f 76 65 72 47 65 SELECT RecoverGe
2d60: 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27 73 69 ometryColumn('si
2d70: 63 69 6c 69 61 5f 34 27 2c 20 27 67 65 6f 6d 27 cilia_4', 'geom'
2d80: 2c 20 33 32 36 33 32 2c 20 27 4d 55 4c 54 49 50 , 32632, 'MULTIP
2d90: 4f 4c 59 47 4f 4e 27 2c 20 27 58 59 27 29 3b 0d OLYGON', 'XY');.
2da0: 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 20 0d 0a 3c .</verbatim> ..<
2db0: 62 3e 52 65 6d 61 72 6b 73 3c 2f 62 3e 3a 0d 0a b>Remarks</b>:..
2dc0: 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 65 72 65 20 <ul>..<li>there
2dd0: 61 72 65 20 73 65 76 65 72 61 6c 20 70 6f 73 73 are several poss
2de0: 69 62 6c 65 20 72 6f 74 61 74 69 6f 6e 73 20 73 ible rotations s
2df0: 75 70 70 6f 72 74 65 64 20 62 79 20 41 66 66 69 upported by Affi
2e00: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f ne Transformatio
2e10: 6e 3a 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 3c 62 n:..<ol>..<li><b
2e20: 3e 41 54 4d 5f 52 6f 74 61 74 65 28 29 3c 2f 62 >ATM_Rotate()</b
2e30: 3e 20 61 6c 77 61 79 73 20 69 6e 74 65 6e 64 73 > always intends
2e40: 20 61 20 3c 62 3e 32 44 3c 2f 62 3e 20 72 6f 74 a <b>2D</b> rot
2e50: 61 74 69 6f 6e 2c 20 69 2e 65 2e 20 61 20 72 6f ation, i.e. a ro
2e60: 74 61 74 69 6f 6e 20 63 65 6e 74 65 72 65 64 20 tation centered
2e70: 61 72 6f 75 6e 64 20 74 68 65 20 3c 62 3e 5a 20 around the <b>Z
2e80: 61 78 69 73 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c axis</b></li>..<
2e90: 6c 69 3e 49 6e 20 74 68 65 20 6d 6f 72 65 20 67 li>In the more g
2ea0: 65 6e 65 72 61 6c 20 3c 62 3e 33 44 3c 2f 62 3e eneral <b>3D</b>
2eb0: 20 63 61 73 65 20 74 68 65 72 65 20 61 72 65 20 case there are
2ec0: 74 68 72 65 65 20 70 6f 73 73 69 62 6c 65 20 72 three possible r
2ed0: 6f 74 61 74 69 6f 6e 73 2c 20 6f 6e 65 20 66 6f otations, one fo
2ee0: 72 20 65 61 63 68 20 61 78 69 73 2e 3c 2f 6c 69 r each axis.</li
2ef0: 3e 0d 0a 3c 6c 69 3e 74 68 65 20 63 6f 72 72 65 >..<li>the corre
2f00: 73 70 6f 6e 64 69 6e 67 20 53 51 4c 20 66 75 6e sponding SQL fun
2f10: 63 74 69 6f 6e 73 20 61 72 65 3a 20 3c 62 3e 41 ctions are: <b>A
2f20: 54 4d 5f 58 52 6f 6c 6c 28 29 3c 2f 62 3e 2c 20 TM_XRoll()</b>,
2f30: 3c 62 3e 41 54 4d 5f 59 52 6f 6c 6c 28 29 3c 2f <b>ATM_YRoll()</
2f40: 62 3e 20 61 6e 64 20 3c 62 3e 41 54 4d 5f 5a 52 b> and <b>ATM_ZR
2f50: 6f 6c 6c 28 29 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a oll()</b></li>..
2f60: 3c 6c 69 3e 3c 69 3e 3c 75 3e 4e 6f 74 65 3c 2f <li><i><u>Note</
2f70: 75 3e 3a 20 41 54 4d 5f 5a 52 6f 6c 6c 28 29 20 u>: ATM_ZRoll()
2f80: 61 6e 64 20 41 54 4d 5f 52 6f 74 61 74 65 28 29 and ATM_Rotate()
2f90: 20 73 69 6d 70 6c 79 20 61 72 65 20 74 77 6f 20 simply are two
2fa0: 64 69 66 66 65 72 65 6e 74 20 61 6c 69 61 73 2d different alias-
2fb0: 6e 61 6d 65 73 20 66 6f 72 20 74 68 65 20 73 61 names for the sa
2fc0: 6d 65 20 69 64 65 6e 74 69 63 61 6c 20 53 51 4c me identical SQL
2fd0: 20 66 75 6e 63 74 69 6f 6e 3c 2f 69 3e 2e 3c 2f function</i>.</
2fe0: 6c 69 3e 0d 0a 3c 2f 6f 6c 3e 3c 2f 6c 69 3e 0d li>..</ol></li>.
2ff0: 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 .</ul>..</td><td
3000: 3e 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 >..<img src="htt
3010: 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 ps://www.gaia-gi
3020: 73 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 61 s.it/gaia-sins/a
3030: 66 66 69 6e 65 2d 70 69 63 73 2f 73 69 63 69 6c ffine-pics/sicil
3040: 79 5f 34 2e 70 6e 67 22 20 61 6c 74 3d 22 73 69 y_4.png" alt="si
3050: 63 69 6c 69 61 2d 34 22 20 62 6f 72 64 65 72 3d cilia-4" border=
3060: 22 31 22 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e "1">..</td></tr>
3070: 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e ..<tr><td>..<h3>
3080: 46 69 6e 61 6c 20 63 6f 6e 73 69 64 65 72 61 74 Final considerat
3090: 69 6f 6e 73 20 61 6e 64 20 63 6f 6e 63 6c 75 73 ions and conclus
30a0: 69 6f 6e 73 3c 2f 68 33 3e 0d 0a 3c 6f 6c 3e 0d ions</h3>..<ol>.
30b0: 0a 3c 6c 69 3e 3c 62 3e 41 67 72 69 63 75 6c 74 .<li><b>Agricult
30c0: 75 72 65 3c 2f 62 3e 3a 20 61 66 74 65 72 20 61 ure</b>: after a
30d0: 70 70 6c 79 69 6e 67 20 74 68 65 20 73 75 67 67 pplying the sugg
30e0: 65 73 74 65 64 20 72 65 6c 6f 63 61 74 69 6f 6e ested relocation
30f0: 20 53 69 63 69 6c 79 20 77 69 6c 6c 20 67 61 69 Sicily will gai
3100: 6e 20 61 6e 20 69 6e 63 72 65 61 73 65 64 20 61 n an increased a
3110: 67 72 69 63 75 6c 74 75 72 61 6c 20 73 75 72 66 gricultural surf
3120: 61 63 65 20 61 6e 64 20 77 69 6c 6c 20 65 6e 6a ace and will enj
3130: 6f 79 20 61 20 6d 6f 72 65 20 66 61 76 6f 75 72 oy a more favour
3140: 61 62 6c 65 20 63 6c 69 6d 61 74 65 3a 20 73 74 able climate: st
3150: 69 6c 6c 20 73 75 6e 6e 79 20 61 6e 64 20 77 61 ill sunny and wa
3160: 72 6d 20 62 75 74 20 6d 75 63 68 20 6c 65 73 73 rm but much less
3170: 20 74 6f 72 72 69 64 20 61 6e 64 20 61 72 69 64 torrid and arid
3180: 2e 0d 0a 54 68 69 73 20 77 69 6c 6c 20 63 65 72 ...This will cer
3190: 74 61 69 6e 6c 79 20 73 75 73 74 61 69 6e 20 61 tainly sustain a
31a0: 20 6e 6f 74 69 63 65 61 62 6c 65 20 64 65 76 65 noticeable deve
31b0: 6c 6f 70 6d 65 6e 74 20 6f 66 20 6d 61 6e 79 20 lopment of many
31c0: 65 63 6f 6e 6f 6d 69 63 20 61 63 74 69 76 69 74 economic activit
31d0: 69 65 73 20 62 61 73 65 64 20 6f 6e 20 61 67 72 ies based on agr
31e0: 69 2d 66 6f 6f 64 20 69 6e 64 75 73 74 72 69 65 i-food industrie
31f0: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e s.</li>..<li><b>
3200: 54 72 61 6e 73 70 6f 72 74 61 74 69 6f 6e 20 73 Transportation s
3210: 79 73 74 65 6d 73 3c 2f 62 3e 3a 20 74 68 65 20 ystems</b>: the
3220: 73 75 67 67 65 73 74 65 64 20 6e 65 77 20 6c 61 suggested new la
3230: 79 6f 75 74 20 66 6f 72 20 74 68 65 20 4c 6f 77 yout for the Low
3240: 65 72 20 54 79 72 72 68 65 6e 69 61 6e 20 53 65 er Tyrrhenian Se
3250: 61 20 73 74 72 6f 6e 67 6c 79 20 66 61 63 69 6c a strongly facil
3260: 69 74 61 74 65 73 20 74 68 65 20 64 65 76 65 6c itates the devel
3270: 6f 70 6d 65 6e 74 20 6f 66 20 6d 61 72 69 74 69 opment of mariti
3280: 6d 65 20 74 72 61 6e 73 70 6f 72 74 73 2e 20 53 me transports. S
3290: 69 63 69 6c 79 20 63 6f 75 6c 64 20 6e 6f 77 20 icily could now
32a0: 62 65 63 6f 6d 65 20 74 68 65 20 63 65 6e 74 72 become the centr
32b0: 61 6c 20 68 75 62 20 6f 66 20 61 6e 20 65 66 66 al hub of an eff
32c0: 69 63 69 65 6e 74 20 6e 65 74 77 6f 72 6b 20 6f icient network o
32d0: 66 20 68 69 67 68 2d 73 70 65 65 64 20 61 6e 64 f high-speed and
32e0: 20 68 69 67 68 2d 66 72 65 71 75 65 6e 63 79 20 high-frequency
32f0: 66 65 72 72 79 20 63 6f 6e 6e 65 63 74 69 6f 6e ferry connection
3300: 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 50 61 s:..<ul>..<li>Pa
3310: 6c 65 72 6d 6f 20 77 69 6c 6c 20 6e 6f 77 20 64 lermo will now d
3320: 69 72 65 63 74 6c 79 20 66 61 63 65 20 4e 61 70 irectly face Nap
3330: 6c 65 73 3b 20 43 69 76 69 74 61 76 65 63 63 68 les; Civitavecch
3340: 69 61 20 28 52 6f 6d 65 29 20 73 65 65 6d 73 20 ia (Rome) seems
3350: 74 6f 20 62 65 20 61 20 73 65 63 6f 6e 64 20 6f to be a second o
3360: 62 76 69 6f 75 73 20 74 65 72 6d 69 6e 61 6c 20 bvious terminal
3370: 66 6f 72 20 64 69 72 65 63 74 20 63 6f 6e 6e 65 for direct conne
3380: 63 74 69 6f 6e 73 20 6c 65 61 64 69 6e 67 20 74 ctions leading t
3390: 6f 20 43 65 6e 74 72 61 6c 20 49 74 61 6c 79 2e o Central Italy.
33a0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4d 65 73 73 69 </li>..<li>Messi
33b0: 6e 61 20 77 69 6c 6c 20 61 63 71 75 69 72 65 20 na will acquire
33c0: 61 20 64 65 63 69 73 69 76 65 20 73 74 72 61 74 a decisive strat
33d0: 65 67 69 63 20 72 6f 6c 65 2c 20 61 6e 64 20 77 egic role, and w
33e0: 69 6c 6c 20 62 65 63 6f 6d 65 20 74 68 65 20 74 ill become the t
33f0: 65 72 6d 69 6e 61 6c 20 66 6f 72 20 66 65 72 72 erminal for ferr
3400: 79 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 6c 65 y connections le
3410: 61 64 69 6e 67 20 74 6f 20 43 65 6e 74 72 61 6c ading to Central
3420: 20 61 6e 64 20 4e 6f 72 74 68 65 72 6e 20 49 74 and Northern It
3430: 61 6c 79 3a 20 43 69 76 69 74 61 76 65 63 63 68 aly: Civitavecch
3440: 69 61 2c 20 4c 65 67 68 6f 72 6e 20 61 6e 64 20 ia, Leghorn and
3450: 47 65 6e 6f 61 20 61 72 65 20 74 68 65 20 6f 62 Genoa are the ob
3460: 76 69 6f 75 73 20 64 65 73 74 69 6e 61 74 69 6f vious destinatio
3470: 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 20 ns.</li>..<li>A
3480: 6c 65 73 73 20 72 65 6c 65 76 61 6e 74 20 28 62 less relevant (b
3490: 75 74 20 61 6e 79 77 61 79 20 69 6e 74 65 72 65 ut anyway intere
34a0: 73 74 69 6e 67 29 20 66 65 72 72 79 20 6c 69 6e sting) ferry lin
34b0: 6b 20 77 69 6c 6c 20 6a 6f 69 6e 20 54 72 61 70 k will join Trap
34c0: 61 6e 69 20 61 6e 64 20 52 65 67 67 69 6f 20 43 ani and Reggio C
34d0: 61 6c 61 62 72 69 61 2e 3c 2f 6c 69 3e 0d 0a 3c alabria.</li>..<
34e0: 6c 69 3e 53 61 72 64 69 6e 69 61 20 61 73 20 77 li>Sardinia as w
34f0: 65 6c 6c 20 77 69 6c 6c 20 73 74 72 6f 6e 67 6c ell will strongl
3500: 79 20 62 65 6e 65 66 69 74 20 66 72 6f 6d 20 74 y benefit from t
3510: 68 65 20 6e 65 77 20 6c 61 79 6f 75 74 3b 20 43 he new layout; C
3520: 61 67 6c 69 61 72 69 20 77 69 6c 6c 20 62 65 20 agliari will be
3530: 64 69 72 65 63 74 6c 79 20 63 6f 6e 6e 65 63 74 directly connect
3540: 65 64 20 74 6f 20 53 79 72 61 63 75 73 65 20 28 ed to Syracuse (
3550: 6f 72 20 6d 61 79 20 62 65 20 41 75 67 75 73 74 or may be August
3560: 61 29 2c 20 61 6e 64 20 4f 6c 62 69 61 20 74 6f a), and Olbia to
3570: 20 4d 65 73 73 69 6e 61 2e 3c 62 72 3e 54 68 69 Messina.<br>Thi
3580: 73 20 6d 65 61 6e 73 20 64 65 66 69 6e 69 74 65 s means definite
3590: 6c 79 20 62 72 65 61 6b 69 6e 67 20 74 68 65 20 ly breaking the
35a0: 73 65 63 75 6c 61 72 20 69 6e 73 75 6c 61 74 69 secular insulati
35b0: 6f 6e 20 6f 66 20 53 61 72 64 69 6e 69 61 2c 20 on of Sardinia,
35c0: 74 68 61 74 20 77 69 6c 6c 20 6e 6f 77 20 73 74 that will now st
35d0: 61 72 74 20 65 6e 6a 6f 79 69 6e 67 20 61 20 73 art enjoying a s
35e0: 74 72 6f 6e 67 65 72 20 61 6e 64 20 6d 6f 72 65 tronger and more
35f0: 20 65 66 66 65 63 74 69 76 65 20 69 6e 74 65 67 effective integ
3600: 72 61 74 69 6f 6e 20 77 69 74 68 20 53 6f 75 74 ration with Sout
3610: 68 65 72 6e 20 49 74 61 6c 79 2e 3c 2f 6c 69 3e hern Italy.</li>
3620: 20 0d 0a 3c 6c 69 3e 4c 61 73 74 20 62 75 74 20 ..<li>Last but
3630: 6e 6f 74 20 6c 65 61 73 74 3a 20 61 74 20 61 20 not least: at a
3640: 6d 6f 72 65 20 73 74 72 61 74 65 67 69 63 20 6c more strategic l
3650: 65 76 65 6c 20 69 74 27 73 20 61 62 73 6f 6c 75 evel it's absolu
3660: 74 65 6c 79 20 6f 62 76 69 6f 75 73 20 74 68 61 tely obvious tha
3670: 74 20 6e 6f 77 20 73 75 70 65 72 74 61 6e 6b 65 t now supertanke
3680: 72 73 2c 20 62 69 67 20 63 6f 6e 74 61 69 6e 65 rs, big containe
3690: 72 20 73 68 69 70 73 20 61 6e 64 20 63 72 75 69 r ships and crui
36a0: 73 65 20 6c 69 6e 65 72 73 20 63 61 6e 20 66 72 se liners can fr
36b0: 65 65 6c 79 20 63 69 72 63 75 6d 6e 61 76 69 67 eely circumnavig
36c0: 61 74 65 20 53 69 63 69 6c 79 20 69 6e 20 61 6e ate Sicily in an
36d0: 79 20 64 69 72 65 63 74 69 6f 6e 20 75 6e 64 65 y direction unde
36e0: 72 20 75 6e 63 6f 6d 70 72 6f 6d 69 73 65 64 20 r uncompromised
36f0: 73 61 66 65 74 79 20 63 6f 6e 64 69 74 69 6f 6e safety condition
3700: 73 2e 3c 62 72 3e 0d 0a 41 6e 64 20 63 6f 6e 73 s.<br>..And cons
3710: 65 71 75 65 6e 74 6c 79 20 61 6c 6c 20 54 79 72 equently all Tyr
3720: 72 68 65 6e 69 61 6e 20 68 61 72 62 6f 72 73 20 rhenian harbors
3730: 77 69 6c 6c 20 6e 6f 77 20 62 65 20 64 69 72 65 will now be dire
3740: 63 74 6c 79 20 63 6f 6e 6e 65 63 74 65 64 20 62 ctly connected b
3750: 6f 74 68 20 74 6f 20 45 61 73 74 65 72 6e 20 61 oth to Eastern a
3760: 6e 64 20 57 65 73 74 65 72 6e 20 4d 65 64 69 74 nd Western Medit
3770: 65 72 72 61 6e 65 61 6e 3a 20 74 68 69 73 20 77 erranean: this w
3780: 69 6c 6c 20 73 75 72 65 6c 79 20 69 6e 64 75 63 ill surely induc
3790: 65 20 61 20 72 65 6d 61 72 6b 61 62 6c 65 20 67 e a remarkable g
37a0: 72 6f 77 74 68 20 69 6e 20 74 68 65 20 76 6f 6c rowth in the vol
37b0: 75 6d 65 73 20 6f 66 20 69 6e 74 65 72 6e 61 74 umes of internat
37c0: 69 6f 6e 61 6c 20 74 72 61 66 66 69 63 73 20 74 ional traffics t
37d0: 68 65 79 20 63 6f 75 6c 64 20 70 6f 74 65 6e 74 hey could potent
37e0: 69 61 6c 6c 79 20 61 74 74 72 61 63 74 2e 3c 2f ially attract.</
37f0: 6c 69 3e 20 0d 0a 3c 2f 75 6c 3e 3c 2f 6c 69 3e li> ..</ul></li>
3800: 20 0d 0a 3c 6c 69 3e 3c 62 3e 48 65 61 76 79 20 ..<li><b>Heavy
3810: 69 6e 64 75 73 74 72 79 3c 2f 62 3e 3a 20 74 68 industry</b>: th
3820: 65 20 6e 65 77 20 74 72 61 6e 73 70 6f 72 74 61 e new transporta
3830: 74 69 6f 6e 20 73 79 73 74 65 6d 20 73 74 72 6f tion system stro
3840: 6e 67 6c 79 20 63 65 6e 74 65 72 65 64 20 61 72 ngly centered ar
3850: 6f 75 6e 64 20 6d 61 72 69 74 69 6d 65 20 63 6f ound maritime co
3860: 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 20 77 69 6c mmunications wil
3870: 6c 20 73 75 72 65 6c 79 20 69 6e 64 75 63 65 20 l surely induce
3880: 61 6e 20 61 63 74 69 76 65 20 72 65 62 69 72 74 an active rebirt
3890: 68 20 6f 66 20 73 68 69 70 79 61 72 64 73 2c 20 h of shipyards,
38a0: 61 20 66 6c 6f 75 72 69 73 68 69 6e 67 20 74 72 a flourishing tr
38b0: 61 64 69 74 69 6f 6e 61 6c 20 65 78 63 65 6c 6c aditional excell
38c0: 65 6e 63 65 20 6f 66 20 6d 61 6e 79 20 73 6f 75 ence of many sou
38d0: 74 68 65 72 6e 20 72 65 67 69 6f 6e 73 20 69 6e thern regions in
38e0: 20 70 61 73 74 20 74 69 6d 65 73 20 62 75 74 20 past times but
38f0: 6e 6f 77 61 64 61 79 73 20 61 20 73 61 64 6c 79 nowadays a sadly
3900: 20 64 65 63 6c 69 6e 69 6e 67 20 61 63 74 69 76 declining activ
3910: 69 74 79 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c ity.</li>..<li><
3920: 62 3e 54 6f 75 72 69 73 6d 3c 2f 62 3e 3a 20 61 b>Tourism</b>: a
3930: 20 72 65 61 72 72 61 6e 67 65 64 20 4c 6f 77 65 rearranged Lowe
3940: 72 20 54 79 72 72 68 65 6e 69 61 6e 20 53 65 61 r Tyrrhenian Sea
3950: 20 77 69 6c 6c 20 63 65 72 74 61 69 6e 6c 79 20 will certainly
3960: 62 65 63 6f 6d 65 20 61 20 76 65 72 79 20 61 74 become a very at
3970: 74 72 61 63 74 69 76 65 20 64 65 73 74 69 6e 61 tractive destina
3980: 74 69 6f 6e 20 66 6f 72 20 69 6e 74 65 72 6e 61 tion for interna
3990: 74 69 6f 6e 61 6c 20 74 6f 75 72 69 73 74 73 2e tional tourists.
39a0: 3c 62 72 3e 0d 0a 49 74 27 73 20 77 6f 72 74 68 <br>..It's worth
39b0: 20 6e 6f 74 69 6e 67 20 74 68 61 74 20 74 68 65 noting that the
39c0: 20 70 72 6f 70 6f 73 65 64 20 6c 61 79 6f 75 74 proposed layout
39d0: 20 77 69 6c 6c 20 67 69 76 65 20 62 69 72 74 68 will give birth
39e0: 20 74 6f 20 61 20 77 6f 6e 64 65 72 66 75 6c 20 to a wonderful
39f0: 69 73 6c 61 6e 64 20 67 72 6f 75 70 20 65 78 74 island group ext
3a00: 65 6e 64 69 6e 67 20 62 65 74 77 65 65 6e 20 53 ending between S
3a10: 69 63 69 6c 79 20 61 6e 64 20 73 6f 75 74 68 65 icily and southe
3a20: 72 6e 20 4c 61 7a 69 6f 20 2d 20 43 61 6d 70 61 rn Lazio - Campa
3a30: 6e 69 61 3b 20 74 68 65 20 50 6f 6e 74 69 6e 65 nia; the Pontine
3a40: 2c 20 41 65 6f 6c 69 61 6e 20 61 6e 64 20 47 75 , Aeolian and Gu
3a50: 6c 66 20 6f 66 20 4e 61 70 6c 65 73 20 69 73 6c lf of Naples isl
3a60: 61 6e 64 73 20 77 69 6c 6c 20 62 65 20 70 72 61 ands will be pra
3a70: 63 74 69 63 61 6c 6c 79 20 6d 65 72 67 65 64 20 ctically merged
3a80: 69 6e 74 6f 20 61 20 73 69 6e 67 6c 65 20 61 72 into a single ar
3a90: 63 68 69 70 65 6c 61 67 6f 2e 3c 62 72 3e 0d 0a chipelago.<br>..
3aa0: 53 65 76 65 72 61 6c 20 6f 66 20 74 68 65 73 65 Several of these
3ab0: 20 69 73 6c 61 6e 64 73 20 61 63 74 75 61 6c 6c islands actuall
3ac0: 79 20 61 72 65 20 61 63 74 69 76 65 20 76 6f 6c y are active vol
3ad0: 63 61 6e 6f 65 73 2c 20 61 6e 64 20 74 68 65 20 canoes, and the
3ae0: 6e 65 77 20 69 73 6c 61 6e 64 20 63 68 61 69 6e new island chain
3af0: 20 77 69 6c 6c 20 64 69 72 65 63 74 6c 79 20 6a will directly j
3b00: 6f 69 6e 20 4d 6f 75 6e 74 20 45 74 6e 61 20 61 oin Mount Etna a
3b10: 6e 64 20 4d 6f 75 6e 74 20 56 65 73 75 76 69 75 nd Mount Vesuviu
3b20: 73 2e 3c 62 72 3e 0d 0a 53 6f 20 74 68 69 73 20 s.<br>..So this
3b30: 61 72 65 61 20 77 69 6c 6c 20 72 65 70 72 65 73 area will repres
3b40: 65 6e 74 20 74 68 65 20 6d 6f 73 74 20 69 6d 70 ent the most imp
3b50: 72 65 73 73 69 76 65 20 76 6f 6c 63 61 6e 69 63 ressive volcanic
3b60: 20 66 69 65 6c 64 20 6f 66 20 45 75 72 6f 70 65 field of Europe
3b70: 20 61 6e 64 20 77 69 6c 6c 20 63 65 72 74 61 69 and will certai
3b80: 6e 6c 79 20 62 65 63 6f 6d 65 20 61 20 73 74 72 nly become a str
3b90: 6f 6e 67 20 74 6f 75 72 69 73 74 69 63 20 61 74 ong touristic at
3ba0: 74 72 61 63 74 69 6f 6e 20 74 68 61 6e 6b 73 20 traction thanks
3bb0: 74 6f 20 69 74 73 20 6e 69 63 65 6c 79 20 73 75 to its nicely su
3bc0: 6e 6e 79 20 77 65 61 74 68 65 72 20 61 6e 64 20 nny weather and
3bd0: 70 6c 65 61 73 61 6e 74 20 63 6c 69 6d 61 74 65 pleasant climate
3be0: 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 ...</li>..<li><b
3bf0: 3e 49 6e 74 65 72 6e 61 6c 20 63 6f 6d 6d 65 72 >Internal commer
3c00: 63 65 3c 2f 62 3e 3a 20 77 65 20 63 61 6e 20 65 ce</b>: we can e
3c10: 61 73 69 6c 79 20 66 6f 72 65 63 61 73 74 20 61 asily forecast a
3c20: 20 73 74 72 6f 6e 67 20 67 72 6f 77 74 68 20 69 strong growth i
3c30: 6e 20 76 6f 6c 75 6d 65 20 6f 66 20 69 6e 74 65 n volume of inte
3c40: 72 6e 61 6c 20 65 78 63 68 61 6e 67 65 73 20 74 rnal exchanges t
3c50: 68 61 6e 6b 73 20 74 6f 20 74 68 65 20 62 65 74 hanks to the bet
3c60: 74 65 72 20 63 6f 6e 6e 65 63 74 69 76 69 74 79 ter connectivity
3c70: 20 62 61 73 65 64 20 6f 6e 20 6d 61 72 69 74 69 based on mariti
3c80: 6d 65 20 74 72 61 6e 73 70 6f 72 74 73 2e 3c 62 me transports.<b
3c90: 72 3e 20 0d 0a 4a 75 73 74 20 61 20 73 69 6e 67 r> ..Just a sing
3ca0: 6c 65 20 65 78 61 6d 70 6c 65 3a 20 53 61 72 64 le example: Sard
3cb0: 69 6e 69 61 20 73 68 6f 75 6c 64 20 6e 6f 77 20 inia should now
3cc0: 62 65 20 61 62 6c 65 20 74 6f 20 65 78 70 6f 72 be able to expor
3cd0: 74 20 69 74 73 20 66 69 6e 65 73 74 20 73 68 65 t its finest she
3ce0: 65 70 20 63 68 65 65 73 65 20 6f 6e 20 43 61 6c ep cheese on Cal
3cf0: 61 62 72 69 61 6e 20 6d 61 72 6b 65 74 73 20 77 abrian markets w
3d00: 68 69 6c 73 74 20 43 61 6c 61 62 72 69 61 20 63 hilst Calabria c
3d10: 6f 75 6c 64 20 66 72 65 65 6c 79 20 65 78 70 6f ould freely expo
3d20: 72 74 20 69 74 73 20 72 65 6e 6f 77 6e 20 72 65 rt its renown re
3d30: 64 20 68 6f 74 20 63 68 69 6c 6c 79 20 70 65 70 d hot chilly pep
3d40: 70 65 72 73 20 74 6f 20 53 61 72 64 69 6e 69 61 pers to Sardinia
3d50: 3b 20 6e 6f 74 20 6f 6e 6c 79 20 62 6f 74 68 20 ; not only both
3d60: 72 65 67 69 6f 6e 73 20 77 69 6c 6c 20 77 69 64 regions will wid
3d70: 65 6c 79 20 62 65 6e 65 66 69 74 20 66 72 6f 6d ely benefit from
3d80: 20 69 6e 63 72 65 61 73 65 64 20 65 78 63 68 61 increased excha
3d90: 6e 67 65 20 76 6f 6c 75 6d 65 73 2c 20 62 75 74 nge volumes, but
3da0: 20 53 69 63 69 6c 79 20 61 73 20 77 65 6c 6c 20 Sicily as well
3db0: 77 69 6c 6c 20 74 61 6b 65 20 70 72 6f 66 69 74 will take profit
3dc0: 20 66 72 6f 6d 20 66 6c 6f 75 72 69 73 68 69 6e from flourishin
3dd0: 67 20 6c 6f 67 69 73 74 69 63 20 61 6e 64 20 62 g logistic and b
3de0: 79 20 6f 74 68 65 72 20 61 63 74 69 76 69 74 69 y other activiti
3df0: 65 73 20 62 61 73 65 64 20 6f 6e 20 63 6f 6d 6d es based on comm
3e00: 65 72 63 69 61 6c 20 69 6e 74 65 72 6d 65 64 69 ercial intermedi
3e10: 61 74 69 6f 6e 20 73 65 72 76 69 63 65 73 2e 3c ation services.<
3e20: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 50 72 61 /li>..<li><b>Pra
3e30: 63 74 69 63 61 6c 20 72 65 61 6c 69 7a 61 74 69 ctical realizati
3e40: 6f 6e 3c 2f 62 3e 3a 20 74 68 65 20 70 72 65 73 on</b>: the pres
3e50: 65 6e 74 20 73 74 75 64 79 20 63 6c 65 61 72 6c ent study clearl
3e60: 79 20 64 65 6d 6f 6e 73 74 72 61 74 65 73 20 74 y demonstrates t
3e70: 68 61 74 20 74 68 65 72 65 20 69 73 20 6e 6f 74 hat there is not
3e80: 68 69 6e 67 20 69 6e 20 4d 61 74 68 65 6d 61 74 hing in Mathemat
3e90: 69 63 73 2c 20 47 65 6f 6d 65 74 72 79 20 6f 72 ics, Geometry or
3ea0: 20 47 65 6f 67 72 61 70 68 79 20 66 6f 72 62 69 Geography forbi
3eb0: 64 64 69 6e 67 20 74 68 65 20 70 72 61 63 74 69 dding the practi
3ec0: 63 61 6c 20 72 65 61 6c 69 7a 61 74 69 6f 6e 20 cal realization
3ed0: 6f 66 20 74 68 65 20 73 75 67 67 65 73 74 65 64 of the suggested
3ee0: 20 69 64 65 61 2e 3c 62 72 3e 0d 0a 55 6e 68 61 idea.<br>..Unha
3ef0: 70 70 69 6c 79 20 74 68 65 20 63 75 72 72 65 6e ppily the curren
3f00: 74 20 73 74 61 74 65 20 6f 66 20 74 68 65 20 61 t state of the a
3f10: 72 74 20 69 6e 20 47 65 6f 6c 6f 67 79 20 73 74 rt in Geology st
3f20: 69 6c 6c 20 70 6f 73 65 73 20 6d 61 6e 79 20 70 ill poses many p
3f30: 75 7a 7a 6c 69 6e 67 20 70 72 6f 62 6c 65 6d 73 uzzling problems
3f40: 20 6e 6f 74 20 79 65 74 20 66 75 6c 6c 79 20 72 not yet fully r
3f50: 65 73 6f 6c 76 65 64 3b 20 61 6e 79 77 61 79 20 esolved; anyway
3f60: 77 65 20 61 72 65 20 68 6f 70 65 66 75 6c 6c 79 we are hopefully
3f70: 20 65 78 70 65 63 74 69 6e 67 20 74 68 61 74 20 expecting that
3f80: 66 75 74 75 72 65 20 61 64 76 61 6e 63 65 6d 65 future advanceme
3f90: 6e 74 73 20 69 6e 20 54 65 63 74 6f 6e 69 63 73 nts in Tectonics
3fa0: 20 77 69 6c 6c 20 70 6f 73 73 69 62 6c 79 20 61 will possibly a
3fb0: 6c 6c 6f 77 20 74 6f 20 6f 76 65 72 63 6f 6d 65 llow to overcome
3fc0: 20 61 6e 79 20 72 65 6d 61 69 6e 69 6e 67 20 69 any remaining i
3fd0: 73 73 75 65 2e 3c 62 72 3e 0d 0a 4d 6f 72 65 20 ssue.<br>..More
3fe0: 73 70 65 63 69 66 69 63 61 6c 6c 79 20 61 20 62 specifically a b
3ff0: 65 74 74 65 72 20 6b 6e 6f 77 6c 65 64 67 65 20 etter knowledge
4000: 6f 66 20 64 65 65 70 20 69 6e 74 65 72 61 63 74 of deep interact
4010: 69 6f 6e 73 20 62 65 74 77 65 65 6e 20 74 68 65 ions between the
4020: 20 63 72 75 73 74 20 61 6e 64 20 74 68 65 20 75 crust and the u
4030: 70 70 65 72 20 6d 61 6e 74 6c 65 20 61 6c 6f 6e pper mantle alon
4040: 67 20 74 68 65 20 4d 6f 68 6f 20 61 6e 64 20 61 g the Moho and a
4050: 20 6d 6f 72 65 20 64 65 74 61 69 6c 65 64 20 63 more detailed c
4060: 6f 6d 70 72 65 68 65 6e 73 69 6f 6e 20 6f 66 20 omprehension of
4070: 74 68 65 20 6d 69 63 72 6f 2d 70 6c 61 71 75 65 the micro-plaque
4080: 73 20 6d 65 63 68 61 6e 69 63 73 20 77 69 6c 6c s mechanics will
4090: 20 63 65 72 74 61 69 6e 6c 79 20 68 65 6c 70 3b certainly help;
40a0: 20 77 65 20 61 72 65 20 72 61 74 68 65 72 20 63 we are rather c
40b0: 6f 6e 66 69 64 65 6e 74 20 69 6e 20 66 75 74 75 onfident in futu
40c0: 72 65 20 72 65 73 65 61 72 63 68 20 61 63 68 69 re research achi
40d0: 65 76 65 6d 65 6e 74 73 20 6f 6e 20 74 68 65 73 evements on thes
40e0: 65 20 66 69 65 6c 64 73 2e 0d 0a 3c 2f 6f 6c 3e e fields...</ol>
40f0: 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d ..</td><td>..<im
4100: 67 20 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 g src="https://w
4110: 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 ww.gaia-gis.it/g
4120: 61 69 61 2d 73 69 6e 73 2f 61 66 66 69 6e 65 2d aia-sins/affine-
4130: 70 69 63 73 2f 69 74 61 6c 79 2d 32 2e 30 2e 70 pics/italy-2.0.p
4140: 6e 67 22 20 61 6c 74 3d 22 69 74 61 6c 79 2d 32 ng" alt="italy-2
4150: 2e 30 22 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d .0" border="1">.
4160: 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 .</td></tr>..</t
4170: 61 62 6c 65 3e 3c 62 72 3e 3c 68 72 3e 0d 0a 3c able><br><hr>..<
4180: 68 32 3e 42 6f 72 69 6e 67 20 4d 61 74 68 3a 20 h2>Boring Math:
4190: 61 20 6d 6f 72 65 20 66 6f 72 6d 61 6c 20 70 72 a more formal pr
41a0: 65 73 65 6e 74 61 74 69 6f 6e 3c 2f 68 32 3e 0d esentation</h2>.
41b0: 0a 50 6c 61 79 74 69 6d 65 27 73 20 6f 76 65 72 .Playtime's over
41c0: 3a 20 77 65 27 6c 6c 20 6e 6f 77 20 73 74 61 72 : we'll now star
41d0: 74 20 61 20 6d 6f 73 74 20 73 65 72 69 6f 75 73 t a most serious
41e0: 20 65 78 70 6c 61 6e 61 74 69 6f 6e 2e 3c 62 72 explanation.<br
41f0: 3e 3c 62 72 3e 0d 0a 41 6e 20 41 66 66 69 6e 65 ><br>..An Affine
4200: 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 Transformation
4210: 63 61 6e 20 62 65 20 72 65 70 72 65 73 65 6e 74 can be represent
4220: 65 64 20 69 6e 20 74 68 65 20 66 6f 72 6d 20 6f ed in the form o
4230: 66 20 61 20 73 71 75 61 72 65 20 6d 61 74 72 69 f a square matri
4240: 78 3b 20 74 68 65 20 73 69 6d 70 6c 65 72 20 3c x; the simpler <
4250: 62 3e 32 44 3c 2f 62 3e 20 63 61 73 65 20 72 65 b>2D</b> case re
4260: 71 75 69 72 65 73 20 61 20 3c 62 3e 33 20 78 20 quires a <b>3 x
4270: 33 3c 2f 62 3e 20 6d 61 74 72 69 78 2c 20 61 6e 3</b> matrix, an
4280: 64 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 73 d the followings
4290: 20 61 72 65 20 74 68 65 20 70 6f 73 73 69 62 6c are the possibl
42a0: 65 20 61 72 72 61 6e 67 65 6d 65 6e 74 73 20 63 e arrangements c
42b0: 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 74 6f 20 orresponding to
42c0: 65 61 63 68 20 65 6c 65 6d 65 6e 74 61 72 79 20 each elementary
42d0: 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3a 3c transformation:<
42e0: 62 72 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 3e br><br>..<table>
42f0: 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73 70 61 ..<tr><td rowspa
4300: 6e 3d 22 34 22 20 76 61 6c 69 67 6e 3d 22 6d 69 n="4" valign="mi
4310: 64 64 6c 65 22 3e 47 65 6e 65 72 61 6c 20 6c 61 ddle">General la
4320: 79 6f 75 74 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f yout</td>..<td>/
4330: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
4340: 63 65 6e 74 65 72 22 3e 3c 62 3e 61 3c 2f 62 3e center"><b>a</b>
4350: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
4360: 63 65 6e 74 65 72 22 3e 3c 62 3e 62 3c 2f 62 3e center"><b>b</b>
4370: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
4380: 63 65 6e 74 65 72 22 3e 3c 62 3e 78 6f 66 66 3c center"><b>xoff<
4390: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 /b></td><td>\</t
43a0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
43b0: 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e >|</td><td align
43c0: 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 64 3c 2f ="center"><b>d</
43d0: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e b></td><td align
43e0: 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 65 3c 2f ="center"><b>e</
43f0: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e b></td><td align
4400: 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 79 6f 66 ="center"><b>yof
4410: 66 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c f</b></td><td>|<
4420: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c /td></tr>..<tr><
4430: 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 td>\</td><td ali
4440: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 gn="center">0</t
4450: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
4460: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 ter">0</td><td a
4470: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c lign="center">1<
4480: 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f /td><td>/</td></
4490: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c tr>..<tr><td col
44a0: 73 70 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 span="5"><hr></t
44b0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
44c0: 20 72 6f 77 73 70 61 6e 3d 22 34 22 20 76 61 6c rowspan="4" val
44d0: 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 49 64 65 ign="middle">Ide
44e0: 6e 74 69 74 79 3c 2f 74 64 3e 0d 0a 3c 74 64 3e ntity</td>..<td>
44f0: 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d /</td><td align=
4500: 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c "center">1</td><
4510: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
4520: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 ">0</td><td alig
4530: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 n="center">0</td
4540: 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72 3e ><td>\</td></tr>
4550: 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e ..<tr><td>|</td>
4560: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
4570: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 r">0</td><td ali
4580: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 gn="center">1</t
4590: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
45a0: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c ter">0</td><td>|
45b0: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e </td></tr>..<tr>
45c0: 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c <td>\</td><td al
45d0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f ign="center">0</
45e0: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 td><td align="ce
45f0: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 nter">0</td><td
4600: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 align="center">1
4610: 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c </td><td>/</td><
4620: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f /tr>..<tr><td co
4630: 6c 73 70 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f lspan="5"><hr></
4640: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
4650: 64 20 72 6f 77 73 70 61 6e 3d 22 34 22 20 76 61 d rowspan="4" va
4660: 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 54 72 lign="middle">Tr
4670: 61 6e 73 6c 61 74 65 28 3c 62 3e 74 78 3c 2f 62 anslate(<b>tx</b
4680: 3e 2c 20 3c 62 3e 74 79 3c 2f 62 3e 29 26 6e 62 >, <b>ty</b>)&nb
4690: 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73 70 3b 3c sp; <
46a0: 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e /td>..<td>/</td>
46b0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
46c0: 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 r">1</td><td ali
46d0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 gn="center">0</t
46e0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
46f0: 74 65 72 22 3e 3c 62 3e 74 78 3c 2f 62 3e 3c 2f ter"><b>tx</b></
4700: 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 td><td>\</td></t
4710: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 r>..<tr><td>|</t
4720: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
4730: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 ter">0</td><td a
4740: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c lign="center">1<
4750: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
4760: 65 6e 74 65 72 22 3e 3c 62 3e 74 79 3c 2f 62 3e enter"><b>ty</b>
4770: 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c </td><td>|</td><
4780: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c /tr>..<tr><td>\<
4790: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
47a0: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 enter">0</td><td
47b0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
47c0: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 0</td><td align=
47d0: 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c "center">1</td><
47e0: 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a td>/</td></tr>..
47f0: 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d <tr><td colspan=
4800: 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74 "5"><hr></td></t
4810: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73 r>..<tr><td rows
4820: 70 61 6e 3d 22 34 22 20 76 61 6c 69 67 6e 3d 22 pan="4" valign="
4830: 6d 69 64 64 6c 65 22 3e 53 63 61 6c 65 28 3c 62 middle">Scale(<b
4840: 3e 73 78 3c 2f 62 3e 2c 20 3c 62 3e 73 79 3c 2f >sx</b>, <b>sy</
4850: 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c b>)</td>..<td>/<
4860: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
4870: 65 6e 74 65 72 22 3e 3c 62 3e 73 78 3c 2f 62 3e enter"><b>sx</b>
4880: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
4890: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 center">0</td><t
48a0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
48b0: 3e 30 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 >0</td><td>\</td
48c0: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e ></tr>..<tr><td>
48d0: 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d |</td><td align=
48e0: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c "center">0</td><
48f0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
4900: 22 3e 3c 62 3e 73 79 3c 2f 62 3e 3c 2f 74 64 3e "><b>sy</b></td>
4910: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
4920: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f r">0</td><td>|</
4930: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
4940: 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 d>\</td><td alig
4950: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 n="center">0</td
4960: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
4970: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c er">0</td><td al
4980: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f ign="center">1</
4990: 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 td><td>/</td></t
49a0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 r>..<tr><td cols
49b0: 70 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 pan="5"><hr></td
49c0: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 ></tr>..<tr><td
49d0: 72 6f 77 73 70 61 6e 3d 22 34 22 20 76 61 6c 69 rowspan="4" vali
49e0: 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 52 6f 74 61 gn="middle">Rota
49f0: 74 65 28 3c 62 3e 26 74 68 65 74 61 3b 3c 2f 62 te(<b>θ</b
4a00: 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f >)</td>..<td>/</
4a10: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 td><td align="ce
4a20: 6e 74 65 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68 nter"><b>cos(&th
4a30: 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 eta;)</b></td><t
4a40: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
4a50: 3e 3c 62 3e 2d 73 69 6e 28 26 74 68 65 74 61 3b ><b>-sin(θ
4a60: 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c )</b></td><td al
4a70: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f ign="center">0</
4a80: 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 td><td>\</td></t
4a90: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 r>..<tr><td>|</t
4aa0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
4ab0: 74 65 72 22 3e 3c 62 3e 73 69 6e 28 26 74 68 65 ter"><b>sin(&the
4ac0: 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 ta;)</b></td><td
4ad0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
4ae0: 3c 62 3e 63 6f 73 28 26 74 68 65 74 61 3b 29 3c <b>cos(θ)<
4af0: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 /b></td><td alig
4b00: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 n="center">0</td
4b10: 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e ><td>|</td></tr>
4b20: 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e ..<tr><td>\</td>
4b30: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
4b40: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 r">0</td><td ali
4b50: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 gn="center">0</t
4b60: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
4b70: 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 3e 2f ter">1</td><td>/
4b80: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e </td></tr>..<tr>
4b90: 3c 74 64 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a <td></td></tr>..
4ba0: 3c 2f 74 61 62 6c 65 3e 3c 62 72 3e 0d 0a 41 20 </table><br>..A
4bb0: 3c 62 3e 33 44 3c 2f 62 3e 20 61 66 66 69 6e 65 <b>3D</b> affine
4bc0: 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 transformation
4bd0: 72 65 71 75 69 72 65 73 20 61 20 3c 62 3e 34 20 requires a <b>4
4be0: 78 20 34 3c 2f 62 3e 20 6d 61 74 72 69 78 2e 3c x 4</b> matrix.<
4bf0: 62 72 3e 0d 0a 41 73 20 79 6f 75 20 63 61 6e 20 br>..As you can
4c00: 65 61 73 69 6c 79 20 6e 6f 74 69 63 65 20 74 68 easily notice th
4c10: 65 72 65 20 69 73 20 61 6e 20 6f 62 76 69 6f 75 ere is an obviou
4c20: 73 20 64 69 72 65 63 74 20 72 65 6c 61 74 69 6f s direct relatio
4c30: 6e 20 62 65 74 77 65 65 6e 20 61 20 33 44 20 6d n between a 3D m
4c40: 61 74 72 69 78 20 61 6e 64 20 61 20 32 44 20 6d atrix and a 2D m
4c50: 61 74 72 69 78 3b 20 6e 6f 74 69 63 65 20 74 68 atrix; notice th
4c60: 65 20 63 65 6c 6c 73 20 73 68 6f 77 69 6e 67 20 e cells showing
4c70: 61 20 67 72 61 79 20 62 61 63 6b 67 72 6f 75 6e a gray backgroun
4c80: 64 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 74 61 62 d.<br><br>..<tab
4c90: 6c 65 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 le>..<tr><td row
4ca0: 73 70 61 6e 3d 22 35 22 20 76 61 6c 69 67 6e 3d span="5" valign=
4cb0: 22 6d 69 64 64 6c 65 22 3e 47 65 6e 65 72 61 6c "middle">General
4cc0: 20 6c 61 79 6f 75 74 26 6e 62 73 70 3b 26 6e 62 layout &nb
4cd0: 73 70 3b 26 6e 62 73 70 3b 3c 2f 74 64 3e 0d 0a sp; </td>..
4ce0: 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c <td>/</td><td al
4cf0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e ign="center"><b>
4d00: 61 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c a</b></td><td al
4d10: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e ign="center"><b>
4d20: 62 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c b</b></td><td al
4d30: 69 67 6e 3d 22 63 65 6e 74 65 72 22 20 62 67 63 ign="center" bgc
4d40: 6f 6c 6f 72 3d 22 23 64 30 64 30 64 30 22 3e 3c olor="#d0d0d0"><
4d50: 62 3e 63 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 b>c</b></td><td
4d60: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c align="center"><
4d70: 62 3e 78 6f 66 66 3c 2f 62 3e 3c 2f 74 64 3e 3c b>xoff</b></td><
4d80: 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a td>\</td></tr>..
4d90: 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 <tr><td>|</td><t
4da0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
4db0: 3e 3c 62 3e 64 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 ><b>d</b></td><t
4dc0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
4dd0: 3e 3c 62 3e 65 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 ><b>e</b></td><t
4de0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
4df0: 20 62 67 63 6f 6c 6f 72 3d 22 23 64 30 64 30 64 bgcolor="#d0d0d
4e00: 30 22 3e 3c 62 3e 66 3c 2f 62 3e 3c 2f 74 64 3e 0"><b>f</b></td>
4e10: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
4e20: 72 22 3e 3c 62 3e 79 6f 66 66 3c 2f 62 3e 3c 2f r"><b>yoff</b></
4e30: 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 td><td>|</td></t
4e40: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 r>..<tr><td>|</t
4e50: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
4e60: 74 65 72 22 20 62 67 63 6f 6c 6f 72 3d 22 23 64 ter" bgcolor="#d
4e70: 30 64 30 64 30 22 3e 3c 62 3e 67 3c 2f 62 3e 3c 0d0d0"><b>g</b><
4e80: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
4e90: 65 6e 74 65 72 22 20 62 67 63 6f 6c 6f 72 3d 22 enter" bgcolor="
4ea0: 23 64 30 64 30 64 30 22 3e 3c 62 3e 68 3c 2f 62 #d0d0d0"><b>h</b
4eb0: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d ></td><td align=
4ec0: 22 63 65 6e 74 65 72 22 20 62 67 63 6f 6c 6f 72 "center" bgcolor
4ed0: 3d 22 23 64 30 64 30 64 30 22 3e 3c 62 3e 69 3c ="#d0d0d0"><b>i<
4ee0: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 /b></td><td alig
4ef0: 6e 3d 22 63 65 6e 74 65 72 22 20 62 67 63 6f 6c n="center" bgcol
4f00: 6f 72 3d 22 23 64 30 64 30 64 30 22 3e 3c 62 3e or="#d0d0d0"><b>
4f10: 7a 6f 66 66 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 zoff</b></td><td
4f20: 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 >|</td></tr>..<t
4f30: 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 r><td>\</td><td
4f40: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 align="center">0
4f50: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
4f60: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 center">0</td><t
4f70: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
4f80: 20 62 67 63 6f 6c 6f 72 3d 22 23 64 30 64 30 64 bgcolor="#d0d0d
4f90: 30 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 0">0</td><td ali
4fa0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 gn="center">1</t
4fb0: 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 d><td>/</td></tr
4fc0: 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 >..<tr><td colsp
4fd0: 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e an="5"><hr></td>
4fe0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 </tr>..<tr><td r
4ff0: 6f 77 73 70 61 6e 3d 22 35 22 20 76 61 6c 69 67 owspan="5" valig
5000: 6e 3d 22 6d 69 64 64 6c 65 22 3e 49 64 65 6e 74 n="middle">Ident
5010: 69 74 79 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c ity</td>..<td>/<
5020: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
5030: 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 enter">1</td><td
5040: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
5050: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 0</td><td align=
5060: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c "center">0</td><
5070: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
5080: 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 ">0</td><td>\</t
5090: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
50a0: 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e >|</td><td align
50b0: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e ="center">0</td>
50c0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
50d0: 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 r">1</td><td ali
50e0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 gn="center">0</t
50f0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
5100: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c ter">0</td><td>|
5110: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e </td></tr>..<tr>
5120: 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c <td>\</td><td al
5130: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f ign="center">0</
5140: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 td><td align="ce
5150: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 nter">0</td><td
5160: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 align="center">1
5170: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
5180: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 center">0</td><t
5190: 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c d>/</td></tr>..<
51a0: 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 tr><td>\</td><td
51b0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
51c0: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 0</td><td align=
51d0: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c "center">0</td><
51e0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
51f0: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 ">0</td><td alig
5200: 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 n="center">1</td
5210: 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e ><td>/</td></tr>
5220: 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61 ..<tr><td colspa
5230: 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c n="5"><hr></td><
5240: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f /tr>..<tr><td ro
5250: 77 73 70 61 6e 3d 22 35 22 20 76 61 6c 69 67 6e wspan="5" valign
5260: 3d 22 6d 69 64 64 6c 65 22 3e 54 72 61 6e 73 6c ="middle">Transl
5270: 61 74 65 28 3c 62 3e 74 78 3c 2f 62 3e 2c 20 3c ate(<b>tx</b>, <
5280: 62 3e 74 79 3c 2f 62 3e 2c 20 3c 62 3e 74 7a 3c b>ty</b>, <b>tz<
5290: 2f 62 3e 29 26 6e 62 73 70 3b 26 6e 62 73 70 3b /b>)
52a0: 26 6e 62 73 70 3b 3c 2f 74 64 3e 0d 0a 3c 74 64 </td>..<td
52b0: 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e >/</td><td align
52c0: 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e ="center">1</td>
52d0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
52e0: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 r">0</td><td ali
52f0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 gn="center">0</t
5300: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
5310: 74 65 72 22 3e 3c 62 3e 74 78 3c 2f 62 3e 3c 2f ter"><b>tx</b></
5320: 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 td><td>\</td></t
5330: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 r>..<tr><td>|</t
5340: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
5350: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 ter">0</td><td a
5360: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c lign="center">1<
5370: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
5380: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 enter">0</td><td
5390: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
53a0: 3c 62 3e 74 79 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 <b>ty</b></td><t
53b0: 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c d>|</td></tr>..<
53c0: 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 tr><td>|</td><td
53d0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
53e0: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 0</td><td align=
53f0: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c "center">0</td><
5400: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
5410: 22 3e 31 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 ">1</td><td alig
5420: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 74 7a n="center"><b>tz
5430: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f </b></td><td>|</
5440: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
5450: 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 d>\</td><td alig
5460: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 n="center">0</td
5470: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
5480: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c er">0</td><td al
5490: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f ign="center">0</
54a0: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 td><td align="ce
54b0: 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 3e nter">1</td><td>
54c0: 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 /</td></tr>..<tr
54d0: 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 22 35 22 ><td colspan="5"
54e0: 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d ><hr></td></tr>.
54f0: 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73 70 61 6e .<tr><td rowspan
5500: 3d 22 35 22 20 76 61 6c 69 67 6e 3d 22 6d 69 64 ="5" valign="mid
5510: 64 6c 65 22 3e 53 63 61 6c 65 28 3c 62 3e 73 78 dle">Scale(<b>sx
5520: 3c 2f 62 3e 2c 20 3c 62 3e 73 79 3c 2f 62 3e 2c </b>, <b>sy</b>,
5530: 20 3c 62 3e 73 7a 3c 2f 62 3e 29 3c 2f 74 64 3e <b>sz</b>)</td>
5540: 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 ..<td>/</td><td
5550: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c align="center"><
5560: 62 3e 73 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 b>sx</b></td><td
5570: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
5580: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 0</td><td align=
5590: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c "center">0</td><
55a0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
55b0: 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 ">0</td><td>\</t
55c0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
55d0: 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e >|</td><td align
55e0: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e ="center">0</td>
55f0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
5600: 72 22 3e 3c 62 3e 73 79 3c 2f 62 3e 3c 2f 74 64 r"><b>sy</b></td
5610: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
5620: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c er">0</td><td al
5630: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f ign="center">0</
5640: 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 td><td>|</td></t
5650: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 r>..<tr><td>|</t
5660: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
5670: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 ter">0</td><td a
5680: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c lign="center">0<
5690: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
56a0: 65 6e 74 65 72 22 3e 3c 62 3e 73 7a 3c 2f 62 3e enter"><b>sz</b>
56b0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
56c0: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 center">0</td><t
56d0: 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c d>|</td></tr>..<
56e0: 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 tr><td>\</td><td
56f0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
5700: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 0</td><td align=
5710: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c "center">0</td><
5720: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
5730: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 ">0</td><td alig
5740: 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 n="center">1</td
5750: 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e ><td>/</td></tr>
5760: 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61 ..<tr><td colspa
5770: 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c n="5"><hr></td><
5780: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f /tr>..<tr><td ro
5790: 77 73 70 61 6e 3d 22 35 22 20 76 61 6c 69 67 6e wspan="5" valign
57a0: 3d 22 6d 69 64 64 6c 65 22 3e 58 20 52 6f 6c 6c ="middle">X Roll
57b0: 28 3c 62 3e 26 74 68 65 74 61 3b 3c 2f 62 3e 29 (<b>θ</b>)
57c0: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 </td>..<td>/</td
57d0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
57e0: 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 20 61 6c er">1</td><td al
57f0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f ign="center">0</
5800: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 td><td align="ce
5810: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 nter">0</td><td
5820: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 align="center">0
5830: 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c </td><td>\</td><
5840: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c /tr>..<tr><td>|<
5850: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
5860: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 enter">0</td><td
5870: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
5880: 3c 62 3e 63 6f 73 28 26 74 68 65 74 61 3b 29 3c <b>cos(θ)<
5890: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 /b></td><td alig
58a0: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 2d 73 n="center"><b>-s
58b0: 69 6e 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c in(θ)</b><
58c0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
58d0: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 enter">0</td><td
58e0: 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 >|</td></tr>..<t
58f0: 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 r><td>|</td><td
5900: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 align="center">0
5910: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
5920: 63 65 6e 74 65 72 22 3e 3c 62 3e 73 69 6e 28 26 center"><b>sin(&
5930: 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e theta;)</b></td>
5940: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
5950: 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68 65 74 61 r"><b>cos(&theta
5960: 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 ;)</b></td><td a
5970: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c lign="center">0<
5980: 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f /td><td>|</td></
5990: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f tr>..<tr><td>\</
59a0: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 td><td align="ce
59b0: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 nter">0</td><td
59c0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 align="center">0
59d0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
59e0: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 center">0</td><t
59f0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
5a00: 3e 31 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 >1</td><td>/</td
5a10: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 ></tr>..<tr><td
5a20: 63 6f 6c 73 70 61 6e 3d 22 35 22 3e 3c 68 72 3e colspan="5"><hr>
5a30: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e </td></tr>..<tr>
5a40: 3c 74 64 20 72 6f 77 73 70 61 6e 3d 22 35 22 20 <td rowspan="5"
5a50: 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e valign="middle">
5a60: 59 20 52 6f 6c 6c 28 3c 62 3e 26 74 68 65 74 61 Y Roll(<b>&theta
5a70: 3b 3c 2f 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 ;</b>)</td>..<td
5a80: 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e >/</td><td align
5a90: 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 63 6f 73 ="center"><b>cos
5aa0: 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 (θ)</b></t
5ab0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
5ac0: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 ter">0</td><td a
5ad0: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 lign="center"><b
5ae0: 3e 73 69 6e 28 26 74 68 65 74 61 3b 29 3c 2f 62 >sin(θ)</b
5af0: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d ></td><td align=
5b00: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c "center">0</td><
5b10: 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a td>\</td></tr>..
5b20: 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 <tr><td>|</td><t
5b30: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
5b40: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e >0</td><td align
5b50: 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e ="center">1</td>
5b60: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
5b70: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 r">0</td><td ali
5b80: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 gn="center">0</t
5b90: 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 d><td>|</td></tr
5ba0: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 >..<tr><td>|</td
5bb0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
5bc0: 65 72 22 3e 3c 62 3e 2d 73 69 6e 28 26 74 68 65 er"><b>-sin(&the
5bd0: 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 ta;)</b></td><td
5be0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
5bf0: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 0</td><td align=
5c00: 22 63 65 6e 74 65 72 22 3e 3c 62 3e 63 6f 73 28 "center"><b>cos(
5c10: 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 θ)</b></td
5c20: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
5c30: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c er">0</td><td>|<
5c40: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c /td></tr>..<tr><
5c50: 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 td>\</td><td ali
5c60: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 gn="center">0</t
5c70: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
5c80: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 ter">0</td><td a
5c90: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c lign="center">0<
5ca0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
5cb0: 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 enter">1</td><td
5cc0: 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 >/</td></tr>..<t
5cd0: 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 22 35 r><td colspan="5
5ce0: 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74 72 3e "><hr></td></tr>
5cf0: 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73 70 61 ..<tr><td rowspa
5d00: 6e 3d 22 35 22 20 76 61 6c 69 67 6e 3d 22 6d 69 n="5" valign="mi
5d10: 64 64 6c 65 22 3e 5a 20 52 6f 6c 6c 28 3c 62 3e ddle">Z Roll(<b>
5d20: 26 74 68 65 74 61 3b 3c 2f 62 3e 29 3c 2f 74 64 θ</b>)</td
5d30: 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 >..<td>/</td><td
5d40: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
5d50: 3c 62 3e 63 6f 73 28 26 74 68 65 74 61 3b 29 3c <b>cos(θ)<
5d60: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 /b></td><td alig
5d70: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 2d 73 n="center"><b>-s
5d80: 69 6e 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c in(θ)</b><
5d90: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
5da0: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 enter">0</td><td
5db0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
5dc0: 30 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 0</td><td>\</td>
5dd0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c </tr>..<tr><td>|
5de0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
5df0: 63 65 6e 74 65 72 22 3e 3c 62 3e 73 69 6e 28 26 center"><b>sin(&
5e00: 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e theta;)</b></td>
5e10: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
5e20: 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68 65 74 61 r"><b>cos(&theta
5e30: 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 ;)</b></td><td a
5e40: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c lign="center">0<
5e50: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
5e60: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 enter">0</td><td
5e70: 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 >|</td></tr>..<t
5e80: 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 r><td>|</td><td
5e90: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 align="center">0
5ea0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
5eb0: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 center">0</td><t
5ec0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
5ed0: 3e 31 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e >1</td><td align
5ee0: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e ="center">0</td>
5ef0: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d <td>|</td></tr>.
5f00: 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c .<tr><td>\</td><
5f10: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
5f20: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 ">0</td><td alig
5f30: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 n="center">0</td
5f40: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
5f50: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c er">0</td><td al
5f60: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f ign="center">1</
5f70: 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 td><td>/</td></t
5f80: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 2f 74 64 r>..<tr><td></td
5f90: 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e ></tr>..</table>
5fa0: 0d 0a 3c 62 72 3e 3c 68 72 3e 0d 0a 3c 68 33 3e ..<br><hr>..<h3>
5fb0: 61 70 70 6c 79 69 6e 67 20 61 6e 20 41 66 66 69 applying an Affi
5fc0: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f ne Transformatio
5fd0: 6e 3c 2f 68 33 3e 0d 0a 49 6e 20 6f 72 64 65 72 n</h3>..In order
5fe0: 20 74 6f 20 6d 61 74 65 72 69 61 6c 69 7a 65 20 to materialize
5ff0: 61 6e 20 61 66 66 69 6e 65 20 74 72 61 6e 73 66 an affine transf
6000: 6f 72 6d 61 74 69 6f 6e 20 77 65 20 73 69 6d 70 ormation we simp
6010: 6c 79 20 68 61 76 65 20 74 6f 20 63 6f 6d 70 75 ly have to compu
6020: 74 65 20 20 3c 62 3e 28 78 27 2c 20 79 27 2c 20 te <b>(x', y',
6030: 7a 27 29 3c 2f 62 3e 20 63 6f 6f 72 64 69 6e 61 z')</b> coordina
6040: 74 65 73 20 73 74 61 72 74 69 6e 67 20 66 72 6f tes starting fro
6050: 6d 20 3c 62 3e 28 78 2c 20 79 2c 20 7a 29 3c 2f m <b>(x, y, z)</
6060: 62 3e 20 66 6f 72 20 65 76 65 72 79 20 70 6f 69 b> for every poi
6070: 6e 74 20 6f 72 20 76 65 72 74 65 78 20 66 6f 75 nt or vertex fou
6080: 6e 64 20 69 6e 20 74 68 65 20 69 6e 70 75 74 20 nd in the input
6090: 47 65 6f 6d 65 74 72 79 20 61 63 63 6f 72 64 69 Geometry accordi
60a0: 6e 67 6c 79 20 74 6f 20 74 68 65 20 66 6f 6c 6c ngly to the foll
60b0: 6f 77 69 6e 67 20 66 6f 72 6d 75 6c 61 65 3a 0d owing formulae:.
60c0: 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 78 27 .<ul>..<li><b>x'
60d0: 20 3d 20 61 2a 78 20 2b 20 62 2a 79 20 2b 20 63 = a*x + b*y + c
60e0: 2a 7a 20 2b 20 78 6f 66 66 3c 2f 62 3e 3c 2f 6c *z + xoff</b></l
60f0: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 79 27 20 3d 20 i>..<li><b>y' =
6100: 64 2a 78 20 2b 20 65 2a 79 20 2b 20 66 2a 7a 20 d*x + e*y + f*z
6110: 2b 20 79 6f 66 66 3c 2f 62 3e 3c 2f 6c 69 3e 0d + yoff</b></li>.
6120: 0a 3c 6c 69 3e 3c 62 3e 7a 27 20 3d 20 67 2a 78 .<li><b>z' = g*x
6130: 20 2b 20 68 2a 79 20 2b 20 69 2a 7a 20 2b 20 7a + h*y + i*z + z
6140: 6f 66 66 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f off</b></li>..</
6150: 75 6c 3e 3c 62 72 3e 0d 0a 69 6e 20 74 68 65 20 ul><br>..in the
6160: 73 69 6d 70 6c 65 72 20 3c 62 3e 32 44 3c 2f 62 simpler <b>2D</b
6170: 3e 20 63 61 73 65 20 74 68 69 73 20 77 69 6c 6c > case this will
6180: 20 61 73 73 75 6d 65 20 74 68 65 20 72 65 64 75 assume the redu
6190: 63 65 64 20 66 6f 72 6d 3a 0d 0a 3c 75 6c 3e 0d ced form:..<ul>.
61a0: 0a 3c 6c 69 3e 3c 62 3e 78 27 20 3d 20 61 2a 78 .<li><b>x' = a*x
61b0: 20 2b 20 62 2a 79 20 2b 20 78 6f 66 66 3c 2f 62 + b*y + xoff</b
61c0: 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 79 ></li>..<li><b>y
61d0: 27 20 3d 20 64 2a 78 20 2b 20 65 2a 79 20 2b 20 ' = d*x + e*y +
61e0: 79 6f 66 66 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c yoff</b></li>..<
61f0: 2f 75 6c 3e 3c 62 72 3e 0d 0a 41 73 20 79 6f 75 /ul><br>..As you
6200: 20 63 61 6e 20 6e 6f 74 69 63 65 2c 20 61 70 70 can notice, app
6210: 6c 79 69 6e 67 20 61 6e 20 41 66 66 69 6e 65 20 lying an Affine
6220: 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 64 Transformation d
6230: 6f 65 73 20 6e 6f 74 20 72 65 71 75 69 72 65 73 oes not requires
6240: 20 63 6f 6d 70 75 74 69 6e 67 20 61 6e 79 20 74 computing any t
6250: 72 69 67 6f 6e 6f 6d 65 74 72 69 63 20 66 75 6e rigonometric fun
6260: 63 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 54 72 69 67 ction.<br>..Trig
6270: 6f 6e 6f 6d 65 74 72 69 63 20 66 75 6e 63 74 69 onometric functi
6280: 6f 6e 73 20 61 72 65 20 76 65 72 79 20 63 6f 73 ons are very cos
6290: 74 6c 79 20 69 6e 20 63 6f 6d 70 75 74 61 74 69 tly in computati
62a0: 6f 6e 61 6c 20 74 65 72 6d 73 2c 20 73 6f 20 61 onal terms, so a
62b0: 70 70 6c 79 69 6e 67 20 61 6e 20 41 66 66 69 6e pplying an Affin
62c0: 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e e Transformation
62d0: 20 69 73 20 61 6e 20 69 6e 74 72 69 6e 73 69 63 is an intrinsic
62e0: 61 6c 6c 79 20 65 66 66 69 63 69 65 6e 74 20 6d ally efficient m
62f0: 65 63 68 61 6e 69 73 6d 20 62 65 63 61 75 73 65 echanism because
6300: 20 73 69 6d 70 6c 79 20 64 65 70 65 6e 64 73 20 simply depends
6310: 6f 6e 20 6d 75 6c 74 69 70 6c 69 63 61 74 69 6f on multiplicatio
6320: 6e 73 20 61 6e 64 20 61 64 64 69 74 69 6f 6e 73 ns and additions
6330: 2e 3c 62 72 3e 0d 0a 3c 62 72 3e 3c 68 72 3e 0d .<br>..<br><hr>.
6340: 0a 3c 68 33 3e 63 68 61 69 6e 69 6e 67 20 74 77 .<h3>chaining tw
6350: 6f 20 28 6f 72 20 65 76 65 6e 20 6d 6f 72 65 29 o (or even more)
6360: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 Affine Transfor
6370: 6d 61 74 69 6f 6e 73 20 69 6e 20 61 20 73 69 6e mations in a sin
6380: 67 6c 65 20 6f 70 65 72 61 74 69 6f 6e 3c 2f 68 gle operation</h
6390: 33 3e 0d 0a 41 66 66 69 6e 65 20 74 72 61 6e 73 3>..Affine trans
63a0: 66 6f 72 6d 61 74 69 6f 6e 20 6d 61 74 72 69 63 formation matric
63b0: 65 73 20 68 61 76 65 20 61 6e 6f 74 68 65 72 20 es have another
63c0: 61 73 74 6f 6e 69 73 68 69 6e 67 20 70 72 6f 70 astonishing prop
63d0: 65 72 74 79 2e 3c 62 72 3e 0d 0a 57 65 20 63 61 erty.<br>..We ca
63e0: 6e 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a n <a href="http:
63f0: 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f //en.wikipedia.o
6400: 72 67 2f 77 69 6b 69 2f 4d 61 74 72 69 78 5f 6d rg/wiki/Matrix_m
6410: 75 6c 74 69 70 6c 69 63 61 74 69 6f 6e 22 3e 6d ultiplication">m
6420: 75 6c 74 69 70 6c 79 3c 2f 61 3e 20 74 77 6f 20 ultiply</a> two
6430: 64 69 66 66 65 72 65 6e 74 20 61 66 66 69 6e 65 different affine
6440: 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 transformation
6450: 6d 61 74 72 69 63 65 73 20 74 68 75 73 20 6f 62 matrices thus ob
6460: 74 61 69 6e 69 6e 67 20 61 20 74 68 69 72 64 20 taining a third
6470: 6d 61 74 72 69 78 2c 20 61 6e 64 20 74 68 69 73 matrix, and this
6480: 20 6c 61 74 65 73 74 20 6f 6e 63 65 20 61 70 70 latest once app
6490: 6c 69 65 64 20 77 69 6c 6c 20 63 6f 6e 74 61 69 lied will contai
64a0: 6e 20 62 6f 74 68 20 74 72 61 6e 73 66 6f 72 6d n both transform
64b0: 61 74 69 6f 6e 73 20 61 6e 64 20 69 6e 20 74 68 ations and in th
64c0: 65 20 72 69 67 68 74 20 73 65 71 75 65 6e 63 65 e right sequence
64d0: 2e 3c 62 72 3e 0d 0a 54 68 65 72 65 20 69 73 20 .<br>..There is
64e0: 6e 6f 20 6c 69 6d 69 74 3b 20 77 65 20 63 61 6e no limit; we can
64f0: 20 69 6e 66 69 6e 69 74 69 76 65 6c 79 20 63 68 infinitively ch
6500: 61 69 6e 20 61 73 20 6d 61 6e 79 20 74 72 61 6e ain as many tran
6510: 73 66 6f 72 6d 61 74 69 6f 6e 73 20 61 73 20 72 sformations as r
6520: 65 71 75 69 72 65 64 2c 20 77 65 27 6c 6c 20 73 equired, we'll s
6530: 69 6d 70 6c 79 20 68 61 76 65 20 74 6f 20 63 6f imply have to co
6540: 6e 74 69 6e 75 65 20 6d 75 6c 74 69 70 6c 79 69 ntinue multiplyi
6550: 6e 67 20 61 6c 6c 20 6d 61 74 72 69 63 65 73 20 ng all matrices
6560: 6f 6e 65 20 61 66 74 65 72 20 74 68 65 20 6f 74 one after the ot
6570: 68 65 72 20 63 61 72 65 66 75 6c 6c 79 20 72 65 her carefully re
6580: 73 70 65 63 74 69 6e 67 20 74 68 65 20 61 70 70 specting the app
6590: 72 6f 70 72 69 61 74 65 20 73 65 71 75 65 6e 63 ropriate sequenc
65a0: 65 2e 3c 62 72 3e 0d 0a 41 74 20 74 68 65 20 65 e.<br>..At the e
65b0: 6e 64 20 6f 66 20 74 68 65 20 70 72 6f 63 65 73 nd of the proces
65c0: 73 20 77 65 27 6c 6c 20 61 6c 77 61 79 73 20 67 s we'll always g
65d0: 65 74 20 6a 75 73 74 20 61 20 73 69 6e 67 6c 65 et just a single
65e0: 20 61 66 66 69 6e 65 20 74 72 61 6e 73 66 6f 72 affine transfor
65f0: 6d 61 74 69 6f 6e 20 6d 61 74 72 69 78 20 66 61 mation matrix fa
6600: 69 74 68 66 75 6c 6c 79 20 72 65 70 72 65 73 65 ithfully represe
6610: 6e 74 69 6e 67 20 61 6e 79 20 69 6e 64 69 76 69 nting any indivi
6620: 64 75 61 6c 20 74 72 61 6e 73 66 6f 72 6d 61 74 dual transformat
6630: 69 6f 6e 20 69 6e 20 74 68 65 20 63 68 61 69 6e ion in the chain
6640: 2e 0d 0a 3c 74 61 62 6c 65 20 62 67 63 6f 6c 6f ...<table bgcolo
6650: 72 3d 22 23 66 66 63 30 30 30 22 20 63 65 6c 6c r="#ffc000" cell
6660: 70 61 64 64 69 6e 67 3d 22 31 30 22 3e 3c 74 72 padding="10"><tr
6670: 3e 3c 74 64 3e 0d 0a 54 68 65 20 6d 75 6c 74 69 ><td>..The multi
6680: 70 6c 69 63 61 74 69 6f 6e 20 62 65 74 77 65 65 plication betwee
6690: 6e 20 74 77 6f 20 6d 61 74 72 69 63 65 73 20 3c n two matrices <
66a0: 75 3e 69 73 20 6e 6f 74 20 61 20 63 6f 6d 6d 75 u>is not a commu
66b0: 74 61 74 69 76 65 20 6f 70 65 72 61 74 69 6f 6e tative operation
66c0: 3c 2f 75 3e 3a 20 74 68 65 20 72 65 6c 61 74 69 </u>: the relati
66d0: 76 65 20 6f 72 64 65 72 20 6f 66 20 6f 70 65 72 ve order of oper
66e0: 61 6e 64 73 20 69 73 20 61 62 73 6f 6c 75 74 65 ands is absolute
66f0: 6c 79 20 72 65 6c 65 76 61 6e 74 2e 3c 2f 74 64 ly relevant.</td
6700: 3e 3c 2f 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a ></tr></table>..
6710: 3c 68 33 3e 6d 75 6c 74 69 70 6c 79 69 6e 67 20 <h3>multiplying
6720: 74 77 6f 20 6d 61 74 72 69 63 65 73 3c 2f 68 33 two matrices</h3
6730: 3e 0d 0a 4d 75 6c 74 69 70 6c 69 63 61 74 69 6f >..Multiplicatio
6740: 6e 20 69 73 20 6e 6f 74 20 72 65 61 6c 6c 79 20 n is not really
6750: 61 20 73 69 6d 70 6c 65 20 6f 70 65 72 61 74 69 a simple operati
6760: 6f 6e 20 77 68 65 6e 20 6d 61 74 72 69 63 65 73 on when matrices
6770: 20 61 72 65 20 69 6e 76 6f 6c 76 65 64 20 61 6e are involved an
6780: 64 20 72 65 71 75 69 72 65 73 20 61 20 72 61 74 d requires a rat
6790: 68 65 72 20 63 6f 6d 70 6c 65 78 20 70 72 6f 63 her complex proc
67a0: 65 64 75 72 65 3b 20 74 68 65 20 66 6f 6c 6c 6f edure; the follo
67b0: 77 69 6e 67 20 65 78 61 6d 70 6c 65 20 73 68 6f wing example sho
67c0: 77 73 20 68 6f 77 20 74 6f 20 6d 75 6c 74 69 70 ws how to multip
67d0: 6c 79 20 74 77 6f 20 3c 62 3e 34 20 78 20 34 3c ly two <b>4 x 4<
67e0: 2f 62 3e 20 6d 61 74 72 69 63 65 73 2e 3c 62 72 /b> matrices.<br
67f0: 3e 0d 0a 3c 74 61 62 6c 65 20 63 65 6c 6c 73 70 >..<table cellsp
6800: 61 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 acing="4" cellpa
6810: 64 64 69 6e 67 3d 22 34 22 3e 0d 0a 3c 74 72 3e dding="4">..<tr>
6820: 3c 74 64 3e 0d 0a 3c 74 61 62 6c 65 3e 0d 0a 3c <td>..<table>..<
6830: 74 72 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 tr><td>/</td><td
6840: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
6850: 61 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e 3c 2f a<sub>11</sub></
6860: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 td><td align="ce
6870: 6e 74 65 72 22 3e 61 3c 73 75 62 3e 31 32 3c 2f nter">a<sub>12</
6880: 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 sub></td><td ali
6890: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73 75 gn="center">a<su
68a0: 62 3e 31 33 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c b>13</sub></td><
68b0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
68c0: 22 3e 61 3c 73 75 62 3e 31 34 3c 2f 73 75 62 3e ">a<sub>14</sub>
68d0: 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c </td><td>\</td><
68e0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c /tr>..<tr><td>|<
68f0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
6900: 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e 32 31 3c enter">a<sub>21<
6910: 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c /sub></td><td al
6920: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73 ign="center">a<s
6930: 75 62 3e 32 32 3c 2f 73 75 62 3e 3c 2f 74 64 3e ub>22</sub></td>
6940: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
6950: 72 22 3e 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 r">a<sub>23</sub
6960: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d ></td><td align=
6970: 22 63 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e 32 "center">a<sub>2
6980: 34 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 3e 4</sub></td><td>
6990: 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 |</td></tr>..<tr
69a0: 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 ><td>|</td><td a
69b0: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c lign="center">a<
69c0: 73 75 62 3e 33 31 3c 2f 73 75 62 3e 3c 2f 74 64 sub>31</sub></td
69d0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
69e0: 65 72 22 3e 61 3c 73 75 62 3e 33 32 3c 2f 73 75 er">a<sub>32</su
69f0: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e b></td><td align
6a00: 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e ="center">a<sub>
6a10: 33 33 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 33</sub></td><td
6a20: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
6a30: 61 3c 73 75 62 3e 33 34 3c 2f 73 75 62 3e 3c 2f a<sub>34</sub></
6a40: 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 td><td>|</td></t
6a50: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 r>..<tr><td>\</t
6a60: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e d><td align="cen
6a70: 74 65 72 22 3e 61 3c 73 75 62 3e 34 31 3c 2f 73 ter">a<sub>41</s
6a80: 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 ub></td><td alig
6a90: 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73 75 62 n="center">a<sub
6aa0: 3e 34 32 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 >42</sub></td><t
6ab0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
6ac0: 3e 61 3c 73 75 62 3e 34 33 3c 2f 73 75 62 3e 3c >a<sub>43</sub><
6ad0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
6ae0: 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e 34 34 3c enter">a<sub>44<
6af0: 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 3e 2f 3c /sub></td><td>/<
6b00: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 /td></tr>..</tab
6b10: 6c 65 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 20 76 61 le>..</td><td va
6b20: 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 2a 3c lign="middle">*<
6b30: 2f 74 64 3e 0d 0a 3c 74 64 3e 0d 0a 3c 74 61 62 /td>..<td>..<tab
6b40: 6c 65 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 2f 3c 2f le>..<tr><td>/</
6b50: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 td><td align="ce
6b60: 6e 74 65 72 22 3e 62 3c 73 75 62 3e 31 31 3c 2f nter">b<sub>11</
6b70: 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 sub></td><td ali
6b80: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 gn="center">b<su
6b90: 62 3e 31 32 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c b>12</sub></td><
6ba0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 td align="center
6bb0: 22 3e 62 3c 73 75 62 3e 31 33 3c 2f 73 75 62 3e ">b<sub>13</sub>
6bc0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 </td><td align="
6bd0: 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 31 34 center">b<sub>14
6be0: 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 3e 5c </sub></td><td>\
6bf0: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e </td></tr>..<tr>
6c00: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c <td>|</td><td al
6c10: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 ign="center">b<s
6c20: 75 62 3e 32 31 3c 2f 73 75 62 3e 3c 2f 74 64 3e ub>21</sub></td>
6c30: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
6c40: 72 22 3e 62 3c 73 75 62 3e 32 32 3c 2f 73 75 62 r">b<sub>22</sub
6c50: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d ></td><td align=
6c60: 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 32 "center">b<sub>2
6c70: 33 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 3</sub></td><td
6c80: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 align="center">b
6c90: 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e 3c 2f 74 <sub>24</sub></t
6ca0: 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 d><td>|</td></tr
6cb0: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 >..<tr><td>|</td
6cc0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
6cd0: 65 72 22 3e 62 3c 73 75 62 3e 33 31 3c 2f 73 75 er">b<sub>31</su
6ce0: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e b></td><td align
6cf0: 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e ="center">b<sub>
6d00: 33 32 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 32</sub></td><td
6d10: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e align="center">
6d20: 62 3c 73 75 62 3e 33 33 3c 2f 73 75 62 3e 3c 2f b<sub>33</sub></
6d30: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 td><td align="ce
6d40: 6e 74 65 72 22 3e 62 3c 73 75 62 3e 33 34 3c 2f nter">b<sub>34</
6d50: 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f sub></td><td>|</
6d60: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
6d70: 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 d>\</td><td alig
6d80: 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 n="center">b<sub
6d90: 3e 34 31 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 >41</sub></td><t
6da0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 d align="center"
6db0: 3e 62 3c 73 75 62 3e 34 32 3c 2f 73 75 62 3e 3c >b<sub>42</sub><
6dc0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 /td><td align="c
6dd0: 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 34 33 3c enter">b<sub>43<
6de0: 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c /sub></td><td al
6df0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 ign="center">b<s
6e00: 75 62 3e 34 34 3c 2f 73 75 62 3e 3c 2f 74 64 3e ub>44</sub></td>
6e10: 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d <td>/</td></tr>.
6e20: 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 2f 74 64 3e .</table>..</td>
6e30: 0d 0a 3c 2f 74 64 3e 3c 74 64 20 76 61 6c 69 67 ..</td><td valig
6e40: 6e 3d 22 6d 69 64 64 6c 65 22 3e 3d 3c 2f 74 64 n="middle">=</td
6e50: 3e 0d 0a 3c 74 64 3e 0d 0a 3c 74 61 62 6c 65 3e >..<td>..<table>
6e60: 0d 0a 3c 74 72 3e 3c 74 64 3e 2f 3c 2f 74 64 3e ..<tr><td>/</td>
6e70: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 <td align="cente
6e80: 72 22 3e 0d 0a 28 61 3c 73 75 62 3e 31 31 3c 2f r">..(a<sub>11</
6e90: 73 75 62 3e 2a 62 3c 73 75 62 3e 31 31 3c 2f 73 sub>*b<sub>11</s
6ea0: 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 32 ub> + ..a<sub>12
6eb0: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 31 3c </sub>*b<sub>21<
6ec0: 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e /sub> + ..a<sub>
6ed0: 31 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 13</sub>*b<sub>3
6ee0: 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 1</sub> + ..a<su
6ef0: 62 3e 31 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 b>14</sub>*b<sub
6f00: 3e 34 31 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d >41</sub>)</td>.
6f10: 0a 3c 74 64 3e 28 61 3c 73 75 62 3e 31 31 3c 2f .<td>(a<sub>11</
6f20: 73 75 62 3e 2a 62 3c 73 75 62 3e 31 32 3c 2f 73 sub>*b<sub>12</s
6f30: 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 32 ub> + ..a<sub>12
6f40: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 32 3c </sub>*b<sub>22<
6f50: 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e /sub> + ..a<sub>
6f60: 31 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 13</sub>*b<sub>3
6f70: 32 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 2</sub> +..a<sub
6f80: 3e 31 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e >14</sub>*b<sub>
6f90: 34 32 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 42</sub>)</td>..
6fa0: 3c 74 64 3e 28 61 3c 73 75 62 3e 31 31 3c 2f 73 <td>(a<sub>11</s
6fb0: 75 62 3e 2a 62 3c 73 75 62 3e 31 33 3c 2f 73 75 ub>*b<sub>13</su
6fc0: 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 32 3c b> + ..a<sub>12<
6fd0: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 33 3c 2f /sub>*b<sub>23</
6fe0: 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 sub> + ..a<sub>1
6ff0: 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 33 3</sub>*b<sub>33
7000: 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e </sub> +..a<sub>
7010: 31 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 14</sub>*b<sub>4
7020: 33 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 3</sub>)</td>..<
7030: 74 64 3e 28 61 3c 73 75 62 3e 31 31 3c 2f 73 75 td>(a<sub>11</su
7040: 62 3e 2a 62 3c 73 75 62 3e 31 34 3c 2f 73 75 62 b>*b<sub>14</sub
7050: 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 32 3c 2f > + ..a<sub>12</
7060: 73 75 62 3e 2a 62 3c 73 75 62 3e 32 34 3c 2f 73 sub>*b<sub>24</s
7070: 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 33 ub> + ..a<sub>13
7080: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 34 3c </sub>*b<sub>34<
7090: 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 31 /sub> +..a<sub>1
70a0: 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 34 4</sub>*b<sub>44
70b0: 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 3c 74 64 3e </sub>)</td><td>
70c0: 5c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 \</td></tr>..<tr
70d0: 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 ><td>|</td><td a
70e0: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0d 0a lign="center">..
70f0: 28 61 3c 73 75 62 3e 32 31 3c 2f 73 75 62 3e 2a (a<sub>21</sub>*
7100: 62 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e 20 2b b<sub>11</sub> +
7110: 20 0d 0a 61 3c 73 75 62 3e 32 32 3c 2f 73 75 62 ..a<sub>22</sub
7120: 3e 2a 62 3c 73 75 62 3e 32 31 3c 2f 73 75 62 3e >*b<sub>21</sub>
7130: 20 2b 20 0d 0a 61 3c 73 75 62 3e 32 33 3c 2f 73 + ..a<sub>23</s
7140: 75 62 3e 2a 62 3c 73 75 62 3e 33 31 3c 2f 73 75 ub>*b<sub>31</su
7150: 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 32 34 3c b> + ..a<sub>24<
7160: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 31 3c 2f /sub>*b<sub>41</
7170: 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e sub>)</td>..<td>
7180: 28 61 3c 73 75 62 3e 32 31 3c 2f 73 75 62 3e 2a (a<sub>21</sub>*
7190: 62 3c 73 75 62 3e 31 32 3c 2f 73 75 62 3e 20 2b b<sub>12</sub> +
71a0: 20 0d 0a 61 3c 73 75 62 3e 32 32 3c 2f 73 75 62 ..a<sub>22</sub
71b0: 3e 2a 62 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e >*b<sub>22</sub>
71c0: 20 2b 20 0d 0a 61 3c 73 75 62 3e 32 33 3c 2f 73 + ..a<sub>23</s
71d0: 75 62 3e 2a 62 3c 73 75 62 3e 33 32 3c 2f 73 75 ub>*b<sub>32</su
71e0: 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 32 34 3c 2f b> +..a<sub>24</
71f0: 73 75 62 3e 2a 62 3c 73 75 62 3e 34 32 3c 2f 73 sub>*b<sub>42</s
7200: 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 28 ub>)</td>..<td>(
7210: 61 3c 73 75 62 3e 32 31 3c 2f 73 75 62 3e 2a 62 a<sub>21</sub>*b
7220: 3c 73 75 62 3e 31 33 3c 2f 73 75 62 3e 20 2b 20 <sub>13</sub> +
7230: 0d 0a 61 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e ..a<sub>22</sub>
7240: 2a 62 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e 20 *b<sub>23</sub>
7250: 2b 20 0d 0a 61 3c 73 75 62 3e 32 33 3c 2f 73 75 + ..a<sub>23</su
7260: 62 3e 2a 62 3c 73 75 62 3e 33 33 3c 2f 73 75 62 b>*b<sub>33</sub
7270: 3e 20 2b 0d 0a 61 3c 73 75 62 3e 32 34 3c 2f 73 > +..a<sub>24</s
7280: 75 62 3e 2a 62 3c 73 75 62 3e 34 33 3c 2f 73 75 ub>*b<sub>43</su
7290: 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 28 61 b>)</td>..<td>(a
72a0: 3c 73 75 62 3e 32 31 3c 2f 73 75 62 3e 2a 62 3c <sub>21</sub>*b<
72b0: 73 75 62 3e 31 34 3c 2f 73 75 62 3e 20 2b 20 0d sub>14</sub> + .
72c0: 0a 61 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e 2a .a<sub>22</sub>*
72d0: 62 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e 20 2b b<sub>24</sub> +
72e0: 20 0d 0a 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 ..a<sub>23</sub
72f0: 3e 2a 62 3c 73 75 62 3e 33 34 3c 2f 73 75 62 3e >*b<sub>34</sub>
7300: 20 2b 0d 0a 61 3c 73 75 62 3e 32 34 3c 2f 73 75 +..a<sub>24</su
7310: 62 3e 2a 62 3c 73 75 62 3e 34 34 3c 2f 73 75 62 b>*b<sub>44</sub
7320: 3e 29 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 >)</td><td>|</td
7330: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e ></tr>..<tr><td>
7340: 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d |</td><td align=
7350: 22 63 65 6e 74 65 72 22 3e 0d 0a 28 61 3c 73 75 "center">..(a<su
7360: 62 3e 33 31 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 b>31</sub>*b<sub
7370: 3e 31 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c >11</sub> + ..a<
7380: 73 75 62 3e 33 32 3c 2f 73 75 62 3e 2a 62 3c 73 sub>32</sub>*b<s
7390: 75 62 3e 32 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a ub>21</sub> + ..
73a0: 61 3c 73 75 62 3e 33 33 3c 2f 73 75 62 3e 2a 62 a<sub>33</sub>*b
73b0: 3c 73 75 62 3e 33 31 3c 2f 73 75 62 3e 20 2b 20 <sub>31</sub> +
73c0: 0d 0a 61 3c 73 75 62 3e 33 34 3c 2f 73 75 62 3e ..a<sub>34</sub>
73d0: 2a 62 3c 73 75 62 3e 34 31 3c 2f 73 75 62 3e 29 *b<sub>41</sub>)
73e0: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 28 61 3c 73 75 </td>..<td>(a<su
73f0: 62 3e 33 31 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 b>31</sub>*b<sub
7400: 3e 31 32 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c >12</sub> + ..a<
7410: 73 75 62 3e 33 32 3c 2f 73 75 62 3e 2a 62 3c 73 sub>32</sub>*b<s
7420: 75 62 3e 32 32 3c 2f 73 75 62 3e 20 2b 20 0d 0a ub>22</sub> + ..
7430: 61 3c 73 75 62 3e 33 33 3c 2f 73 75 62 3e 2a 62 a<sub>33</sub>*b
7440: 3c 73 75 62 3e 33 32 3c 2f 73 75 62 3e 20 2b 0d <sub>32</sub> +.
7450: 0a 61 3c 73 75 62 3e 33 34 3c 2f 73 75 62 3e 2a .a<sub>34</sub>*
7460: 62 3c 73 75 62 3e 34 32 3c 2f 73 75 62 3e 29 3c b<sub>42</sub>)<
7470: 2f 74 64 3e 0d 0a 3c 74 64 3e 28 61 3c 73 75 62 /td>..<td>(a<sub
7480: 3e 33 31 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e >31</sub>*b<sub>
7490: 31 33 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 13</sub> + ..a<s
74a0: 75 62 3e 33 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 ub>32</sub>*b<su
74b0: 62 3e 32 33 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 b>23</sub> + ..a
74c0: 3c 73 75 62 3e 33 33 3c 2f 73 75 62 3e 2a 62 3c <sub>33</sub>*b<
74d0: 73 75 62 3e 33 33 3c 2f 73 75 62 3e 20 2b 0d 0a sub>33</sub> +..
74e0: 61 3c 73 75 62 3e 33 34 3c 2f 73 75 62 3e 2a 62 a<sub>34</sub>*b
74f0: 3c 73 75 62 3e 34 33 3c 2f 73 75 62 3e 29 3c 2f <sub>43</sub>)</
7500: 74 64 3e 0d 0a 3c 74 64 3e 28 61 3c 73 75 62 3e td>..<td>(a<sub>
7510: 33 31 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 31</sub>*b<sub>1
7520: 34 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 4</sub> + ..a<su
7530: 62 3e 33 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 b>32</sub>*b<sub
7540: 3e 32 34 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c >24</sub> + ..a<
7550: 73 75 62 3e 33 33 3c 2f 73 75 62 3e 2a 62 3c 73 sub>33</sub>*b<s
7560: 75 62 3e 33 34 3c 2f 73 75 62 3e 20 2b 0d 0a 61 ub>34</sub> +..a
7570: 3c 73 75 62 3e 33 34 3c 2f 73 75 62 3e 2a 62 3c <sub>34</sub>*b<
7580: 73 75 62 3e 34 34 3c 2f 73 75 62 3e 29 3c 2f 74 sub>44</sub>)</t
7590: 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 d><td>|</td></tr
75a0: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 >..<tr><td>\</td
75b0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 ><td align="cent
75c0: 65 72 22 3e 0d 0a 28 61 3c 73 75 62 3e 34 31 3c er">..(a<sub>41<
75d0: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 31 3c 2f /sub>*b<sub>11</
75e0: 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 sub> + ..a<sub>4
75f0: 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 31 2</sub>*b<sub>21
7600: 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 </sub> + ..a<sub
7610: 3e 34 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e >43</sub>*b<sub>
7620: 33 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 31</sub> + ..a<s
7630: 75 62 3e 34 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 ub>44</sub>*b<su
7640: 62 3e 34 31 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e b>41</sub>)</td>
7650: 0d 0a 3c 74 64 3e 28 61 3c 73 75 62 3e 34 31 3c ..<td>(a<sub>41<
7660: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 32 3c 2f /sub>*b<sub>12</
7670: 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 sub> + ..a<sub>4
7680: 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 32 2</sub>*b<sub>22
7690: 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 </sub> + ..a<sub
76a0: 3e 34 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e >43</sub>*b<sub>
76b0: 33 32 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 32</sub> +..a<su
76c0: 62 3e 34 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 b>44</sub>*b<sub
76d0: 3e 34 32 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d >42</sub>)</td>.
76e0: 0a 3c 74 64 3e 28 61 3c 73 75 62 3e 34 31 3c 2f .<td>(a<sub>41</
76f0: 73 75 62 3e 2a 62 3c 73 75 62 3e 31 33 3c 2f 73 sub>*b<sub>13</s
7700: 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 32 ub> + ..a<sub>42
7710: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 33 3c </sub>*b<sub>23<
7720: 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e /sub> + ..a<sub>
7730: 34 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 43</sub>*b<sub>3
7740: 33 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3</sub> +..a<sub
7750: 3e 34 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e >44</sub>*b<sub>
7760: 34 33 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 43</sub>)</td>..
7770: 3c 74 64 3e 28 61 3c 73 75 62 3e 34 31 3c 2f 73 <td>(a<sub>41</s
7780: 75 62 3e 2a 62 3c 73 75 62 3e 31 34 3c 2f 73 75 ub>*b<sub>14</su
7790: 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 32 3c b> + ..a<sub>42<
77a0: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 34 3c 2f /sub>*b<sub>24</
77b0: 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 sub> + ..a<sub>4
77c0: 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 34 3</sub>*b<sub>34
77d0: 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e </sub> +..a<sub>
77e0: 34 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 44</sub>*b<sub>4
77f0: 34 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 3c 74 64 4</sub>)</td><td
7800: 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f >/</td></tr>..</
7810: 74 61 62 6c 65 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 table>..</td></t
7820: 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 68 33 3e r></table>..<h3>
7830: 69 64 65 6e 74 69 74 79 20 6d 61 74 72 69 78 3c identity matrix<
7840: 2f 68 33 3e 0d 0a 41 6e 20 69 64 65 6e 74 69 74 /h3>..An identit
7850: 79 20 6d 61 74 72 69 78 20 73 69 6d 70 6c 79 20 y matrix simply
7860: 63 6f 72 72 65 73 70 6f 6e 64 73 20 74 6f 20 61 corresponds to a
7870: 6e 20 61 66 66 69 6e 65 20 74 72 61 6e 73 66 6f n affine transfo
7880: 72 6d 61 74 69 6f 6e 20 6c 61 63 6b 69 6e 67 20 rmation lacking
7890: 61 6e 79 20 61 63 74 75 61 6c 20 65 66 66 65 63 any actual effec
78a0: 74 3a 20 61 74 20 74 68 65 20 65 6e 64 20 6f 66 t: at the end of
78b0: 20 74 68 65 20 70 72 6f 63 65 73 73 20 74 68 65 the process the
78c0: 20 74 72 61 6e 73 66 6f 72 6d 65 64 20 67 65 6f transformed geo
78d0: 6d 65 74 72 79 20 77 69 6c 6c 20 62 65 20 65 78 metry will be ex
78e0: 61 63 74 6c 79 20 74 68 65 20 73 61 6d 65 20 61 actly the same a
78f0: 73 20 62 65 66 6f 72 65 2e 3c 62 72 3e 0d 0a 4d s before.<br>..M
7900: 6f 72 65 6f 76 65 72 20 61 6e 20 69 64 65 6e 74 oreover an ident
7910: 69 74 79 20 6d 61 74 72 69 78 20 70 6c 61 79 73 ity matrix plays
7920: 20 61 20 73 70 65 63 69 61 6c 20 72 6f 6c 65 20 a special role
7930: 69 6e 20 6d 75 6c 74 69 70 6c 69 63 61 74 69 6f in multiplicatio
7940: 6e 3a 20 74 68 65 20 72 65 73 75 6c 74 69 6e 67 n: the resulting
7950: 20 6d 61 74 72 69 78 20 77 69 6c 6c 20 61 6c 77 matrix will alw
7960: 61 79 73 20 62 65 20 65 78 61 63 74 6c 79 20 74 ays be exactly t
7970: 68 65 20 73 61 6d 65 20 6f 66 20 74 68 65 20 6f he same of the o
7980: 74 68 65 72 20 6d 61 74 72 69 78 2e 3c 62 72 3e ther matrix.<br>
7990: 0d 0a 28 3c 69 3e 69 74 27 73 20 6d 6f 72 65 20 ..(<i>it's more
79a0: 6f 72 20 6c 65 73 73 20 74 68 65 20 65 71 75 69 or less the equi
79b0: 76 61 6c 65 6e 74 20 6f 66 20 6d 75 6c 74 69 70 valent of multip
79c0: 6c 79 69 6e 67 20 65 2e 67 2e 20 3c 62 3e 38 2a lying e.g. <b>8*
79d0: 31 3d 38 3c 2f 62 3e 20 69 6e 20 61 6e 20 6f 72 1=8</b> in an or
79e0: 64 69 6e 61 72 79 20 73 63 61 6c 61 72 20 6d 75 dinary scalar mu
79f0: 6c 74 69 70 6c 69 63 61 74 69 6f 6e 3c 2f 69 3e ltiplication</i>
7a00: 29 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 68 72 3e ).<br><br>..<hr>
7a10: 0d 0a 3c 68 33 3e 42 6f 72 69 6e 67 20 53 51 4c ..<h3>Boring SQL
7a20: 20 66 75 6e 63 74 69 6f 6e 73 3a 20 61 20 66 6f functions: a fo
7a30: 72 6d 61 6c 20 65 78 70 6c 61 6e 61 74 69 6f 6e rmal explanation
7a40: 3c 2f 68 33 3e 0d 0a 3c 74 61 62 6c 65 20 62 6f </h3>..<table bo
7a50: 72 64 65 72 3d 22 31 22 20 63 65 6c 6c 73 70 61 rder="1" cellspa
7a60: 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 64 cing="4" cellpad
7a70: 64 69 6e 67 3d 22 38 22 20 62 67 63 6f 6c 6f 72 ding="8" bgcolor
7a80: 3d 22 23 66 66 66 30 64 30 22 3e 0d 0a 3c 74 72 ="#fff0d0">..<tr
7a90: 3e 3c 74 68 20 62 67 63 6f 6c 6f 72 3d 22 23 43 ><th bgcolor="#C
7aa0: 33 42 30 39 31 22 3e 53 51 4c 20 46 75 6e 63 74 3B091">SQL Funct
7ab0: 69 6f 6e 3c 2f 74 68 3e 3c 74 68 20 62 67 63 6f ion</th><th bgco
7ac0: 6c 6f 72 3d 22 23 43 33 42 30 39 31 22 3e 44 65 lor="#C3B091">De
7ad0: 73 63 72 69 70 74 69 6f 6e 3c 2f 74 68 3e 3c 2f scription</th></
7ae0: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e tr>..<tr><td><b>
7af0: 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 20 28 20 ATM_Transform (
7b00: 42 4c 4f 42 20 47 65 6f 6d 65 74 72 79 20 2c 20 BLOB Geometry ,
7b10: 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 29 BLOB AT-matrix )
7b20: 20 3a 20 42 4c 4f 42 20 47 65 6f 6d 65 74 72 79 : BLOB Geometry
7b30: 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 </td><td>Will re
7b40: 74 75 72 6e 20 61 20 6e 65 77 20 47 65 6f 6d 65 turn a new Geome
7b50: 74 72 79 20 62 79 20 61 70 70 6c 79 69 6e 67 20 try by applying
7b60: 61 6e 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 an Affine Transf
7b70: 6f 72 6d 61 74 69 6f 6e 20 74 6f 20 74 68 65 20 ormation to the
7b80: 69 6e 70 75 74 20 47 65 6f 6d 65 74 72 79 2e 3c input Geometry.<
7b90: 62 72 3e 0d 0a 54 68 65 20 6f 75 74 70 75 74 20 br>..The output
7ba0: 47 65 6f 6d 65 74 72 79 20 77 69 6c 6c 20 70 72 Geometry will pr
7bb0: 65 73 65 72 76 65 20 74 68 65 20 6f 72 69 67 69 eserve the origi
7bc0: 6e 61 6c 20 53 52 49 44 2c 20 64 69 6d 65 6e 73 nal SRID, dimens
7bd0: 69 6f 6e 73 20 61 6e 64 20 74 79 70 65 2e 3c 62 ions and type.<b
7be0: 72 3e 0d 0a 4e 55 4c 4c 20 77 69 6c 6c 20 62 65 r>..NULL will be
7bf0: 20 72 65 74 75 72 6e 65 64 20 6f 6e 20 69 6e 76 returned on inv
7c00: 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c alid arguments.<
7c10: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c /td></tr>..<tr><
7c20: 74 64 3e 3c 62 3e 41 54 4d 5f 49 73 56 61 6c 69 td><b>ATM_IsVali
7c30: 64 20 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 d ( BLOB AT-matr
7c40: 69 78 20 29 20 3a 20 42 4f 4f 4c 45 41 4e 3c 2f ix ) : BOOLEAN</
7c50: 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 63 68 65 63 td><td>Will chec
7c60: 6b 20 69 66 20 61 20 42 4c 4f 42 20 64 6f 20 72 k if a BLOB do r
7c70: 65 61 6c 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 eally correspond
7c80: 20 74 6f 20 61 6e 20 65 6e 63 6f 64 65 64 20 41 to an encoded A
7c90: 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 ffine Transforma
7ca0: 74 69 6f 6e 20 4d 61 74 72 69 78 20 74 68 65 6e tion Matrix then
7cb0: 20 72 65 74 75 72 6e 69 6e 67 20 54 52 55 45 20 returning TRUE
7cc0: 6f 72 20 46 41 4c 53 45 2e 3c 62 72 3e 0d 0a 2d or FALSE.<br>..-
7cd0: 31 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 1 will be return
7ce0: 65 64 20 69 66 20 74 68 65 20 61 72 67 75 6d 65 ed if the argume
7cf0: 6e 74 20 69 73 6e 27 74 20 6f 66 20 74 68 65 20 nt isn't of the
7d00: 42 4c 4f 42 20 74 79 70 65 2e 3c 2f 74 64 3e 3c BLOB type.</td><
7d10: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 /tr>..<tr><td><b
7d20: 3e 41 54 4d 5f 41 73 54 65 78 74 20 28 20 42 4c >ATM_AsText ( BL
7d30: 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 29 20 3a OB AT-matrix ) :
7d40: 20 54 45 58 54 3c 2f 74 64 3e 3c 74 64 3e 57 69 TEXT</td><td>Wi
7d50: 6c 6c 20 72 65 74 75 72 6e 20 61 20 74 65 78 74 ll return a text
7d60: 20 73 65 72 69 61 6c 69 7a 65 64 20 72 65 70 72 serialized repr
7d70: 65 73 65 6e 74 61 74 69 6f 6e 20 6f 66 20 74 68 esentation of th
7d80: 65 20 4d 61 74 72 69 78 2e 3c 62 72 3e 0d 0a 4e e Matrix.<br>..N
7d90: 55 4c 4c 20 77 69 6c 6c 20 62 65 20 72 65 74 75 ULL will be retu
7da0: 72 6e 65 64 20 6f 6e 20 69 6e 76 61 6c 69 64 20 rned on invalid
7db0: 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e 3c arguments.</td><
7dc0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 68 20 63 6f /tr>..<tr><th co
7dd0: 6c 73 70 61 6e 3d 22 32 22 20 62 67 63 6f 6c 6f lspan="2" bgcolo
7de0: 72 3d 22 23 46 30 45 36 38 43 22 20 61 6c 69 67 r="#F0E68C" alig
7df0: 6e 3d 22 63 65 6e 74 65 72 22 3e 62 61 73 69 63 n="center">basic
7e00: 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 73 20 6f SQL functions o
7e10: 6e 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f n Affine Transfo
7e20: 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 3c 2f rmation Matrix</
7e30: 74 68 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 th></tr>..<tr><t
7e40: 64 3e 3c 62 3e 41 54 4d 5f 4d 75 6c 74 69 70 6c d><b>ATM_Multipl
7e50: 79 20 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 y ( BLOB AT-matr
7e60: 69 78 2d 41 20 2c 20 42 4c 4f 42 20 41 54 2d 6d ix-A , BLOB AT-m
7e70: 61 74 72 69 78 2d 42 20 29 20 3a 20 42 4c 4f 42 atrix-B ) : BLOB
7e80: 20 41 54 2d 6d 61 74 72 69 78 3c 2f 74 64 3e 3c AT-matrix</td><
7e90: 74 64 3e 57 69 6c 6c 20 6d 75 6c 74 69 70 6c 79 td>Will multiply
7ea0: 20 4d 61 74 72 69 78 2d 42 20 62 79 20 4d 61 74 Matrix-B by Mat
7eb0: 72 69 78 2d 41 20 74 68 65 6e 20 72 65 74 75 72 rix-A then retur
7ec0: 6e 69 6e 67 20 74 68 65 20 72 65 73 75 6c 74 69 ning the resulti
7ed0: 6e 67 20 4d 61 74 72 69 78 2e 3c 62 72 3e 0d 0a ng Matrix.<br>..
7ee0: 4e 55 4c 4c 20 77 69 6c 6c 20 62 65 20 72 65 74 NULL will be ret
7ef0: 75 72 6e 65 64 20 6f 6e 20 69 6e 76 61 6c 69 64 urned on invalid
7f00: 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e arguments.</td>
7f10: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c </tr>..<tr><td><
7f20: 62 3e 41 54 4d 5f 44 65 74 65 72 6d 69 6e 61 6e b>ATM_Determinan
7f30: 74 20 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 t ( BLOB AT-matr
7f40: 69 78 20 29 20 3a 20 64 6f 75 62 6c 65 3c 2f 74 ix ) : double</t
7f50: 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72 d><td>Will retur
7f60: 6e 20 74 68 65 20 3c 61 20 68 72 65 66 3d 22 68 n the <a href="h
7f70: 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 ttp://en.wikiped
7f80: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 44 65 74 65 ia.org/wiki/Dete
7f90: 72 6d 69 6e 61 6e 74 22 3e 64 65 74 65 72 6d 69 rminant">determi
7fa0: 6e 61 6e 74 3c 2f 61 3e 20 6f 66 20 74 68 65 20 nant</a> of the
7fb0: 4d 61 74 72 69 78 2e 3c 62 72 3e 0d 0a 4e 55 4c Matrix.<br>..NUL
7fc0: 4c 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e L will be return
7fd0: 65 64 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 ed on invalid ar
7fe0: 67 75 6d 65 6e 74 2e 3c 2f 74 64 3e 3c 2f 74 72 gument.</td></tr
7ff0: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 >..<tr><td><b>AT
8000: 4d 5f 49 73 49 6e 76 65 72 74 69 62 6c 65 20 28 M_IsInvertible (
8010: 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 BLOB AT-matrix
8020: 29 20 3a 20 62 6f 6f 6c 65 61 6e 3c 2f 74 64 3e ) : boolean</td>
8030: 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20 <td>Will return
8040: 31 20 3c 62 3e 54 52 55 45 3c 2f 62 3e 20 69 66 1 <b>TRUE</b> if
8050: 20 74 68 65 20 41 66 66 69 6e 65 20 54 72 61 6e the Affine Tran
8060: 73 66 6f 72 6d 61 74 69 6f 6e 20 6d 61 74 72 69 sformation matri
8070: 78 20 63 61 6e 20 62 65 20 69 6e 76 65 72 74 65 x can be inverte
8080: 64 2c 20 30 20 3c 62 3e 46 41 4c 53 45 3c 2f 62 d, 0 <b>FALSE</b
8090: 3e 20 69 66 20 6e 6f 74 20 28 3c 69 3e 6f 6e 6c > if not (<i>onl
80a0: 79 20 6d 61 74 72 69 63 65 73 20 70 72 65 73 65 y matrices prese
80b0: 6e 74 69 6e 67 20 61 20 64 65 74 65 72 6d 69 6e nting a determin
80c0: 61 6e 74 20 64 69 66 66 65 72 65 6e 74 20 66 72 ant different fr
80d0: 6f 6d 20 7a 65 72 6f 20 63 61 6e 20 62 65 20 69 om zero can be i
80e0: 6e 76 65 72 74 65 64 3c 2f 69 3e 29 2e 3c 62 72 nverted</i>).<br
80f0: 3e 0d 0a 4e 55 4c 4c 20 77 69 6c 6c 20 62 65 20 >..NULL will be
8100: 72 65 74 75 72 6e 65 64 20 6f 6e 20 69 6e 76 61 returned on inva
8110: 6c 69 64 20 61 72 67 75 6d 65 6e 74 2e 3c 2f 74 lid argument.</t
8120: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
8130: 3e 3c 62 3e 41 54 4d 5f 49 6e 76 65 72 74 20 28 ><b>ATM_Invert (
8140: 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 BLOB AT-matrix
8150: 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 ) : BLOB AT-matr
8160: 69 78 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 ix</td><td>Will
8170: 72 65 74 75 72 6e 20 74 68 65 20 3c 61 20 68 72 return the <a hr
8180: 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 ef="http://en.wi
8190: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 kipedia.org/wiki
81a0: 2f 49 6e 76 65 72 74 69 62 6c 65 5f 6d 61 74 72 /Invertible_matr
81b0: 69 78 22 3e 69 6e 76 65 72 73 65 3c 2f 61 3e 20 ix">inverse</a>
81c0: 6d 61 74 72 69 78 2e 3c 62 72 3e 0d 0a 4e 55 4c matrix.<br>..NUL
81d0: 4c 20 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e L will be return
81e0: 65 64 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 ed on invalid ar
81f0: 67 75 6d 65 6e 74 2e 3c 2f 74 64 3e 3c 2f 74 72 gument.</td></tr
8200: 3e 0d 0a 3c 74 72 3e 3c 74 68 20 63 6f 6c 73 70 >..<tr><th colsp
8210: 61 6e 3d 22 32 22 20 62 67 63 6f 6c 6f 72 3d 22 an="2" bgcolor="
8220: 23 46 30 45 36 38 43 22 20 61 6c 69 67 6e 3d 22 #F0E68C" align="
8230: 63 65 6e 74 65 72 22 3e 53 51 4c 20 66 75 6e 63 center">SQL func
8240: 74 69 6f 6e 73 20 63 72 65 61 74 69 6e 67 20 61 tions creating a
8250: 6e 64 20 69 6e 69 74 69 61 6c 69 7a 69 6e 67 20 nd initializing
8260: 61 20 6e 65 77 20 41 66 66 69 6e 65 20 54 72 61 a new Affine Tra
8270: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 nsformation Matr
8280: 69 78 3c 2f 74 68 3e 3c 2f 74 72 3e 0d 0a 3c 74 ix</th></tr>..<t
8290: 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 43 72 65 r><td><b>ATM_Cre
82a0: 61 74 65 20 28 20 76 6f 69 64 20 29 20 3a 20 42 ate ( void ) : B
82b0: 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 LOB AT-matrix</b
82c0: 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 ></td><td>Will r
82d0: 65 74 75 72 6e 20 61 6e 20 49 64 65 6e 74 69 74 eturn an Identit
82e0: 79 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f y Affine Transfo
82f0: 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 2e 3c rmation Matrix.<
8300: 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61 6e 79 br>..NULL if any
8310: 20 65 72 72 6f 72 20 6f 63 63 75 72 73 2e 3c 2f error occurs.</
8320: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
8330: 64 3e 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 20 d><b>ATM_Create
8340: 28 20 64 6f 75 62 6c 65 20 61 20 2c 20 64 6f 75 ( double a , dou
8350: 62 6c 65 20 62 20 2c 20 64 6f 75 62 6c 65 20 64 ble b , double d
8360: 20 2c 20 64 6f 75 62 6c 65 20 65 20 2c 20 64 6f , double e , do
8370: 75 62 6c 65 20 78 6f 66 66 20 2c 20 64 6f 75 62 uble xoff , doub
8380: 6c 65 20 79 6f 66 66 20 29 20 3a 20 42 4c 4f 42 le yoff ) : BLOB
8390: 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 2f AT-matrix</b></
83a0: 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 td><td>Will retu
83b0: 72 6e 20 61 20 32 44 20 41 66 66 69 6e 65 20 54 rn a 2D Affine T
83c0: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 ransformation Ma
83d0: 74 72 69 78 20 69 6e 69 74 69 61 6c 69 7a 65 64 trix initialized
83e0: 20 77 69 74 68 20 65 78 70 6c 69 63 69 74 20 76 with explicit v
83f0: 61 6c 75 65 73 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c alues.<br>..NULL
8400: 20 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 if any error oc
8410: 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c curs or on inval
8420: 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 id arguments.</t
8430: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
8440: 3e 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 20 28 ><b>ATM_Create (
8450: 20 64 6f 75 62 6c 65 20 61 20 2c 20 64 6f 75 62 double a , doub
8460: 6c 65 20 62 20 2c 20 64 6f 75 62 6c 65 20 63 20 le b , double c
8470: 2c 20 64 6f 75 62 6c 65 20 64 20 2c 20 64 6f 75 , double d , dou
8480: 62 6c 65 20 65 20 2c 20 64 6f 75 62 6c 65 20 66 ble e , double f
8490: 20 2c 20 64 6f 75 62 6c 65 20 67 20 2c 20 64 6f , double g , do
84a0: 75 62 6c 65 20 68 20 2c 20 64 6f 75 62 6c 65 20 uble h , double
84b0: 69 20 2c 20 64 6f 75 62 6c 65 20 78 6f 66 66 20 i , double xoff
84c0: 2c 20 64 6f 75 62 6c 65 20 79 6f 66 66 20 2c 20 , double yoff ,
84d0: 64 6f 75 62 6c 65 20 64 6f 75 62 6c 65 20 7a 6f double double zo
84e0: 66 66 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d ff ) : BLOB AT-m
84f0: 61 74 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 atrix</b></td><t
8500: 64 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 20 d>Will return a
8510: 33 44 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 3D Affine Transf
8520: 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 20 ormation Matrix
8530: 69 6e 69 74 69 61 6c 69 7a 65 64 20 77 69 74 68 initialized with
8540: 20 65 78 70 6c 69 63 69 74 20 76 61 6c 75 65 73 explicit values
8550: 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61 .<br>..NULL if a
8560: 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 ny error occurs
8570: 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 or on invalid ar
8580: 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e 3c 2f 74 guments.</td></t
8590: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 r>..<tr><td><b>A
85a0: 54 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61 TM_CreateTransla
85b0: 74 65 20 28 20 64 6f 75 62 6c 65 20 74 78 20 2c te ( double tx ,
85c0: 20 64 6f 75 62 6c 65 20 74 79 20 29 20 3a 20 42 double ty ) : B
85d0: 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 LOB AT-matrix</b
85e0: 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 54 4d 5f 43 72 ><br>..<b>ATM_Cr
85f0: 65 61 74 65 54 72 61 6e 73 6c 61 74 65 20 28 20 eateTranslate (
8600: 64 6f 75 62 6c 65 20 74 78 20 2c 20 64 6f 75 62 double tx , doub
8610: 6c 65 20 74 79 20 2c 20 64 6f 75 62 6c 65 20 74 le ty , double t
8620: 7a 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 z ) : BLOB AT-ma
8630: 74 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 trix</b></td><td
8640: 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 >Will return an
8650: 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d Affine Transform
8660: 61 74 69 6f 6e 20 4d 61 74 72 69 78 20 69 6e 69 ation Matrix ini
8670: 74 69 61 6c 69 7a 65 64 20 72 65 73 70 65 63 74 tialized respect
8680: 69 76 65 6c 79 20 61 73 20 61 20 32 44 20 6f 72 ively as a 2D or
8690: 20 33 44 20 54 72 61 6e 73 6c 61 74 65 2e 3c 62 3D Translate.<b
86a0: 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61 6e 79 20 r>..NULL if any
86b0: 65 72 72 6f 72 20 6f 63 63 75 72 73 20 6f 72 20 error occurs or
86c0: 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 67 75 6d on invalid argum
86d0: 65 6e 74 73 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d ents.</td></tr>.
86e0: 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f .<tr><td><b>ATM_
86f0: 43 72 65 61 74 65 53 63 61 6c 65 20 28 20 64 6f CreateScale ( do
8700: 75 62 6c 65 20 73 78 20 2c 20 64 6f 75 62 6c 65 uble sx , double
8710: 20 73 79 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d sy ) : BLOB AT-
8720: 6d 61 74 72 69 78 3c 2f 62 3e 3c 62 72 3e 0d 0a matrix</b><br>..
8730: 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 53 63 61 <b>ATM_CreateSca
8740: 6c 65 20 28 20 64 6f 75 62 6c 65 20 73 78 20 2c le ( double sx ,
8750: 20 64 6f 75 62 6c 65 20 73 79 20 2c 20 64 6f 75 double sy , dou
8760: 62 6c 65 20 73 7a 20 29 20 3a 20 42 4c 4f 42 20 ble sz ) : BLOB
8770: 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 2f 74 AT-matrix</b></t
8780: 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72 d><td>Will retur
8790: 6e 20 61 6e 20 41 66 66 69 6e 65 20 54 72 61 6e n an Affine Tran
87a0: 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 sformation Matri
87b0: 78 20 69 6e 69 74 69 61 6c 69 7a 65 64 20 72 65 x initialized re
87c0: 73 70 65 63 74 69 76 65 6c 79 20 61 73 20 61 20 spectively as a
87d0: 32 44 20 6f 72 20 33 44 20 53 63 61 6c 65 2e 3c 2D or 3D Scale.<
87e0: 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61 6e 79 br>..NULL if any
87f0: 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 6f 72 error occurs or
8800: 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 67 75 on invalid argu
8810: 6d 65 6e 74 73 2e 2e 3c 2f 74 64 3e 3c 2f 74 72 ments..</td></tr
8820: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 >..<tr><td><b>AT
8830: 4d 5f 43 72 65 61 74 65 52 6f 74 61 74 65 20 28 M_CreateRotate (
8840: 20 64 6f 75 62 6c 65 20 61 6e 67 6c 65 49 6e 44 double angleInD
8850: 65 67 72 65 65 73 20 29 20 3a 20 42 4c 4f 42 20 egrees ) : BLOB
8860: 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 62 72 AT-matrix</b><br
8870: 3e 0d 0a 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 >..<b>ATM_Create
8880: 5a 52 6f 6c 6c 20 28 20 64 6f 75 62 6c 65 20 61 ZRoll ( double a
8890: 6e 67 6c 65 49 6e 44 65 67 72 65 65 73 20 29 20 ngleInDegrees )
88a0: 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 : BLOB AT-matrix
88b0: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c </b></td><td>Wil
88c0: 6c 20 72 65 74 75 72 6e 20 61 6e 20 41 66 66 69 l return an Affi
88d0: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f ne Transformatio
88e0: 6e 20 4d 61 74 72 69 78 20 69 6e 69 74 69 61 6c n Matrix initial
88f0: 69 7a 65 64 20 61 73 20 52 6f 74 61 74 69 6f 6e ized as Rotation
8900: 20 61 72 6f 75 6e 64 20 74 68 65 20 5a 20 61 78 around the Z ax
8910: 69 73 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 is.<br>..NULL if
8920: 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72 any error occur
8930: 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20 s or on invalid
8940: 61 72 67 75 6d 65 6e 74 73 2e 3c 68 72 3e 0d 0a arguments.<hr>..
8950: 54 68 65 20 61 6e 67 6c 65 20 69 73 20 61 6c 77 The angle is alw
8960: 61 79 73 20 65 78 70 65 63 74 65 64 20 74 6f 20 ays expected to
8970: 62 65 20 6d 65 61 73 75 72 65 64 20 69 6e 20 64 be measured in d
8980: 65 63 69 6d 61 6c 20 64 65 67 72 65 65 73 2e 20 ecimal degrees.
8990: 54 68 65 20 64 69 72 65 63 74 69 6f 6e 20 6f 66 The direction of
89a0: 20 72 6f 74 61 74 69 6f 6e 20 69 73 20 64 65 66 rotation is def
89b0: 69 6e 65 64 20 73 75 63 68 20 74 68 61 74 20 70 ined such that p
89c0: 6f 73 69 74 69 76 65 20 61 6e 67 6c 65 73 20 72 ositive angles r
89d0: 6f 74 61 74 65 20 69 6e 20 74 68 65 20 64 69 72 otate in the dir
89e0: 65 63 74 69 6f 6e 20 66 72 6f 6d 20 74 68 65 20 ection from the
89f0: 70 6f 73 69 74 69 76 65 20 58 20 61 78 69 73 20 positive X axis
8a00: 74 6f 77 61 72 64 20 74 68 65 20 70 6f 73 69 74 toward the posit
8a10: 69 76 65 20 59 20 61 78 69 73 2e 20 57 69 74 68 ive Y axis. With
8a20: 20 74 68 65 20 64 65 66 61 75 6c 74 20 61 78 69 the default axi
8a30: 73 20 6f 72 69 65 6e 74 61 74 69 6f 6e 20 20 70 s orientation p
8a40: 6f 73 69 74 69 76 65 20 61 6e 67 6c 65 73 20 72 ositive angles r
8a50: 6f 74 61 74 65 20 69 6e 20 61 20 63 6f 75 6e 74 otate in a count
8a60: 65 72 63 6c 6f 63 6b 77 69 73 65 20 64 69 72 65 erclockwise dire
8a70: 63 74 69 6f 6e 2e 3c 68 72 3e 0d 0a 3c 75 3e 4e ction.<hr>..<u>N
8a80: 6f 74 65 3c 2f 75 3e 3a 20 74 68 69 73 20 69 73 ote</u>: this is
8a90: 20 74 68 65 20 75 6e 69 71 75 65 20 72 6f 74 61 the unique rota
8aa0: 74 69 6f 6e 20 61 6c 6c 6f 77 65 64 20 6f 6e 20 tion allowed on
8ab0: 61 20 70 75 72 65 6c 79 20 32 44 20 70 6c 61 6e a purely 2D plan
8ac0: 65 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 e.</td></tr>..<t
8ad0: 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 43 72 65 r><td><b>ATM_Cre
8ae0: 61 74 65 58 52 6f 6c 6c 20 28 20 64 6f 75 62 6c ateXRoll ( doubl
8af0: 65 20 61 6e 67 6c 65 49 6e 44 65 67 72 65 65 73 e angleInDegrees
8b00: 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 ) : BLOB AT-mat
8b10: 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e rix</b></td><td>
8b20: 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 41 Will return an A
8b30: 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 ffine Transforma
8b40: 74 69 6f 6e 20 4d 61 74 72 69 78 20 69 6e 69 74 tion Matrix init
8b50: 69 61 6c 69 7a 65 64 20 61 73 20 52 6f 74 61 74 ialized as Rotat
8b60: 69 6f 6e 20 61 72 6f 75 6e 64 20 74 68 65 20 58 ion around the X
8b70: 20 61 78 69 73 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c axis.<br>..NULL
8b80: 20 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 if any error oc
8b90: 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c curs or on inval
8ba0: 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 id arguments.</t
8bb0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 d></tr>..<tr><td
8bc0: 3e 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 59 52 ><b>ATM_CreateYR
8bd0: 6f 6c 6c 20 28 20 64 6f 75 62 6c 65 20 61 6e 67 oll ( double ang
8be0: 6c 65 49 6e 44 65 67 72 65 65 73 20 29 20 3a 20 leInDegrees ) :
8bf0: 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f BLOB AT-matrix</
8c00: 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 b></td><td>Will
8c10: 72 65 74 75 72 6e 20 61 6e 20 41 66 66 69 6e 65 return an Affine
8c20: 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 Transformation
8c30: 4d 61 74 72 69 78 20 69 6e 69 74 69 61 6c 69 7a Matrix initializ
8c40: 65 64 20 61 73 20 52 6f 74 61 74 69 6f 6e 20 61 ed as Rotation a
8c50: 72 6f 75 6e 64 20 74 68 65 20 59 20 61 78 69 73 round the Y axis
8c60: 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61 .<br>..NULL if a
8c70: 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 ny error occurs
8c80: 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 or on invalid ar
8c90: 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e 3c 2f 74 guments.</td></t
8ca0: 72 3e 0d 0a 3c 74 72 3e 3c 74 68 20 63 6f 6c 73 r>..<tr><th cols
8cb0: 70 61 6e 3d 22 32 22 20 62 67 63 6f 6c 6f 72 3d pan="2" bgcolor=
8cc0: 22 23 46 30 45 36 38 43 22 20 61 6c 69 67 6e 3d "#F0E68C" align=
8cd0: 22 63 65 6e 74 65 72 22 3e 53 51 4c 20 66 75 6e "center">SQL fun
8ce0: 63 74 69 6f 6e 73 20 73 75 70 70 6f 72 74 69 6e ctions supportin
8cf0: 67 20 63 68 61 69 6e 69 6e 67 20 74 77 6f 20 41 g chaining two A
8d00: 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 ffine Transforma
8d10: 74 69 6f 6e 20 4d 61 74 72 69 63 65 73 3c 2f 74 tion Matrices</t
8d20: 68 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 h></tr>..<tr><td
8d30: 3e 3c 62 3e 41 54 4d 5f 54 72 61 6e 73 6c 61 74 ><b>ATM_Translat
8d40: 65 20 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 e ( BLOB AT-matr
8d50: 69 78 20 2c 20 64 6f 75 62 6c 65 20 74 78 20 2c ix , double tx ,
8d60: 20 64 6f 75 62 6c 65 20 74 79 20 29 20 3a 20 42 double ty ) : B
8d70: 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 LOB AT-matrix</b
8d80: 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 54 4d 5f 54 72 ><br>..<b>ATM_Tr
8d90: 61 6e 73 6c 61 74 65 20 28 20 42 4c 4f 42 20 41 anslate ( BLOB A
8da0: 54 2d 6d 61 74 72 69 78 20 2c 20 64 6f 75 62 6c T-matrix , doubl
8db0: 65 20 74 78 20 2c 20 64 6f 75 62 6c 65 20 74 79 e tx , double ty
8dc0: 20 2c 20 64 6f 75 62 6c 65 20 74 7a 20 29 20 3a , double tz ) :
8dd0: 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c BLOB AT-matrix<
8de0: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c /b></td><td>Will
8df0: 20 72 65 74 75 72 6e 20 61 6e 20 41 66 66 69 6e return an Affin
8e00: 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e e Transformation
8e10: 20 4d 61 74 72 69 78 20 62 79 20 63 68 61 69 6e Matrix by chain
8e20: 69 6e 67 20 72 65 73 70 65 63 74 69 76 65 6c 79 ing respectively
8e30: 20 61 20 32 44 20 6f 72 20 33 44 20 54 72 61 6e a 2D or 3D Tran
8e40: 73 6c 61 74 65 20 61 6e 64 20 61 6e 6f 74 68 65 slate and anothe
8e50: 72 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f r Affine Transfo
8e60: 72 6d 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 4e 55 rmation.<br>..NU
8e70: 4c 4c 20 69 66 20 61 6e 79 20 65 72 72 6f 72 20 LL if any error
8e80: 6f 63 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 occurs or on inv
8e90: 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c alid arguments.<
8ea0: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c /td></tr>..<tr><
8eb0: 74 64 3e 3c 62 3e 41 54 4d 5f 53 63 61 6c 65 20 td><b>ATM_Scale
8ec0: 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 ( BLOB AT-matrix
8ed0: 20 2c 20 64 6f 75 62 6c 65 20 73 78 20 2c 20 64 , double sx , d
8ee0: 6f 75 62 6c 65 20 73 79 20 29 20 3a 20 42 4c 4f ouble sy ) : BLO
8ef0: 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c B AT-matrix</b><
8f00: 62 72 3e 0d 0a 3c 62 3e 41 54 4d 5f 53 63 61 6c br>..<b>ATM_Scal
8f10: 65 20 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 e ( BLOB AT-matr
8f20: 69 78 20 2c 20 64 6f 75 62 6c 65 20 73 78 20 2c ix , double sx ,
8f30: 20 64 6f 75 62 6c 65 20 73 79 20 2c 20 64 6f 75 double sy , dou
8f40: 62 6c 65 20 73 7a 20 29 20 3a 20 42 4c 4f 42 20 ble sz ) : BLOB
8f50: 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 2f 74 AT-matrix</b></t
8f60: 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72 d><td>Will retur
8f70: 6e 20 61 6e 20 41 66 66 69 6e 65 20 54 72 61 6e n an Affine Tran
8f80: 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 sformation Matri
8f90: 78 20 62 79 20 63 68 61 69 6e 69 6e 67 20 72 65 x by chaining re
8fa0: 73 70 65 63 74 69 76 65 6c 79 20 61 20 32 44 20 spectively a 2D
8fb0: 6f 72 20 33 44 20 53 63 61 6c 65 20 61 6e 64 20 or 3D Scale and
8fc0: 61 6e 6f 74 68 65 72 20 41 66 66 69 6e 65 20 54 another Affine T
8fd0: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 3c 62 ransformation.<b
8fe0: 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61 6e 79 20 r>..NULL if any
8ff0: 65 72 72 6f 72 20 6f 63 63 75 72 73 20 6f 72 20 error occurs or
9000: 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 67 75 6d on invalid argum
9010: 65 6e 74 73 2e 2e 3c 2f 74 64 3e 3c 2f 74 72 3e ents..</td></tr>
9020: 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d ..<tr><td><b>ATM
9030: 5f 52 6f 74 61 74 65 20 28 20 42 4c 4f 42 20 41 _Rotate ( BLOB A
9040: 54 2d 6d 61 74 72 69 78 20 2c 20 64 6f 75 62 6c T-matrix , doubl
9050: 65 20 61 6e 67 6c 65 49 6e 44 65 67 72 65 65 73 e angleInDegrees
9060: 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 ) : BLOB AT-mat
9070: 72 69 78 3c 2f 62 3e 3c 62 72 3e 0d 0a 3c 62 3e rix</b><br>..<b>
9080: 41 54 4d 5f 5a 52 6f 6c 6c 20 28 20 42 4c 4f 42 ATM_ZRoll ( BLOB
9090: 20 41 54 2d 6d 61 74 72 69 78 20 2c 20 64 6f 75 AT-matrix , dou
90a0: 62 6c 65 20 61 6e 67 6c 65 49 6e 44 65 67 72 65 ble angleInDegre
90b0: 65 73 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d es ) : BLOB AT-m
90c0: 61 74 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 atrix</b></td><t
90d0: 64 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e d>Will return an
90e0: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 Affine Transfor
90f0: 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 20 62 79 mation Matrix by
9100: 20 63 68 61 69 6e 69 6e 67 20 61 20 52 6f 74 61 chaining a Rota
9110: 74 69 6f 6e 20 61 72 6f 75 6e 64 20 74 68 65 20 tion around the
9120: 5a 20 61 78 69 73 20 61 6e 64 20 61 6e 6f 74 68 Z axis and anoth
9130: 65 72 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 er Affine Transf
9140: 6f 72 6d 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 4e ormation.<br>..N
9150: 55 4c 4c 20 69 66 20 61 6e 79 20 65 72 72 6f 72 ULL if any error
9160: 20 6f 63 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e occurs or on in
9170: 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e valid arguments.
9180: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e </td></tr>..<tr>
9190: 3c 74 64 3e 3c 62 3e 41 54 4d 5f 58 52 6f 6c 6c <td><b>ATM_XRoll
91a0: 20 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 ( BLOB AT-matri
91b0: 78 20 2c 20 64 6f 75 62 6c 65 20 61 6e 67 6c 65 x , double angle
91c0: 49 6e 44 65 67 72 65 65 73 20 29 20 3a 20 42 4c InDegrees ) : BL
91d0: 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e OB AT-matrix</b>
91e0: 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 </td><td>Will re
91f0: 74 75 72 6e 20 61 6e 20 41 66 66 69 6e 65 20 54 turn an Affine T
9200: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 ransformation Ma
9210: 74 72 69 78 20 62 79 20 63 68 61 69 6e 69 6e 67 trix by chaining
9220: 20 61 20 52 6f 74 61 74 69 6f 6e 20 61 72 6f 75 a Rotation arou
9230: 6e 64 20 74 68 65 20 58 20 61 78 69 73 20 61 6e nd the X axis an
9240: 64 20 61 6e 6f 74 68 65 72 20 41 66 66 69 6e 65 d another Affine
9250: 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e Transformation.
9260: 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61 6e <br>..NULL if an
9270: 79 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 6f y error occurs o
9280: 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 67 r on invalid arg
9290: 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e 3c 2f 74 72 uments.</td></tr
92a0: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 >..<tr><td><b>AT
92b0: 4d 5f 59 52 6f 6c 6c 20 28 20 42 4c 4f 42 20 41 M_YRoll ( BLOB A
92c0: 54 2d 6d 61 74 72 69 78 20 2c 20 64 6f 75 62 6c T-matrix , doubl
92d0: 65 20 61 6e 67 6c 65 49 6e 44 65 67 72 65 65 73 e angleInDegrees
92e0: 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 ) : BLOB AT-mat
92f0: 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e rix</b></td><td>
9300: 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 41 Will return an A
9310: 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 ffine Transforma
9320: 74 69 6f 6e 20 4d 61 74 72 69 78 20 62 79 20 63 tion Matrix by c
9330: 68 61 69 6e 69 6e 67 20 61 20 52 6f 74 61 74 69 haining a Rotati
9340: 6f 6e 20 61 72 6f 75 6e 64 20 74 68 65 20 59 20 on around the Y
9350: 61 78 69 73 20 61 6e 64 20 61 6e 6f 74 68 65 72 axis and another
9360: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 Affine Transfor
9370: 6d 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 4e 55 4c mation.<br>..NUL
9380: 4c 20 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f L if any error o
9390: 63 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61 ccurs or on inva
93a0: 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f lid arguments.</
93b0: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 td></tr>..<tr><t
93c0: 64 3e 3c 2f 74 64 3e 3c 74 64 3e 0d 0a 3c 75 3e d></td><td>..<u>
93d0: 4e 6f 74 65 3c 2f 75 3e 3a 20 61 6c 6c 20 74 68 Note</u>: all th
93e0: 65 20 61 62 6f 76 65 20 66 75 6e 63 74 69 6f 6e e above function
93f0: 73 20 73 69 6d 70 6c 79 20 61 72 65 20 63 6f 6e s simply are con
9400: 76 65 6e 69 65 6e 63 65 20 6d 65 74 68 6f 64 73 venience methods
9410: 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 61 76 6f intended to avo
9420: 69 64 20 61 6e 79 20 6e 65 65 64 20 74 6f 20 72 id any need to r
9430: 65 70 65 61 74 65 64 6c 79 20 63 61 6c 6c 20 3c epeatedly call <
9440: 62 3e 41 54 4d 5f 4d 75 6c 74 69 70 6c 79 28 29 b>ATM_Multiply()
9450: 3c 2f 62 3e 2e 0d 0a 3c 76 65 72 62 61 74 69 6d </b>...<verbatim
9460: 3e 0d 0a 53 45 4c 45 43 54 20 41 54 4d 5f 4d 75 >..SELECT ATM_Mu
9470: 6c 74 69 70 6c 79 28 41 54 4d 5f 43 72 65 61 74 ltiply(ATM_Creat
9480: 65 52 6f 74 61 74 65 28 31 35 29 2c 20 0d 0a 20 eRotate(15), ..
9490: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
94a0: 20 20 20 41 54 4d 5f 4d 75 6c 74 69 70 6c 79 28 ATM_Multiply(
94b0: 41 54 4d 5f 43 72 65 61 74 65 53 63 61 6c 65 28 ATM_CreateScale(
94c0: 31 2e 31 2c 20 31 2e 32 2c 20 31 2e 33 29 2c 20 1.1, 1.2, 1.3),
94d0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ..
94e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
94f0: 20 20 20 41 54 4d 5f 43 72 65 61 74 65 54 72 61 ATM_CreateTra
9500: 6e 73 6c 61 74 65 28 31 30 2c 20 32 30 2c 20 33 nslate(10, 20, 3
9510: 30 29 29 29 3b 0d 0a 0d 0a 53 45 4c 45 43 54 20 0)));....SELECT
9520: 41 54 4d 5f 52 6f 74 61 74 65 28 0d 0a 20 20 20 ATM_Rotate(..
9530: 20 20 20 20 20 20 20 41 54 4d 5f 53 63 61 6c 65 ATM_Scale
9540: 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 (..
9550: 41 54 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c ATM_CreateTransl
9560: 61 74 65 28 31 30 2c 20 32 30 2c 20 33 30 29 2c ate(10, 20, 30),
9570: 20 0d 0a 20 20 20 20 20 20 20 20 20 20 31 2e 31 .. 1.1
9580: 2c 20 31 2e 32 2c 20 31 2e 33 29 2c 20 0d 0a 20 , 1.2, 1.3), ..
9590: 20 20 20 20 20 20 31 35 29 3b 0d 0a 0d 0a 53 45 15);....SE
95a0: 4c 45 43 54 20 41 54 4d 5f 52 6f 74 61 74 65 28 LECT ATM_Rotate(
95b0: 0d 0a 20 20 20 20 20 20 20 20 20 20 41 54 4d 5f .. ATM_
95c0: 53 63 61 6c 65 28 0d 0a 20 20 20 20 20 20 20 20 Scale(..
95d0: 20 20 20 20 20 41 54 4d 5f 54 72 61 6e 73 6c 61 ATM_Transla
95e0: 74 65 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 te(..
95f0: 20 20 20 20 20 41 54 4d 5f 43 72 65 61 74 65 28 ATM_Create(
9600: 29 2c 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 ), ..
9610: 20 20 31 30 2c 20 32 30 2c 20 33 30 29 2c 0d 0a 10, 20, 30),..
9620: 20 20 20 20 20 20 20 20 20 20 31 2e 31 2c 20 31 1.1, 1
9630: 2e 32 2c 20 31 2e 33 29 2c 0d 0a 20 20 20 20 20 .2, 1.3),..
9640: 20 20 31 35 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 15);..</verbat
9650: 69 6d 3e 0d 0a 41 6c 6c 20 74 68 72 65 65 20 73 im>..All three s
9660: 74 61 74 65 6d 65 6e 74 73 20 77 69 6c 6c 20 72 tatements will r
9670: 65 74 75 72 6e 20 65 78 61 63 74 6c 79 20 74 68 eturn exactly th
9680: 65 20 73 61 6d 65 20 69 64 65 6e 74 69 63 61 6c e same identical
9690: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 Affine Transfor
96a0: 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 3b 20 61 mation Matrix; a
96b0: 6e 79 77 61 79 20 74 68 65 20 73 65 63 6f 6e 64 nyway the second
96c0: 20 6e 6f 74 61 74 69 6f 6e 20 69 73 20 6f 62 76 notation is obv
96d0: 69 6f 75 73 6c 79 20 6d 6f 73 74 20 63 6f 6e 63 iously most conc
96e0: 69 73 65 20 61 6e 64 20 6d 6f 72 65 20 70 72 61 ise and more pra
96f0: 63 74 69 63 61 6c 20 74 68 61 6e 20 74 68 65 20 ctical than the
9700: 6f 74 68 65 72 20 74 77 6f 2e 3c 62 72 3e 0d 0a other two.<br>..
9710: 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 69 6e 20 <u>Note</u>: in
9720: 61 6e 79 20 63 6f 6d 70 6c 65 78 20 63 68 61 69 any complex chai
9730: 6e 20 6f 66 20 74 72 61 6e 73 66 6f 72 6d 61 74 n of transformat
9740: 69 6f 6e 73 20 74 68 65 20 3c 62 3e 69 6e 6e 65 ions the <b>inne
9750: 72 6d 6f 73 74 3c 2f 62 3e 20 6f 70 65 72 61 74 rmost</b> operat
9760: 69 6f 6e 20 77 69 6c 6c 20 62 65 20 61 70 70 6c ion will be appl
9770: 69 65 64 20 3c 62 3e 66 69 72 73 74 3c 2f 62 3e ied <b>first</b>
9780: 2c 20 61 6e 64 20 74 68 65 20 3c 62 3e 6f 75 74 , and the <b>out
9790: 65 72 6d 6f 73 74 3c 2f 62 3e 20 6f 70 65 72 61 ermost</b> opera
97a0: 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20 61 70 70 tion will be app
97b0: 6c 69 65 64 20 3c 62 3e 6c 61 73 74 3c 2f 62 3e lied <b>last</b>
97c0: 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c ...</td></tr>..<
97d0: 74 61 62 6c 65 3e 3c 62 72 3e 3c 62 72 3e 0d 0a table><br><br>..
97e0: 3c 62 3e 4e 6f 74 65 3c 2f 62 3e 3a 20 74 68 65 <b>Note</b>: the
97f0: 20 53 51 4c 20 69 6e 74 65 72 66 61 63 65 20 73 SQL interface s
9800: 75 70 70 6f 72 74 69 6e 67 20 41 66 66 69 6e 65 upporting Affine
9810: 20 54 72 61 73 66 6f 72 6d 61 74 69 6f 6e 73 20 Trasformations
9820: 69 73 20 64 65 73 69 67 6e 65 64 20 69 6e 20 73 is designed in s
9830: 75 63 68 20 61 20 77 61 79 20 74 68 61 74 20 61 uch a way that a
9840: 6e 79 20 63 6f 6d 70 6c 65 78 69 74 79 20 61 6e ny complexity an
9850: 64 20 64 69 66 66 69 63 75 6c 74 79 20 72 65 71 d difficulty req
9860: 75 69 72 65 64 20 69 6e 20 6f 72 64 65 72 20 74 uired in order t
9870: 6f 20 64 69 72 65 63 74 6c 79 20 68 61 6e 64 6c o directly handl
9880: 65 20 6d 61 74 72 69 63 69 61 6c 20 6f 70 65 72 e matricial oper
9890: 61 74 69 6f 6e 73 20 69 73 20 63 6f 6d 70 6c 65 ations is comple
98a0: 74 65 6c 79 20 68 69 64 64 65 6e 2e 3c 62 72 3e tely hidden.<br>
98b0: 0d 0a 59 6f 75 20 61 72 65 20 73 69 6d 70 6c 79 ..You are simply
98c0: 20 72 65 71 75 69 72 65 64 20 74 6f 20 63 68 61 required to cha
98d0: 69 6e 20 73 65 76 65 72 61 6c 20 65 6c 65 6d 65 in several eleme
98e0: 6e 74 61 72 79 20 74 72 61 6e 73 66 6f 72 6d 61 ntary transforma
98f0: 74 69 6f 6e 73 2c 20 65 61 63 68 20 6f 6e 65 20 tions, each one
9900: 6f 66 20 74 68 65 6d 20 62 61 73 69 63 61 6c 6c of them basicall
9910: 79 20 73 69 6d 70 6c 65 2c 20 69 6e 20 74 68 65 y simple, in the
9920: 20 63 6f 72 72 65 63 74 20 73 65 71 75 65 6e 63 correct sequenc
9930: 65 20 61 6e 64 20 74 68 61 74 27 73 20 61 62 73 e and that's abs
9940: 6f 6c 75 74 65 6c 79 20 61 6c 6c 2e 3c 62 72 3e olutely all.<br>
9950: 0d 0a 3c 62 3e 41 54 4d 3c 2f 62 3e 20 53 51 4c ..<b>ATM</b> SQL
9960: 20 66 75 6e 63 74 69 6f 6e 73 20 77 69 6c 6c 20 functions will
9970: 3c 69 3e 3c 75 3e 6d 61 67 69 63 61 6c 6c 79 20 <i><u>magically
9980: 61 6e 64 20 73 69 6c 65 6e 74 6c 79 3c 2f 75 3e and silently</u>
9990: 3c 2f 69 3e 20 6b 65 65 70 20 63 61 72 65 20 6f </i> keep care o
99a0: 66 20 61 6e 79 20 6d 61 74 68 65 6d 61 74 69 63 f any mathematic
99b0: 61 6c 20 63 6f 6d 70 6c 65 78 69 74 79 2e 3c 62 al complexity.<b
99c0: 72 3e 3c 62 72 3e 20 20 0d 0a 3c 68 72 3e 3c 62 r><br> ..<hr><b
99d0: 72 3e 0d 0a 3c 61 20 68 72 65 66 3d 22 68 74 74 r>..<a href="htt
99e0: 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 ps://www.gaia-gi
99f0: 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c 69 62 73 s.it/fossil/libs
9a00: 70 61 74 69 61 6c 69 74 65 2f 77 69 6b 69 3f 6e patialite/wiki?n
9a10: 61 6d 65 3d 34 2e 32 2e 30 2d 64 6f 63 22 3e 62 ame=4.2.0-doc">b
9a20: 61 63 6b 3c 2f 61 3e 0a 5a 20 63 39 31 31 37 33 ack</a>.Z c91173
9a30: 36 62 38 31 36 30 31 65 37 63 30 36 65 32 66 33 6b81601e7c06e2f3
9a40: 64 38 36 32 36 34 65 39 34 31 0a d86264e941.