Hex Artifact Content
Not logged in

Artifact e9901177b5ce8b06bc412598df3503cbe3328686:

Wiki page [Affine Transform] by bradh 2015-05-28 11:39:00.
0000: 44 20 32 30 31 35 2d 30 35 2d 32 38 54 31 31 3a  D 2015-05-28T11:
0010: 33 39 3a 30 30 2e 39 30 32 0a 4c 20 41 66 66 69  39:00.902.L Affi
0020: 6e 65 5c 73 54 72 61 6e 73 66 6f 72 6d 0a 50 20  ne\sTransform.P 
0030: 61 65 65 35 38 64 65 65 39 32 36 39 37 62 38 31  aee58dee92697b81
0040: 36 35 37 39 34 64 39 64 65 31 63 33 39 31 38 35  65794d9de1c39185
0050: 34 64 65 64 65 37 64 33 0a 55 20 62 72 61 64 68  4dede7d3.U bradh
0060: 0a 57 20 34 31 31 35 38 0a 3c 61 20 68 72 65 66  .W 41158.<a href
0070: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61  ="https://www.ga
0080: 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c  ia-gis.it/fossil
0090: 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77  /libspatialite/w
00a0: 69 6b 69 3f 6e 61 6d 65 3d 34 2e 32 2e 30 2d 64  iki?name=4.2.0-d
00b0: 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 0d 0a 3c 68  oc">back</a>..<h
00c0: 32 3e 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f  2>Affine Transfo
00d0: 72 6d 61 74 69 6f 6e 73 3c 2f 68 32 3e 0d 0a 53  rmations</h2>..S
00e0: 74 61 72 74 69 6e 67 20 77 69 74 68 20 76 65 72  tarting with ver
00f0: 73 69 6f 6e 20 3c 62 3e 34 2e 33 2e 30 3c 2f 62  sion <b>4.3.0</b
0100: 3e 20 53 70 61 74 69 61 4c 69 74 65 20 73 75 70  > SpatiaLite sup
0110: 70 6f 72 74 73 20 73 65 76 65 72 61 6c 20 6e 65  ports several ne
0120: 77 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 73 20  w SQL functions 
0130: 62 61 73 65 64 20 6f 6e 20 3c 61 20 68 72 65 66  based on <a href
0140: 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69  ="http://en.wiki
0150: 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 41  pedia.org/wiki/A
0160: 66 66 69 6e 65 5f 74 72 61 6e 73 66 6f 72 6d 61  ffine_transforma
0170: 74 69 6f 6e 22 3e 61 66 66 69 6e 65 20 74 72 61  tion">affine tra
0180: 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 3c 2f 61 3e  nsformations</a>
0190: 2c 3c 62 72 3e 0d 0a 55 6e 64 65 72 73 74 61 6e  ,<br>..Understan
01a0: 64 69 6e 67 20 61 6e 64 20 6d 61 73 74 65 72 69  ding and masteri
01b0: 6e 67 20 61 6c 6c 20 74 68 65 20 75 6e 64 65 72  ng all the under
01c0: 6c 79 69 6e 67 20 6d 61 74 68 65 6d 61 74 69 63  lying mathematic
01d0: 73 20 63 6f 75 6c 64 20 65 61 73 69 6c 79 20 62  s could easily b
01e0: 65 20 61 20 72 61 74 68 65 72 20 64 69 66 66 69  e a rather diffi
01f0: 63 75 6c 74 20 74 61 73 6b 2c 20 65 73 70 65 63  cult task, espec
0200: 69 61 6c 6c 79 20 69 66 20 79 6f 75 20 68 61 76  ially if you hav
0210: 65 20 61 62 73 6f 6c 75 74 65 6c 79 20 6e 6f 20  e absolutely no 
0220: 66 61 6d 69 6c 69 61 72 69 74 79 20 77 69 74 68  familiarity with
0230: 20 74 68 69 73 20 6b 69 6e 64 20 6f 66 20 6f 70   this kind of op
0240: 65 72 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 53 6f  eration.<br>..So
0250: 20 77 65 27 6c 6c 20 73 74 61 72 74 20 73 6c 6f   we'll start slo
0260: 77 6c 79 20 61 6e 64 20 73 69 6d 70 6c 79 20 62  wly and simply b
0270: 79 20 66 69 72 73 74 20 69 6e 74 72 6f 64 75 63  y first introduc
0280: 69 6e 67 20 61 20 76 65 72 79 20 73 69 6d 70 6c  ing a very simpl
0290: 65 20 70 72 61 63 74 69 63 61 6c 20 65 78 61 6d  e practical exam
02a0: 70 6c 65 20 62 61 73 65 64 20 6f 6e 20 61 20 6a  ple based on a j
02b0: 6f 6b 65 20 61 62 6f 75 74 20 74 68 65 20 67 65  oke about the ge
02c0: 6f 67 72 61 70 68 79 20 6f 66 20 49 74 61 6c 79  ography of Italy
02d0: 20 61 6e 64 20 53 69 63 69 6c 79 2e 3c 62 72 3e   and Sicily.<br>
02e0: 0d 0a 3c 68 32 3e 46 61 6e 63 79 20 47 65 6f 67  ..<h2>Fancy Geog
02f0: 72 61 70 68 79 20 61 6e 64 20 61 6d 75 73 69 6e  raphy and amusin
0300: 67 20 4d 61 74 68 3c 2f 68 32 3e 0d 0a 3c 74 61  g Math</h2>..<ta
0310: 62 6c 65 20 62 6f 72 64 65 72 3d 22 31 22 20 63  ble border="1" c
0320: 65 6c 6c 73 70 61 63 69 6e 67 3d 22 34 22 20 63  ellspacing="4" c
0330: 65 6c 6c 70 61 64 64 69 6e 67 3d 22 38 22 3e 0d  ellpadding="8">.
0340: 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 50  .<tr><td>..<h3>P
0350: 72 65 70 61 72 69 6e 67 20 74 6f 20 73 74 61 72  reparing to star
0360: 74 3c 2f 68 33 3e 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c  t</h3>..<ol>..<l
0370: 69 3e 64 6f 77 6e 6c 6f 61 64 20 74 68 65 20 3c  i>download the <
0380: 61 20 68 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f  a href="https://
0390: 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f  www.gaia-gis.it/
03a0: 67 61 69 61 2d 73 69 6e 73 2f 61 66 66 69 6e 65  gaia-sins/affine
03b0: 2d 70 69 63 73 2f 69 74 61 6c 79 2e 7a 69 70 22  -pics/italy.zip"
03c0: 3e 73 61 6d 70 6c 65 20 64 61 74 61 73 65 74 3c  >sample dataset<
03d0: 2f 61 3e 3c 62 72 3e 0d 0a 28 69 74 20 73 69 6d  /a><br>..(it sim
03e0: 70 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 73 20  ply corresponds 
03f0: 74 6f 20 61 20 73 6c 69 67 68 74 6c 79 20 6d 6f  to a slightly mo
0400: 64 69 66 69 65 64 20 76 65 63 74 6f 72 20 6d 61  dified vector ma
0410: 70 20 6f 66 20 49 74 61 6c 79 27 73 20 52 65 67  p of Italy's Reg
0420: 69 6f 6e 73 20 61 73 20 6f 72 69 67 69 6e 61 6c  ions as original
0430: 6c 79 20 72 65 6c 65 61 73 65 64 20 62 79 20 3c  ly released by <
0440: 61 20 68 72 65 66 3f 22 68 74 74 70 3a 2f 2f 77  a href?"http://w
0450: 77 77 2e 69 73 74 61 74 2e 69 74 2f 69 74 2f 61  ww.istat.it/it/a
0460: 72 63 68 69 76 69 6f 2f 31 30 34 33 31 37 22 3e  rchivio/104317">
0470: 49 53 54 41 54 3c 2f 61 3e 20 75 6e 64 65 72 20  ISTAT</a> under 
0480: 43 43 2d 42 59 20 6c 69 63 65 6e 73 65 20 74 65  CC-BY license te
0490: 72 6d 73 29 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  rms).</li>..<li>
04a0: 3c 69 3e 75 6e 7a 69 70 3c 2f 69 3e 20 74 68 65  <i>unzip</i> the
04b0: 20 64 6f 77 6e 6c 6f 61 64 65 64 20 64 61 74 61   downloaded data
04c0: 73 65 74 20 61 6e 64 20 69 6d 70 6f 72 74 20 74  set and import t
04d0: 68 65 20 53 68 61 70 65 66 69 6c 65 20 69 6e 74  he Shapefile int
04e0: 6f 20 61 20 53 70 61 74 69 61 4c 69 74 65 20 44  o a SpatiaLite D
04f0: 42 20 66 69 6c 65 2e 0d 0a 54 68 65 20 61 70 70  B file...The app
0500: 72 6f 70 72 69 61 74 65 20 69 6d 70 6f 72 74 20  ropriate import 
0510: 73 65 74 74 69 6e 67 73 20 61 72 65 20 73 68 6f  settings are sho
0520: 77 6e 20 69 6e 20 74 68 65 20 73 69 64 65 20 66  wn in the side f
0530: 69 67 75 72 65 3a 3c 62 72 3e 0d 0a 3c 69 3e 53  igure:<br>..<i>S
0540: 52 49 44 3c 2f 69 3e 3d 3c 62 3e 33 32 36 33 32  RID</i>=<b>32632
0550: 3c 2f 62 3e 2c 20 3c 69 3e 63 68 61 72 73 65 74  </b>, <i>charset
0560: 3c 2f 69 3e 3d 3c 62 3e 43 50 31 32 35 32 3c 2f  </i>=<b>CP1252</
0570: 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 45 78  b>.</li>..<li>Ex
0580: 74 72 61 63 74 20 53 69 63 69 6c 79 20 69 6e 74  tract Sicily int
0590: 6f 20 61 20 73 65 70 61 72 61 74 65 20 64 61 74  o a separate dat
05a0: 61 62 61 73 65 20 74 61 62 6c 65 20 62 79 20 65  abase table by e
05b0: 78 65 63 75 74 69 6e 67 20 74 68 65 20 66 6f 6c  xecuting the fol
05c0: 6c 6f 77 69 6e 67 20 53 51 4c 20 73 74 61 74 65  lowing SQL state
05d0: 6d 65 6e 74 73 3a 0d 0a 3c 76 65 72 62 61 74 69  ments:..<verbati
05e0: 6d 3e 0d 0a 43 52 45 41 54 45 20 54 41 42 4c 45  m>..CREATE TABLE
05f0: 20 73 69 63 69 6c 69 61 20 41 53 0d 0a 53 45 4c   sicilia AS..SEL
0600: 45 43 54 20 2a 20 46 52 4f 4d 20 69 74 61 6c 79  ECT * FROM italy
0610: 20 57 48 45 52 45 20 63 6f 64 5f 72 65 67 20 3d   WHERE cod_reg =
0620: 20 31 39 3b 0d 0a 0d 0a 53 45 4c 45 43 54 20 52   19;....SELECT R
0630: 65 63 6f 76 65 72 47 65 6f 6d 65 74 72 79 43 6f  ecoverGeometryCo
0640: 6c 75 6d 6e 28 27 73 69 63 69 6c 69 61 27 2c 20  lumn('sicilia', 
0650: 27 67 65 6f 6d 65 74 72 79 27 2c 20 33 32 36 33  'geometry', 3263
0660: 32 2c 20 27 4d 55 4c 54 49 50 4f 4c 59 47 4f 4e  2, 'MULTIPOLYGON
0670: 27 2c 20 27 58 59 27 29 3b 0d 0a 0d 0a 44 45 4c  ', 'XY');....DEL
0680: 45 54 45 20 46 52 4f 4d 20 69 74 61 6c 79 20 57  ETE FROM italy W
0690: 48 45 52 45 20 63 6f 64 5f 72 65 67 20 3d 20 31  HERE cod_reg = 1
06a0: 39 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 0d  9;..</verbatim>.
06b0: 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 61 74  .</li>..<li>that
06c0: 27 73 20 61 6c 6c 3a 20 79 6f 75 20 61 72 65 20  's all: you are 
06d0: 6e 6f 77 20 72 65 61 64 79 20 74 6f 20 73 74 61  now ready to sta
06e0: 72 74 20 74 68 69 73 20 66 75 6e 6e 79 20 28 61  rt this funny (a
06f0: 6e 64 20 63 65 72 74 61 69 6e 6c 79 20 6e 6f 74  nd certainly not
0700: 20 73 65 72 69 6f 75 73 29 20 74 75 74 6f 72 69   serious) tutori
0710: 61 6c 20 61 62 6f 75 74 20 41 66 66 69 6e 65 20  al about Affine 
0720: 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 2e  Transformations.
0730: 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e 0d 0a 3c 2f  </li>..</ol>..</
0740: 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73 72  td><td>..<img sr
0750: 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67  c="https://www.g
0760: 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d  aia-gis.it/gaia-
0770: 73 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 63 73  sins/affine-pics
0780: 2f 6c 6f 61 64 2d 73 68 70 2e 70 6e 67 22 20 61  /load-shp.png" a
0790: 6c 74 3d 22 6c 6f 61 64 2d 73 68 70 22 20 62 6f  lt="load-shp" bo
07a0: 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74 64 3e  rder="1">..</td>
07b0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d  </tr>..<tr><td>.
07c0: 0a 3c 68 33 3e 50 72 65 66 61 63 65 3c 2f 68 33  .<h3>Preface</h3
07d0: 3e 0d 0a 4c 6f 6f 6b 20 61 74 20 61 20 6d 61 70  >..Look at a map
07e0: 20 6f 66 20 49 74 61 6c 79 3b 20 69 74 20 61 70   of Italy; it ap
07f0: 70 65 61 72 73 20 6f 62 76 69 6f 75 73 20 61 74  pears obvious at
0800: 20 66 69 72 73 74 20 67 6c 61 6e 63 65 20 74 68   first glance th
0810: 61 74 20 53 69 63 69 6c 79 20 69 73 20 6c 6f 63  at Sicily is loc
0820: 61 74 65 64 20 69 6e 20 61 20 76 65 72 79 20 69  ated in a very i
0830: 6e 63 6f 6e 76 65 6e 69 65 6e 74 20 70 6f 73 69  nconvenient posi
0840: 74 69 6f 6e 3a 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69  tion:..<ol>..<li
0850: 3e 53 69 63 69 6c 79 20 69 73 20 70 6c 61 63 65  >Sicily is place
0860: 64 20 74 6f 6f 20 66 61 72 20 53 6f 75 74 68 20  d too far South 
0870: 61 6e 64 20 74 6f 6f 20 6d 75 63 68 20 63 6c 6f  and too much clo
0880: 73 65 20 74 6f 20 4e 6f 72 74 68 20 41 66 72 69  se to North Afri
0890: 63 61 3b 20 74 68 69 73 20 69 6d 70 6c 69 65 73  ca; this implies
08a0: 20 61 6e 20 75 6e 70 6c 65 61 73 61 6e 74 20 74   an unpleasant t
08b0: 6f 72 72 69 64 20 73 75 6d 6d 65 72 2c 20 61 6e  orrid summer, an
08c0: 64 20 74 68 69 73 20 6c 61 74 65 72 20 70 6f 73  d this later pos
08d0: 65 73 20 69 6e 20 74 75 72 6e 20 6d 61 6e 79 20  es in turn many 
08e0: 73 65 76 65 72 65 20 6c 69 6d 69 74 61 74 69 6f  severe limitatio
08f0: 6e 73 20 74 6f 20 61 67 72 69 63 75 6c 74 75 72  ns to agricultur
0900: 61 6c 20 61 63 74 69 76 69 74 69 65 73 2e 3c 2f  al activities.</
0910: 6c 69 3e 0d 0a 3c 6c 69 3e 54 68 65 20 3c 61 20  li>..<li>The <a 
0920: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e  href="http://en.
0930: 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69  wikipedia.org/wi
0940: 6b 69 2f 53 74 72 61 69 74 5f 6f 66 5f 4d 65 73  ki/Strait_of_Mes
0950: 73 69 6e 61 22 3e 53 74 72 61 69 74 20 6f 66 20  sina">Strait of 
0960: 4d 65 73 73 69 6e 61 3c 2f 61 3e 20 69 73 20 65  Messina</a> is e
0970: 78 61 67 67 65 72 61 74 65 64 6c 79 20 6e 61 72  xaggeratedly nar
0980: 72 6f 77 2c 20 74 68 75 73 20 70 6f 73 69 6e 67  row, thus posing
0990: 20 73 65 76 65 72 65 20 73 61 66 65 74 79 20 72   severe safety r
09a0: 69 73 6b 73 20 20 74 6f 20 74 68 65 20 6e 61 76  isks  to the nav
09b0: 69 67 61 74 69 6f 6e 20 6f 66 20 63 61 70 69 74  igation of capit
09c0: 61 6c 20 73 68 69 70 73 2c 20 62 69 67 20 63 6f  al ships, big co
09d0: 6e 74 61 69 6e 65 72 20 73 68 69 70 73 2c 20 63  ntainer ships, c
09e0: 72 75 69 73 65 20 6c 69 6e 65 72 73 20 61 6e 64  ruise liners and
09f0: 20 73 75 70 65 72 74 61 6e 6b 65 72 73 2e 3c 62   supertankers.<b
0a00: 72 3e 0d 0a 45 76 65 6e 20 77 6f 72 73 65 2c 20  r>..Even worse, 
0a10: 66 72 6f 6d 20 74 69 6d 65 20 74 6f 20 74 69 6d  from time to tim
0a20: 65 20 73 6f 6d 65 20 63 72 61 7a 79 20 70 6f 6c  e some crazy pol
0a30: 69 74 69 63 69 61 6e 20 73 74 61 72 74 73 20 73  itician starts s
0a40: 74 72 6f 6e 67 6c 79 20 61 64 76 6f 63 61 74 69  trongly advocati
0a50: 6e 67 20 74 68 65 20 76 65 72 79 20 73 74 75 70  ng the very stup
0a60: 69 64 20 69 64 65 61 20 74 6f 20 62 75 69 6c 64  id idea to build
0a70: 20 61 6e 20 69 6e 63 72 65 64 69 62 6c 79 20 63   an incredibly c
0a80: 6f 73 74 6c 79 20 3c 61 20 68 72 65 66 3d 22 68  ostly <a href="h
0a90: 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64  ttp://en.wikiped
0aa0: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 53 74 72 61  ia.org/wiki/Stra
0ab0: 69 74 5f 6f 66 5f 4d 65 73 73 69 6e 61 5f 42 72  it_of_Messina_Br
0ac0: 69 64 67 65 22 3e 62 72 69 64 67 65 20 63 72 6f  idge">bridge cro
0ad0: 73 73 69 6e 67 20 74 68 65 20 53 74 72 61 69 74  ssing the Strait
0ae0: 3c 2f 61 3e 2c 20 63 6f 6d 70 6c 65 74 65 6c 79  </a>, completely
0af0: 20 6f 76 65 72 6c 6f 6f 6b 69 6e 67 20 74 68 65   overlooking the
0b00: 20 76 65 72 79 20 68 69 67 68 20 73 65 69 73 6d   very high seism
0b10: 69 63 20 72 69 73 6b 20 6f 66 20 74 68 69 73 20  ic risk of this 
0b20: 64 69 73 74 72 69 63 74 20 61 6e 64 20 64 65 6c  district and del
0b30: 69 62 65 72 61 74 65 6c 79 20 66 6f 72 67 65 74  iberately forget
0b40: 74 69 6e 67 20 74 68 61 74 20 69 6e 20 31 39 30  ting that in 190
0b50: 38 20 62 6f 74 68 20 74 6f 77 6e 73 20 6f 66 20  8 both towns of 
0b60: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a href="http://
0b70: 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67  en.wikipedia.org
0b80: 2f 77 69 6b 69 2f 31 39 30 38 5f 4d 65 73 73 69  /wiki/1908_Messi
0b90: 6e 61 5f 65 61 72 74 68 71 75 61 6b 65 22 3e 4d  na_earthquake">M
0ba0: 65 73 73 69 6e 61 20 61 6e 64 20 52 65 67 67 69  essina and Reggi
0bb0: 6f 20 43 61 6c 61 62 72 69 61 3c 2f 61 3e 20 77  o Calabria</a> w
0bc0: 65 72 65 20 63 6f 6d 70 6c 65 74 65 6c 79 20 64  ere completely d
0bd0: 65 73 74 72 6f 79 65 64 20 62 79 20 61 6e 20 65  estroyed by an e
0be0: 61 72 74 68 71 75 61 6b 65 20 66 6f 6c 6c 6f 77  arthquake follow
0bf0: 65 64 20 62 79 20 61 20 74 73 75 6e 61 6d 69 2e  ed by a tsunami.
0c00: 3c 62 72 3e 0d 0a 4d 6f 72 65 20 74 68 61 6e 20  <br>..More than 
0c10: 31 32 30 2c 30 30 30 20 70 65 6f 70 6c 65 73 20  120,000 peoples 
0c20: 6c 6f 73 74 20 74 68 65 69 72 20 6c 69 76 65 73  lost their lives
0c30: 2c 20 61 6e 64 20 69 74 20 77 61 73 20 6f 6e 65  , and it was one
0c40: 20 6f 66 20 74 68 65 20 6d 6f 73 74 20 66 72 69   of the most fri
0c50: 67 68 74 65 6e 69 6e 67 20 6e 61 74 75 72 61 6c  ghtening natural
0c60: 20 64 69 73 61 73 74 65 72 73 20 72 65 67 69 73   disasters regis
0c70: 74 65 72 65 64 20 69 6e 20 45 75 72 6f 70 65 20  tered in Europe 
0c80: 64 75 72 69 6e 67 20 6d 6f 64 65 72 6e 20 74 69  during modern ti
0c90: 6d 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e  mes.</li>..</ol>
0ca0: 0d 0a 53 6f 20 77 65 27 6c 6c 20 69 6d 6d 65 64  ..So we'll immed
0cb0: 69 61 74 65 6c 79 20 73 74 61 72 74 20 61 20 74  iately start a t
0cc0: 68 65 6f 72 65 74 69 63 61 6c 20 63 61 73 65 20  heoretical case 
0cd0: 73 74 75 64 79 20 69 6e 74 65 6e 64 65 64 20 74  study intended t
0ce0: 6f 20 69 64 65 6e 74 69 66 79 20 61 20 70 6f 73  o identify a pos
0cf0: 73 69 62 6c 65 20 61 6c 74 65 72 6e 61 74 69 76  sible alternativ
0d00: 65 20 6c 6f 63 61 74 69 6f 6e 20 66 6f 72 20 53  e location for S
0d10: 69 63 69 6c 79 2e 3c 62 72 3e 0d 0a 49 6e 63 69  icily.<br>..Inci
0d20: 64 65 6e 74 61 6c 6c 79 20 77 65 27 6c 6c 20 75  dentally we'll u
0d30: 73 65 20 74 68 65 20 6e 65 77 20 53 51 4c 20 66  se the new SQL f
0d40: 75 6e 63 74 69 6f 6e 73 20 62 61 73 65 64 20 6f  unctions based o
0d50: 6e 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f  n Affine Transfo
0d60: 72 6d 61 74 69 6f 6e 73 20 66 6f 72 20 74 68 69  rmations for thi
0d70: 73 20 74 61 73 6b 2e 3c 62 72 3e 0d 0a 4c 65 74  s task.<br>..Let
0d80: 27 73 20 67 6f 20 6f 6e 2e 20 20 0d 0a 3c 2f 74  's go on.  ..</t
0d90: 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73 72 63  d><td>..<img src
0da0: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61  ="https://www.ga
0db0: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73  ia-gis.it/gaia-s
0dc0: 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 63 73 2f  ins/affine-pics/
0dd0: 73 69 63 69 6c 79 5f 30 2e 70 6e 67 22 20 61 6c  sicily_0.png" al
0de0: 74 3d 22 73 69 63 69 6c 79 2d 30 22 20 62 6f 72  t="sicily-0" bor
0df0: 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74 64 3e 3c  der="1">..</td><
0e00: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a  /tr>..<tr><td>..
0e10: 3c 68 33 3e 53 74 65 70 20 23 31 3a 20 74 72 61  <h3>Step #1: tra
0e20: 6e 73 6c 61 74 69 6e 67 20 53 69 63 69 6c 79 20  nslating Sicily 
0e30: 69 6e 74 6f 20 61 20 6d 6f 72 65 20 63 6f 6e 76  into a more conv
0e40: 65 6e 69 65 6e 74 20 70 6f 73 69 74 69 6f 6e 3c  enient position<
0e50: 2f 68 33 3e 0d 0a 54 68 65 72 65 20 69 73 20 70  /h3>..There is p
0e60: 6c 65 6e 74 79 20 6f 66 20 66 72 65 65 20 72 6f  lenty of free ro
0e70: 6f 6d 20 69 6e 20 74 68 65 20 4c 6f 77 65 72 20  om in the Lower 
0e80: 54 79 72 72 68 65 6e 69 61 6e 20 53 65 61 2c 20  Tyrrhenian Sea, 
0e90: 73 6f 20 77 65 27 6c 6c 20 73 74 61 72 74 20 62  so we'll start b
0ea0: 79 20 61 70 70 6c 79 69 6e 67 20 61 20 3c 61 20  y applying a <a 
0eb0: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e  href="http://en.
0ec0: 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69  wikipedia.org/wi
0ed0: 6b 69 2f 54 72 61 6e 73 6c 61 74 69 6f 6e 5f 25  ki/Translation_%
0ee0: 32 38 67 65 6f 6d 65 74 72 79 25 32 39 22 3e 74  28geometry%29">t
0ef0: 72 61 6e 73 6c 61 74 69 6f 6e 3c 2f 61 3e 20 74  ranslation</a> t
0f00: 6f 20 53 69 63 69 6c 79 3a 20 74 68 69 73 20 70  o Sicily: this p
0f10: 72 61 63 74 69 63 61 6c 6c 79 20 6d 65 61 6e 73  ractically means
0f20: 20 61 64 64 69 6e 67 20 28 6f 72 20 73 75 62 74   adding (or subt
0f30: 72 61 63 74 69 6e 67 29 20 61 20 63 6f 6e 73 74  racting) a const
0f40: 61 6e 74 20 76 61 6c 75 65 20 74 6f 20 74 68 65  ant value to the
0f50: 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 6f 6e 20   coordinates on 
0f60: 62 6f 74 68 20 3c 62 3e 78 3c 2f 62 3e 20 61 6e  both <b>x</b> an
0f70: 64 20 3c 62 3e 79 3c 2f 62 3e 20 61 78 65 73 2e  d <b>y</b> axes.
0f80: 3c 62 72 3e 0d 0a 41 66 74 65 72 20 61 20 76 65  <br>..After a ve
0f90: 72 79 20 71 75 69 63 6b 20 65 78 61 6d 69 6e 61  ry quick examina
0fa0: 74 69 6f 6e 20 6d 6f 76 69 6e 67 20 53 69 63 69  tion moving Sici
0fb0: 6c 79 20 3c 62 3e 31 35 30 20 6b 6d 3c 2f 62 3e  ly <b>150 km</b>
0fc0: 20 28 69 2e 65 2e 20 3c 62 3e 31 35 30 2c 30 30   (i.e. <b>150,00
0fd0: 30 20 6d 3c 2f 62 3e 29 20 77 65 73 74 77 61 72  0 m</b>) westwar
0fe0: 64 20 61 6e 64 20 3c 62 3e 31 35 30 20 6b 6d 3c  d and <b>150 km<
0ff0: 2f 62 3e 20 6e 6f 72 74 68 77 61 72 64 20 73 65  /b> northward se
1000: 65 6d 73 20 74 6f 20 62 65 20 61 6e 20 61 62 73  ems to be an abs
1010: 6f 6c 75 74 65 6c 79 20 72 65 61 73 6f 6e 61 62  olutely reasonab
1020: 6c 65 20 63 68 6f 69 63 65 2e 3c 62 72 3e 0d 0a  le choice.<br>..
1030: 53 6f 20 75 73 69 6e 67 20 74 68 65 20 41 66 66  So using the Aff
1040: 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69  ine Transformati
1050: 6f 6e 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 73  on SQL functions
1060: 20 77 65 27 6c 6c 20 64 75 6c 79 20 65 78 65 63   we'll duly exec
1070: 75 74 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e  ute the followin
1080: 67 20 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 3a  g SQL statement:
1090: 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 43 52  ..<verbatim>..CR
10a0: 45 41 54 45 20 54 41 42 4c 45 20 73 69 63 69 6c  EATE TABLE sicil
10b0: 69 61 5f 31 20 41 53 0d 0a 53 45 4c 45 43 54 20  ia_1 AS..SELECT 
10c0: 63 6f 64 5f 72 65 67 2c 20 0d 0a 20 20 20 41 54  cod_reg, ..   AT
10d0: 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 67 65 6f 6d  M_Transform(geom
10e0: 65 74 72 79 2c 0d 0a 20 20 20 20 20 20 41 54 4d  etry,..      ATM
10f0: 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61 74 65  _CreateTranslate
1100: 28 2d 31 35 30 30 30 30 2c 20 31 35 30 30 30 30  (-150000, 150000
1110: 29 29 20 41 53 20 67 65 6f 6d 0d 0a 46 52 4f 4d  )) AS geom..FROM
1120: 20 73 69 63 69 6c 69 61 3b 0d 0a 0d 0a 53 45 4c   sicilia;....SEL
1130: 45 43 54 20 52 65 63 6f 76 65 72 47 65 6f 6d 65  ECT RecoverGeome
1140: 74 72 79 43 6f 6c 75 6d 6e 28 27 73 69 63 69 6c  tryColumn('sicil
1150: 69 61 5f 31 27 2c 20 27 67 65 6f 6d 27 2c 20 33  ia_1', 'geom', 3
1160: 32 36 33 32 2c 20 27 4d 55 4c 54 49 50 4f 4c 59  2632, 'MULTIPOLY
1170: 47 4f 4e 27 2c 20 27 58 59 27 29 3b 0d 0a 3c 2f  GON', 'XY');..</
1180: 76 65 72 62 61 74 69 6d 3e 20 0d 0a 3c 62 3e 52  verbatim> ..<b>R
1190: 65 6d 61 72 6b 73 3c 2f 62 3e 3a 0d 0a 3c 75 6c  emarks</b>:..<ul
11a0: 3e 0d 0a 3c 6c 69 3e 61 6c 6c 20 61 66 66 69 6e  >..<li>all affin
11b0: 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  e transformation
11c0: 20 72 65 6c 61 74 65 64 20 53 51 4c 20 66 75 6e   related SQL fun
11d0: 63 74 69 6f 6e 20 6e 61 6d 65 73 20 73 74 61 72  ction names star
11e0: 74 20 77 69 74 68 20 61 6e 20 3c 62 3e 41 54 4d  t with an <b>ATM
11f0: 5f 3c 2f 62 3e 20 70 72 65 66 69 78 3a 20 74 68  _</b> prefix: th
1200: 69 73 20 73 69 6d 70 6c 79 20 73 74 61 6e 64 73  is simply stands
1210: 20 66 6f 72 20 3c 69 3e 3c 62 3e 3c 75 3e 41 3c   for <i><b><u>A<
1220: 2f 75 3e 3c 2f 62 3e 66 66 69 6e 65 20 3c 62 3e  /u></b>ffine <b>
1230: 3c 75 3e 54 3c 2f 75 3e 3c 2f 62 3e 72 61 6e 73  <u>T</u></b>rans
1240: 66 6f 72 6d 61 74 69 6f 6e 20 3c 62 3e 3c 75 3e  formation <b><u>
1250: 4d 3c 2f 75 3e 3c 2f 62 3e 61 74 72 69 78 3c 2f  M</u></b>atrix</
1260: 69 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62  i>.</li>..<li><b
1270: 3e 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 29  >ATM_Transform()
1280: 3c 2f 62 3e 20 69 73 20 76 65 72 79 20 73 69 6d  </b> is very sim
1290: 69 6c 61 72 20 74 6f 20 3c 62 3e 53 54 5f 54 72  ilar to <b>ST_Tr
12a0: 61 6e 73 66 6f 72 6d 28 29 3c 2f 62 3e 3b 20 74  ansform()</b>; t
12b0: 68 65 20 6d 6f 73 74 20 6f 62 76 69 6f 75 73 20  he most obvious 
12c0: 64 69 66 66 65 72 65 6e 63 65 20 69 73 20 69 6e  difference is in
12d0: 20 74 68 61 74 20 61 6c 6c 20 74 72 61 6e 73 66   that all transf
12e0: 6f 72 6d 61 74 69 6f 6e 20 61 72 67 75 6d 65 6e  ormation argumen
12f0: 74 73 20 61 72 65 20 6e 6f 77 20 65 78 70 65 63  ts are now expec
1300: 74 65 64 20 74 6f 20 62 65 20 70 61 73 73 65 64  ted to be passed
1310: 20 69 6e 20 74 68 65 20 66 6f 72 6d 20 6f 66 20   in the form of 
1320: 61 6e 20 61 70 70 72 6f 70 72 69 61 74 65 20 3c  an appropriate <
1330: 62 3e 42 4c 4f 42 2d 73 65 72 69 61 6c 69 7a 65  b>BLOB-serialize
1340: 64 3c 2f 62 3e 20 41 66 66 69 6e 65 20 54 72 61  d</b> Affine Tra
1350: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72  nsformation Matr
1360: 69 78 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62  ix.</li>..<li><b
1370: 3e 41 54 4d 5f 43 72 65 61 74 65 54 72 61 6e 73  >ATM_CreateTrans
1380: 6c 61 74 65 28 29 3c 2f 62 3e 20 73 69 6d 70 6c  late()</b> simpl
1390: 79 20 69 73 20 61 6e 20 53 51 4c 20 66 75 6e 63  y is an SQL func
13a0: 74 69 6f 6e 20 72 65 74 75 72 6e 69 6e 67 20 61  tion returning a
13b0: 20 3c 62 3e 42 4c 4f 42 2d 73 65 72 69 61 6c 69   <b>BLOB-seriali
13c0: 7a 65 64 3c 2f 62 3e 20 41 66 66 69 6e 65 20 54  zed</b> Affine T
13d0: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61  ransformation Ma
13e0: 74 72 69 78 20 69 6e 69 74 69 61 6c 69 7a 65 64  trix initialized
13f0: 20 69 6e 20 73 75 63 68 20 61 20 77 61 79 20 74   in such a way t
1400: 6f 20 72 65 70 72 65 73 65 6e 74 20 61 20 73 69  o represent a si
1410: 6d 70 6c 65 20 3c 62 3e 32 44 20 54 72 61 6e 73  mple <b>2D Trans
1420: 6c 61 74 65 3c 2f 62 3e 20 61 63 63 6f 72 64 69  late</b> accordi
1430: 6e 67 6c 79 20 74 6f 20 3c 62 3e 28 74 78 2c 20  ngly to <b>(tx, 
1440: 74 79 29 3c 2f 62 3e 20 61 72 67 75 6d 65 6e 74  ty)</b> argument
1450: 73 2e 3c 62 72 3e 0d 0a 59 6f 75 20 63 6f 75 6c  s.<br>..You coul
1460: 64 20 65 76 65 6e 74 75 61 6c 6c 79 20 64 65 66  d eventually def
1470: 69 6e 65 20 61 20 63 6f 6d 70 6c 65 74 65 20 3c  ine a complete <
1480: 62 3e 33 44 20 54 72 61 6e 73 6c 61 74 65 3c 2f  b>3D Translate</
1490: 62 3e 20 62 79 20 70 61 73 73 69 6e 67 20 3c 62  b> by passing <b
14a0: 3e 28 74 78 2c 20 74 79 2c 20 74 7a 29 3c 2f 62  >(tx, ty, tz)</b
14b0: 3e 20 61 72 67 75 6d 65 6e 74 73 2c 20 62 75 74  > arguments, but
14c0: 20 74 68 69 73 20 69 73 6e 27 74 20 73 74 72 69   this isn't stri
14d0: 63 74 6c 79 20 72 65 71 75 69 72 65 64 20 69 6e  ctly required in
14e0: 20 6f 75 72 20 63 75 72 72 65 6e 74 20 65 78 61   our current exa
14f0: 6d 70 6c 65 2e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f  mple...</ul>..</
1500: 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73 72  td><td>..<img sr
1510: 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67  c="https://www.g
1520: 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d  aia-gis.it/gaia-
1530: 73 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 63 73  sins/affine-pics
1540: 2f 73 69 63 69 6c 79 5f 31 2e 70 6e 67 22 20 61  /sicily_1.png" a
1550: 6c 74 3d 22 73 69 63 69 6c 69 61 2d 31 22 20 62  lt="sicilia-1" b
1560: 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74 64  order="1">..</td
1570: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  ></tr>..<tr><td>
1580: 0d 0a 3c 68 33 3e 53 74 65 70 20 23 32 3a 20 72  ..<h3>Step #2: r
1590: 6f 74 61 74 69 6e 67 20 53 69 63 69 6c 79 20 73  otating Sicily s
15a0: 6f 20 74 6f 20 67 65 74 20 61 20 6e 69 63 65 20  o to get a nice 
15b0: 68 6f 72 69 7a 6f 6e 74 61 6c 20 61 6c 69 67 6e  horizontal align
15c0: 6d 65 6e 74 3c 2f 68 33 3e 0d 0a 41 6c 69 67 6e  ment</h3>..Align
15d0: 69 6e 67 20 74 68 65 20 73 6f 75 74 68 65 72 6e  ing the southern
15e0: 20 73 68 6f 72 65 73 20 6f 66 20 53 69 63 69 6c   shores of Sicil
15f0: 79 20 74 6f 20 61 6e 20 61 6c 6d 6f 73 74 20 68  y to an almost h
1600: 6f 72 69 7a 6f 6e 74 61 6c 20 6c 69 6e 65 20 77  orizontal line w
1610: 69 6c 6c 20 73 75 72 65 6c 79 20 6c 65 61 64 20  ill surely lead 
1620: 74 6f 20 61 20 6d 6f 72 65 20 6e 69 63 65 6c 79  to a more nicely
1630: 20 6f 72 64 65 72 65 64 20 6c 61 79 6f 75 74 3a   ordered layout:
1640: 20 73 6f 20 77 65 20 68 61 76 65 20 6e 6f 77 20   so we have now 
1650: 74 6f 20 61 70 70 6c 79 20 61 20 3c 61 20 68 72  to apply a <a hr
1660: 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69  ef="http://en.wi
1670: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69  kipedia.org/wiki
1680: 2f 52 6f 74 61 74 69 6f 6e 5f 25 32 38 6d 61 74  /Rotation_%28mat
1690: 68 65 6d 61 74 69 63 73 25 32 39 22 3e 63 6f 75  hematics%29">cou
16a0: 6e 74 65 72 63 6c 6f 63 6b 77 69 73 65 20 72 6f  nterclockwise ro
16b0: 74 61 74 69 6f 6e 3c 2f 61 3e 20 6f 66 20 61 62  tation</a> of ab
16c0: 6f 75 74 20 3c 62 3e 32 35 2e 30 20 64 65 67 72  out <b>25.0 degr
16d0: 65 65 73 3c 2f 62 3e 2e 3c 62 72 3e 0d 0a 54 68  ees</b>.<br>..Th
16e0: 61 6e 6b 73 20 74 6f 20 41 66 66 69 6e 65 20 54  anks to Affine T
16f0: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 2c 20  ransformations, 
1700: 77 65 20 63 61 6e 20 63 6f 6d 62 69 6e 65 20 62  we can combine b
1710: 6f 74 68 20 74 68 65 20 70 72 65 76 69 6f 75 73  oth the previous
1720: 20 74 72 61 6e 73 6c 61 74 69 6f 6e 20 61 6e 64   translation and
1730: 20 74 68 65 20 63 75 72 72 65 6e 74 20 72 6f 74   the current rot
1740: 61 74 69 6f 6e 20 69 6e 74 6f 20 61 20 73 69 6e  ation into a sin
1750: 67 6c 65 20 6d 6f 76 65 6d 65 6e 74 20 28 61 20  gle movement (a 
1760: 73 6f 20 63 61 6c 6c 65 64 20 3c 62 3e 72 6f 74  so called <b>rot
1770: 6f 74 72 61 6e 73 6c 61 74 69 6f 6e 3c 2f 62 3e  otranslation</b>
1780: 29 2e 3c 62 72 3e 0d 0a 57 65 20 73 69 6d 70 6c  ).<br>..We simpl
1790: 79 20 68 61 76 65 20 74 6f 20 65 78 65 63 75 74  y have to execut
17a0: 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20  e the following 
17b0: 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 3a 0d 0a  SQL statement:..
17c0: 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 43 52 45 41  <verbatim>..CREA
17d0: 54 45 20 54 41 42 4c 45 20 73 69 63 69 6c 69 61  TE TABLE sicilia
17e0: 5f 32 20 41 53 0d 0a 53 45 4c 45 43 54 20 63 6f  _2 AS..SELECT co
17f0: 64 5f 72 65 67 2c 20 0d 0a 20 20 20 41 54 4d 5f  d_reg, ..   ATM_
1800: 54 72 61 6e 73 66 6f 72 6d 28 67 65 6f 6d 65 74  Transform(geomet
1810: 72 79 2c 0d 0a 20 20 20 20 20 20 41 54 4d 5f 54  ry,..      ATM_T
1820: 72 61 6e 73 6c 61 74 65 28 0d 0a 20 20 20 20 20  ranslate(..     
1830: 20 20 20 20 41 54 4d 5f 54 72 61 6e 73 6c 61 74      ATM_Translat
1840: 65 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20  e(..            
1850: 41 54 4d 5f 52 6f 74 61 74 65 28 0d 0a 20 20 20  ATM_Rotate(..   
1860: 20 20 20 20 20 20 20 20 20 20 20 20 41 54 4d 5f              ATM_
1870: 43 72 65 61 74 65 54 72 61 6e 73 6c 61 74 65 28  CreateTranslate(
1880: 2d 63 78 2c 20 2d 63 79 29 2c 0d 0a 20 20 20 20  -cx, -cy),..    
1890: 20 20 20 20 20 20 20 20 32 35 29 2c 0d 0a 20 20          25),..  
18a0: 20 20 20 20 20 20 20 63 78 2c 20 63 79 29 2c 0d         cx, cy),.
18b0: 0a 20 20 20 20 20 20 2d 31 35 30 30 30 30 2c 20  .      -150000, 
18c0: 31 35 30 30 30 30 29 0d 0a 20 20 20 29 20 41 53  150000)..   ) AS
18d0: 20 67 65 6f 6d 0d 0a 46 52 4f 4d 20 28 53 45 4c   geom..FROM (SEL
18e0: 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 53 54 5f  ECT cod_reg, ST_
18f0: 58 28 63 65 6e 74 72 6f 69 64 29 20 41 53 20 63  X(centroid) AS c
1900: 78 2c 20 53 54 5f 59 28 63 65 6e 74 72 6f 69 64  x, ST_Y(centroid
1910: 29 20 41 53 20 63 79 2c 20 67 65 6f 6d 65 74 72  ) AS cy, geometr
1920: 79 0d 0a 20 20 20 20 20 20 46 52 4f 4d 20 28 53  y..      FROM (S
1930: 45 4c 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 53  ELECT cod_reg, S
1940: 54 5f 43 65 6e 74 72 6f 69 64 28 67 65 6f 6d 65  T_Centroid(geome
1950: 74 72 79 29 20 41 53 20 63 65 6e 74 72 6f 69 64  try) AS centroid
1960: 2c 20 67 65 6f 6d 65 74 72 79 20 0d 0a 20 20 20  , geometry ..   
1970: 20 20 20 20 20 20 20 20 20 46 52 4f 4d 20 73 69           FROM si
1980: 63 69 6c 69 61 29 20 41 53 20 67 31 0d 0a 29 20  cilia) AS g1..) 
1990: 41 53 20 67 32 3b 0d 0a 0d 0a 53 45 4c 45 43 54  AS g2;....SELECT
19a0: 20 52 65 63 6f 76 65 72 47 65 6f 6d 65 74 72 79   RecoverGeometry
19b0: 43 6f 6c 75 6d 6e 28 27 73 69 63 69 6c 69 61 5f  Column('sicilia_
19c0: 32 27 2c 20 27 67 65 6f 6d 27 2c 20 33 32 36 33  2', 'geom', 3263
19d0: 32 2c 20 27 4d 55 4c 54 49 50 4f 4c 59 47 4f 4e  2, 'MULTIPOLYGON
19e0: 27 2c 20 27 58 59 27 29 3b 0d 0a 3c 2f 76 65 72  ', 'XY');..</ver
19f0: 62 61 74 69 6d 3e 20 20 0d 0a 3c 62 3e 52 65 6d  batim>  ..<b>Rem
1a00: 61 72 6b 73 3c 2f 62 3e 3a 0d 0a 3c 75 6c 3e 0d  arks</b>:..<ul>.
1a10: 0a 3c 6c 69 3e 63 6f 72 72 65 63 74 6c 79 20 68  .<li>correctly h
1a20: 61 6e 64 6c 69 6e 67 20 52 6f 74 61 74 65 20 69  andling Rotate i
1a30: 73 20 61 20 6c 69 74 74 6c 65 20 62 69 74 20 6d  s a little bit m
1a40: 6f 72 65 20 64 69 66 66 69 63 75 6c 74 2e 0d 0a  ore difficult...
1a50: 41 6e 79 20 72 6f 74 61 74 69 6f 6e 20 77 69 6c  Any rotation wil
1a60: 6c 20 61 6c 77 61 79 73 20 69 6d 70 6c 79 20 61  l always imply a
1a70: 20 3c 62 3e 66 69 78 65 64 20 63 65 6e 74 65 72   <b>fixed center
1a80: 20 70 6f 69 6e 74 3c 2f 62 3e 2c 20 61 6e 64 20   point</b>, and 
1a90: 62 79 20 64 65 66 61 75 6c 74 20 74 68 69 73 20  by default this 
1aa0: 69 73 20 65 78 61 63 74 6c 79 20 70 6c 61 63 65  is exactly place
1ab0: 64 20 61 74 20 74 68 65 20 63 6f 6f 72 64 69 6e  d at the coordin
1ac0: 61 74 65 73 20 6f 72 69 67 69 6e 3a 20 3c 62 3e  ates origin: <b>
1ad0: 28 30 2c 20 30 29 3c 2f 62 3e 2e 3c 2f 6c 69 3e  (0, 0)</b>.</li>
1ae0: 0d 0a 3c 6c 69 3e 73 6f 20 61 20 76 65 72 79 20  ..<li>so a very 
1af0: 6e 61 69 76 65 20 61 74 74 65 6d 70 74 20 74 6f  naive attempt to
1b00: 20 64 69 72 65 63 74 6c 79 20 69 6e 76 6f 6b 65   directly invoke
1b10: 20 3c 62 3e 41 54 4d 5f 52 6f 74 61 74 65 28 32   <b>ATM_Rotate(2
1b20: 35 29 3c 2f 62 3e 20 77 69 6c 6c 20 73 69 6d 70  5)</b> will simp
1b30: 6c 79 20 72 65 6c 6f 63 61 74 65 20 53 69 63 69  ly relocate Sici
1b40: 6c 79 20 69 6e 20 53 6f 75 74 68 65 72 6e 20 53  ly in Southern S
1b50: 70 61 69 6e 2c 20 61 6e 64 20 74 68 69 73 20 61  pain, and this a
1b60: 62 73 6f 6c 75 74 65 6c 79 20 69 73 6e 27 74 20  bsolutely isn't 
1b70: 6f 75 72 20 69 6e 74 65 6e 74 69 6f 6e 2e 3c 2f  our intention.</
1b80: 6c 69 3e 0d 0a 3c 6c 69 3e 77 68 61 74 20 77 65  li>..<li>what we
1b90: 20 72 65 61 6c 6c 79 20 6e 65 65 64 20 69 73 20   really need is 
1ba0: 61 20 6d 6f 72 65 20 63 6f 6d 70 6c 65 78 20 73  a more complex s
1bb0: 65 71 75 65 6e 63 65 20 6f 66 20 63 68 61 69 6e  equence of chain
1bc0: 65 64 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f  ed transformatio
1bd0: 6e 73 3a 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 77  ns:..<ol>..<li>w
1be0: 65 27 6c 6c 20 73 74 61 72 74 20 66 69 72 73 74  e'll start first
1bf0: 20 62 79 20 63 72 65 61 74 69 6e 67 20 61 20 6e   by creating a n
1c00: 65 77 20 3c 62 3e 42 4c 4f 42 2d 4d 61 74 72 69  ew <b>BLOB-Matri
1c10: 78 3c 2f 62 3e 20 69 6e 74 65 6e 64 65 64 20 74  x</b> intended t
1c20: 6f 20 72 65 6c 6f 63 61 74 65 20 53 69 63 69 6c  o relocate Sicil
1c30: 79 27 73 20 3c 61 20 68 72 65 66 3d 22 68 74 74  y's <a href="htt
1c40: 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61  p://en.wikipedia
1c50: 2e 6f 72 67 2f 77 69 6b 69 2f 43 65 6e 74 72 6f  .org/wiki/Centro
1c60: 69 64 22 3e 63 65 6e 74 72 6f 69 64 3c 2f 61 3e  id">centroid</a>
1c70: 20 65 78 61 63 74 6c 79 20 6f 6e 20 74 68 65 20   exactly on the 
1c80: 63 6f 6f 72 64 69 6e 61 74 65 73 20 6f 72 69 67  coordinates orig
1c90: 69 6e 3a 20 3c 62 3e 41 54 4d 5f 43 72 65 61 74  in: <b>ATM_Creat
1ca0: 65 54 72 61 6e 73 6c 61 74 65 28 2d 63 78 2c 20  eTranslate(-cx, 
1cb0: 2d 63 79 29 3c 2f 62 3e 3c 2f 6c 69 3e 20 0d 0a  -cy)</b></li> ..
1cc0: 3c 6c 69 3e 6e 6f 77 20 77 65 20 63 61 6e 20 73  <li>now we can s
1cd0: 61 66 65 6c 79 20 63 68 61 69 6e 20 74 68 65 20  afely chain the 
1ce0: 69 6e 74 65 6e 64 65 64 20 52 6f 74 61 74 65 3a  intended Rotate:
1cf0: 20 3c 62 3e 41 54 4d 5f 52 6f 74 61 74 65 28 61   <b>ATM_Rotate(a
1d00: 74 6d 2d 62 6c 6f 62 2c 20 32 35 29 3c 2f 62 3e  tm-blob, 25)</b>
1d10: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 61 66 74 65 72  </li>..<li>after
1d20: 20 61 70 70 6c 79 69 6e 67 20 52 6f 74 61 74 65   applying Rotate
1d30: 20 77 65 20 68 61 76 65 20 6e 6f 77 20 74 6f 20   we have now to 
1d40: 72 65 73 74 6f 72 65 20 74 68 65 20 69 6e 69 74  restore the init
1d50: 69 61 6c 20 70 6f 73 69 74 69 6f 6e 3a 20 3c 62  ial position: <b
1d60: 3e 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 61  >ATM_Translate(a
1d70: 74 6d 2d 62 6c 6f 62 2c 20 63 78 2c 20 63 79 29  tm-blob, cx, cy)
1d80: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 61  </b></li>..<li>a
1d90: 6e 64 20 66 69 6e 61 6c 6c 79 20 77 65 27 6c 6c  nd finally we'll
1da0: 20 61 70 70 6c 79 20 74 68 65 20 54 72 61 6e 73   apply the Trans
1db0: 6c 61 74 69 6f 6e 20 69 6e 74 65 6e 64 65 64 20  lation intended 
1dc0: 74 6f 20 72 65 70 6f 73 69 74 69 6f 6e 20 53 69  to reposition Si
1dd0: 63 69 6c 79 20 77 65 73 74 77 61 72 64 20 61 6e  cily westward an
1de0: 64 20 6e 6f 72 74 68 77 61 72 64 3a 20 3c 62 3e  d northward: <b>
1df0: 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 61 74  ATM_Translate(at
1e00: 6d 2d 62 6c 6f 62 2c 20 2d 31 35 30 30 30 30 2c  m-blob, -150000,
1e10: 20 31 35 30 30 30 30 29 3c 2f 62 3e 3c 62 72 3e   150000)</b><br>
1e20: 0d 0a 3c 69 3e 77 65 27 76 65 20 75 73 65 64 20  ..<i>we've used 
1e30: 74 77 6f 20 73 65 70 61 72 61 74 65 20 74 72 61  two separate tra
1e40: 6e 73 6c 61 74 69 6f 6e 73 20 73 69 6d 70 6c 79  nslations simply
1e50: 20 66 6f 72 20 64 69 64 61 63 74 69 63 20 63 6c   for didactic cl
1e60: 61 72 69 74 79 3a 20 77 65 20 63 6f 75 6c 64 20  arity: we could 
1e70: 65 61 73 69 6c 79 20 6d 65 72 67 65 20 62 6f 74  easily merge bot
1e80: 68 20 74 68 65 6d 20 69 6e 74 6f 20 61 20 73 69  h them into a si
1e90: 6e 67 6c 65 20 74 72 61 6e 73 6c 61 74 69 6f 6e  ngle translation
1ea0: 3a 3c 62 72 3e 20 41 54 4d 5f 54 72 61 6e 73 6c  :<br> ATM_Transl
1eb0: 61 74 65 28 61 74 6d 2d 62 6c 6f 62 2c 20 63 78  ate(atm-blob, cx
1ec0: 20 2d 20 31 35 30 30 30 30 2c 20 63 79 20 2b 20   - 150000, cy + 
1ed0: 31 35 30 30 30 30 29 3c 2f 69 3e 3c 2f 6c 69 3e  150000)</i></li>
1ee0: 0d 0a 3c 6c 69 3e 74 68 69 73 20 77 61 79 20 3c  ..<li>this way <
1ef0: 62 3e 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28  b>ATM_Transform(
1f00: 29 3c 2f 62 3e 20 77 69 6c 6c 20 72 65 63 65 69  )</b> will recei
1f10: 76 65 20 74 68 65 20 66 69 6e 61 6c 20 3c 62 3e  ve the final <b>
1f20: 42 4c 4f 42 2d 4d 61 74 72 69 78 3c 2f 62 3e 20  BLOB-Matrix</b> 
1f30: 72 65 73 75 6c 74 69 6e 67 20 62 79 20 63 68 61  resulting by cha
1f40: 69 6e 69 6e 67 20 61 6c 6c 20 74 68 65 20 61 62  ining all the ab
1f50: 6f 76 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 69  ove transformati
1f60: 6f 6e 20 73 74 65 70 73 20 69 6e 20 74 68 65 20  on steps in the 
1f70: 63 6f 72 72 65 63 74 20 73 65 71 75 65 6e 63 65  correct sequence
1f80: 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e 3c 2f 6c  .</li>..</ol></l
1f90: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 3c 75 3e 56 65  i>..<li><b><u>Ve
1fa0: 72 79 20 69 6d 70 6f 72 74 61 6e 74 20 6e 6f 74  ry important not
1fb0: 69 63 65 3c 2f 75 3e 3c 2f 62 3e 3a 20 41 66 66  ice</u></b>: Aff
1fc0: 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69  ine Transformati
1fd0: 6f 6e 73 20 3c 75 3e 61 72 65 20 6e 6f 74 20 63  ons <u>are not c
1fe0: 6f 6d 6d 75 74 61 74 69 76 65 3c 2f 75 3e 3a 20  ommutative</u>: 
1ff0: 74 68 65 20 72 65 6c 61 74 69 76 65 20 6f 72 64  the relative ord
2000: 65 72 20 6f 66 20 73 75 62 73 65 71 75 65 6e 74  er of subsequent
2010: 20 6f 70 65 72 61 74 69 6f 6e 73 20 69 6e 20 61   operations in a
2020: 20 63 6f 6d 70 6c 65 78 20 74 72 61 6e 73 66 6f   complex transfo
2030: 72 6d 61 74 69 6f 6e 20 63 68 61 69 6e 20 73 68  rmation chain sh
2040: 6f 75 6c 64 20 61 6c 77 61 79 73 20 62 65 20 76  ould always be v
2050: 65 72 79 20 63 61 72 65 66 75 6c 6c 79 20 63 6f  ery carefully co
2060: 6e 73 69 64 65 72 65 64 2e 3c 2f 6c 69 3e 0d 0a  nsidered.</li>..
2070: 3c 6c 69 3e 61 6c 6c 20 74 68 65 20 3c 62 3e 46  <li>all the <b>F
2080: 52 4f 4d 20 28 53 45 4c 45 43 54 20 2e 2e 2e 20  ROM (SELECT ... 
2090: 46 52 4f 4d 20 28 53 45 4c 45 43 54 20 2e 2e 2e  FROM (SELECT ...
20a0: 29 20 41 53 20 67 31 29 20 41 53 20 67 32 3c 2f  ) AS g1) AS g2</
20b0: 62 3e 20 73 74 75 66 66 20 73 69 6d 70 6c 79 20  b> stuff simply 
20c0: 69 73 20 61 20 72 61 74 68 65 72 20 74 72 69 76  is a rather triv
20d0: 69 61 6c 20 53 51 4c 20 74 72 69 63 6b 20 62 61  ial SQL trick ba
20e0: 73 65 64 20 6f 6e 20 74 77 6f 20 6e 65 73 74 65  sed on two neste
20f0: 64 20 73 75 62 2d 71 75 65 72 69 65 73 2e 3c 62  d sub-queries.<b
2100: 72 3e 0d 0a 49 74 27 73 20 69 6e 74 65 6e 64 65  r>..It's intende
2110: 64 20 73 63 6f 70 65 20 69 73 20 73 69 6d 70 6c  d scope is simpl
2120: 79 20 74 6f 20 61 76 6f 69 64 20 6d 75 6c 74 69  y to avoid multi
2130: 70 6c 65 20 63 61 6c 6c 73 20 74 6f 20 53 54 5f  ple calls to ST_
2140: 43 65 6e 74 72 6f 69 64 28 29 2c 20 53 54 5f 58  Centroid(), ST_X
2150: 28 29 20 61 6e 64 20 53 54 5f 59 28 29 20 69 6e  () and ST_Y() in
2160: 20 6f 72 64 65 72 20 74 6f 20 67 65 74 20 74 68   order to get th
2170: 65 20 63 65 6e 74 72 6f 69 64 20 63 6f 6f 72 64  e centroid coord
2180: 69 6e 61 74 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f  inates.</li>..</
2190: 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 0d 0a  ul>..</td><td>..
21a0: 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73 3a  <img src="https:
21b0: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69  //www.gaia-gis.i
21c0: 74 2f 67 61 69 61 2d 73 69 6e 73 2f 61 66 66 69  t/gaia-sins/affi
21d0: 6e 65 2d 70 69 63 73 2f 73 69 63 69 6c 79 5f 32  ne-pics/sicily_2
21e0: 2e 70 6e 67 22 20 61 6c 74 3d 22 73 69 63 69 6c  .png" alt="sicil
21f0: 69 61 2d 32 22 20 62 6f 72 64 65 72 3d 22 31 22  ia-2" border="1"
2200: 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  >..</td></tr>..<
2210: 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 53 74 65  tr><td>..<h3>Ste
2220: 70 20 23 33 3a 20 69 6e 66 6c 61 74 69 6e 67 20  p #3: inflating 
2230: 61 6e 64 20 72 65 73 68 61 70 69 6e 67 20 53 69  and reshaping Si
2240: 63 69 6c 79 3c 2f 68 33 3e 0d 0a 41 6e 20 69 6e  cily</h3>..An in
2250: 63 72 65 61 73 65 64 20 73 75 72 66 61 63 65 20  creased surface 
2260: 69 73 20 73 75 72 65 6c 79 20 77 65 6c 63 6f 6d  is surely welcom
2270: 65 2c 20 62 65 63 61 75 73 65 20 69 74 20 61 75  e, because it au
2280: 74 6f 6d 61 74 69 63 61 6c 6c 79 20 69 6d 70 6c  tomatically impl
2290: 69 65 73 20 6d 6f 72 65 20 61 67 72 69 63 75 6c  ies more agricul
22a0: 74 75 72 61 6c 20 6c 61 6e 64 73 3a 20 6f 6e 20  tural lands: on 
22b0: 74 68 65 20 6f 74 68 65 72 20 68 61 6e 64 20 73  the other hand s
22c0: 68 6f 72 74 65 6e 69 6e 67 20 61 20 6c 69 74 74  hortening a litt
22d0: 6c 65 20 62 69 74 20 74 68 65 20 6c 65 6e 67 74  le bit the lengt
22e0: 68 20 6f 66 20 74 68 65 20 73 6f 75 74 68 65 72  h of the souther
22f0: 6e 20 63 6f 61 73 74 6c 69 6e 65 20 77 69 6c 6c  n coastline will
2300: 20 73 75 72 65 6c 79 20 66 61 63 69 6c 69 74 61   surely facilita
2310: 74 65 20 6d 6f 62 69 6c 69 74 79 20 61 6e 64 20  te mobility and 
2320: 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 2e 3c  communications.<
2330: 62 72 3e 0d 0a 53 6f 20 77 65 27 6c 6c 20 6e 6f  br>..So we'll no
2340: 77 20 61 70 70 6c 79 20 61 20 3c 61 20 68 72 65  w apply a <a hre
2350: 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b  f="http://en.wik
2360: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f  ipedia.org/wiki/
2370: 53 63 61 6c 69 6e 67 5f 25 32 38 67 65 6f 6d 65  Scaling_%28geome
2380: 74 72 79 25 32 39 22 3e 73 63 61 6c 69 6e 67 3c  try%29">scaling<
2390: 2f 61 3e 20 74 72 61 6e 73 66 6f 72 6d 61 74 69  /a> transformati
23a0: 6f 6e 20 75 73 69 6e 67 20 74 77 6f 20 64 69 66  on using two dif
23b0: 66 65 72 65 6e 74 20 76 61 6c 75 65 73 3a 20 3c  ferent values: <
23c0: 62 3e 73 78 3d 30 2e 39 3c 2f 62 3e 20 61 6e 64  b>sx=0.9</b> and
23d0: 20 3c 62 3e 73 79 3d 31 2e 33 3c 2f 62 3e 2e 3c   <b>sy=1.3</b>.<
23e0: 62 72 3e 0d 0a 4f 6e 63 65 20 61 67 61 69 6e 2c  br>..Once again,
23f0: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72   Affine Transfor
2400: 6d 61 74 69 6f 6e 73 20 65 6e 61 62 6c 65 20 75  mations enable u
2410: 73 20 74 6f 20 63 6f 6d 62 69 6e 65 20 61 6c 74  s to combine alt
2420: 6f 67 65 74 68 65 72 20 62 6f 74 68 20 74 72 61  ogether both tra
2430: 6e 73 6c 61 74 65 2c 20 72 6f 74 61 74 65 20 61  nslate, rotate a
2440: 6e 64 20 73 63 61 6c 65 20 69 6e 74 6f 20 61 20  nd scale into a 
2450: 73 69 6e 67 6c 65 20 74 72 61 6e 73 66 6f 72 6d  single transform
2460: 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 54 68 69 73  ation.<br>..This
2470: 20 69 73 20 74 68 65 20 63 6f 72 72 65 73 70 6f   is the correspo
2480: 6e 64 69 6e 67 20 53 51 4c 20 73 74 61 74 65 6d  nding SQL statem
2490: 65 6e 74 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e  ent:..<verbatim>
24a0: 0d 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 73  ..CREATE TABLE s
24b0: 69 63 69 6c 69 61 5f 33 20 41 53 0d 0a 53 45 4c  icilia_3 AS..SEL
24c0: 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 0d 0a 20  ECT cod_reg, .. 
24d0: 20 20 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28    ATM_Transform(
24e0: 67 65 6f 6d 65 74 72 79 2c 0d 0a 20 20 20 20 20  geometry,..     
24f0: 20 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 0d   ATM_Translate(.
2500: 0a 20 20 20 20 20 20 20 20 20 41 54 4d 5f 54 72  .         ATM_Tr
2510: 61 6e 73 6c 61 74 65 28 0d 0a 20 20 20 20 20 20  anslate(..      
2520: 20 20 20 20 20 20 41 54 4d 5f 53 63 61 6c 65 28        ATM_Scale(
2530: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ..              
2540: 20 41 54 4d 5f 52 6f 74 61 74 65 28 0d 0a 20 20   ATM_Rotate(..  
2550: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
2560: 41 54 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c  ATM_CreateTransl
2570: 61 74 65 28 2d 63 78 2c 20 2d 63 79 29 2c 0d 0a  ate(-cx, -cy),..
2580: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 32                 2
2590: 35 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20  5),..           
25a0: 20 30 2e 39 2c 20 31 2e 33 29 2c 0d 0a 20 20 20   0.9, 1.3),..   
25b0: 20 20 20 20 20 20 63 78 2c 20 63 79 29 2c 0d 0a        cx, cy),..
25c0: 20 20 20 20 20 20 2d 31 35 30 30 30 30 2c 20 31        -150000, 1
25d0: 35 30 30 30 30 29 0d 0a 20 20 20 29 20 41 53 20  50000)..   ) AS 
25e0: 67 65 6f 6d 0d 0a 46 52 4f 4d 20 28 53 45 4c 45  geom..FROM (SELE
25f0: 43 54 20 63 6f 64 5f 72 65 67 2c 20 53 54 5f 58  CT cod_reg, ST_X
2600: 28 63 65 6e 74 72 6f 69 64 29 20 41 53 20 63 78  (centroid) AS cx
2610: 2c 20 53 54 5f 59 28 63 65 6e 74 72 6f 69 64 29  , ST_Y(centroid)
2620: 20 41 53 20 63 79 2c 20 67 65 6f 6d 65 74 72 79   AS cy, geometry
2630: 0d 0a 20 20 20 20 20 20 46 52 4f 4d 20 28 53 45  ..      FROM (SE
2640: 4c 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 53 54  LECT cod_reg, ST
2650: 5f 43 65 6e 74 72 6f 69 64 28 67 65 6f 6d 65 74  _Centroid(geomet
2660: 72 79 29 20 41 53 20 63 65 6e 74 72 6f 69 64 2c  ry) AS centroid,
2670: 20 67 65 6f 6d 65 74 72 79 20 0d 0a 20 20 20 20   geometry ..    
2680: 20 20 20 20 20 20 20 20 46 52 4f 4d 20 73 69 63          FROM sic
2690: 69 6c 69 61 29 20 41 53 20 67 31 0d 0a 29 20 41  ilia) AS g1..) A
26a0: 53 20 67 32 3b 0d 0a 0d 0a 53 45 4c 45 43 54 20  S g2;....SELECT 
26b0: 52 65 63 6f 76 65 72 47 65 6f 6d 65 74 72 79 43  RecoverGeometryC
26c0: 6f 6c 75 6d 6e 28 27 73 69 63 69 6c 69 61 5f 33  olumn('sicilia_3
26d0: 27 2c 20 27 67 65 6f 6d 27 2c 20 33 32 36 33 32  ', 'geom', 32632
26e0: 2c 20 27 4d 55 4c 54 49 50 4f 4c 59 47 4f 4e 27  , 'MULTIPOLYGON'
26f0: 2c 20 27 58 59 27 29 3b 0d 0a 3c 2f 76 65 72 62  , 'XY');..</verb
2700: 61 74 69 6d 3e 20 0d 0a 3c 62 3e 52 65 6d 61 72  atim> ..<b>Remar
2710: 6b 73 3c 2f 62 3e 3a 0d 0a 3c 75 6c 3e 0d 0a 3c  ks</b>:..<ul>..<
2720: 6c 69 3e 74 68 65 72 65 20 69 73 20 6e 6f 74 68  li>there is noth
2730: 69 6e 67 20 72 65 61 6c 6c 79 20 6e 65 77 20 69  ing really new i
2740: 6e 20 74 68 69 73 3a 20 77 65 27 6c 6c 20 73 69  n this: we'll si
2750: 6d 70 6c 79 20 63 68 61 69 6e 20 79 65 74 20 61  mply chain yet a
2760: 6e 6f 74 68 65 72 20 74 72 61 6e 73 66 6f 72 6d  nother transform
2770: 61 74 69 6f 6e 20 69 6e 20 74 68 65 20 61 70 70  ation in the app
2780: 72 6f 70 72 69 61 74 65 20 73 65 71 75 65 6e 63  ropriate sequenc
2790: 65 20 6f 72 64 65 72 2e 3c 2f 6c 69 3e 0d 0a 3c  e order.</li>..<
27a0: 6c 69 3e 3c 62 3e 41 54 4d 5f 53 63 61 6c 65 28  li><b>ATM_Scale(
27b0: 61 74 6d 2d 62 6c 6f 62 2c 20 73 78 2c 20 73 79  atm-blob, sx, sy
27c0: 29 3c 2f 62 3e 20 69 73 20 69 6e 74 65 6e 64 65  )</b> is intende
27d0: 64 20 66 6f 72 20 74 68 65 20 73 69 6d 70 6c 65  d for the simple
27e0: 72 20 3c 62 3e 32 44 3c 2f 62 3e 20 63 61 73 65  r <b>2D</b> case
27f0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 6e 20 74  .</li>..<li>in t
2800: 68 65 20 6d 6f 72 65 20 67 65 6e 65 72 61 6c 20  he more general 
2810: 3c 62 3e 33 44 3c 2f 62 3e 20 63 61 73 65 20 79  <b>3D</b> case y
2820: 6f 75 20 63 61 6e 20 69 6e 76 6f 6b 65 20 3c 62  ou can invoke <b
2830: 3e 41 54 4d 5f 53 63 61 6c 65 28 61 74 6d 2d 62  >ATM_Scale(atm-b
2840: 6c 6f 62 2c 20 73 78 2c 20 73 79 2c 20 73 7a 29  lob, sx, sy, sz)
2850: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  </b></li>..</ul>
2860: 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d  ..</td><td>..<im
2870: 67 20 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77  g src="https://w
2880: 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67  ww.gaia-gis.it/g
2890: 61 69 61 2d 73 69 6e 73 2f 61 66 66 69 6e 65 2d  aia-sins/affine-
28a0: 70 69 63 73 2f 73 69 63 69 6c 79 5f 33 2e 70 6e  pics/sicily_3.pn
28b0: 67 22 20 61 6c 74 3d 22 73 69 63 69 6c 69 61 2d  g" alt="sicilia-
28c0: 33 22 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a  3" border="1">..
28d0: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
28e0: 3c 74 64 3e 0d 0a 3c 68 33 3e 53 74 65 70 20 23  <td>..<h3>Step #
28f0: 34 3a 20 66 69 6e 61 6c 20 74 6f 75 63 68 3a 20  4: final touch: 
2900: 72 65 66 6c 65 63 74 69 6e 67 20 53 69 63 69 6c  reflecting Sicil
2910: 79 3c 2f 68 33 3e 0d 0a 41 20 72 65 66 6c 65 63  y</h3>..A reflec
2920: 74 65 64 20 53 69 63 69 6c 79 20 70 72 65 73 65  ted Sicily prese
2930: 6e 74 73 20 6d 61 6e 79 20 69 6e 74 65 72 65 73  nts many interes
2940: 74 69 6e 67 20 61 64 76 61 6e 74 61 67 65 73 3a  ting advantages:
2950: 20 77 65 27 6c 6c 20 65 78 61 6d 69 6e 65 20 61   we'll examine a
2960: 6c 6c 20 74 68 65 6d 20 69 6e 20 66 75 6c 6c 20  ll them in full 
2970: 64 65 74 61 69 6c 20 69 6e 20 74 68 65 20 66 69  detail in the fi
2980: 6e 61 6c 20 63 6f 6e 63 6c 75 73 69 6f 6e 73 20  nal conclusions 
2990: 6f 66 20 74 68 65 20 70 72 65 73 65 6e 74 20 73  of the present s
29a0: 74 75 64 79 2e 3c 62 72 3e 0d 0a 53 6f 20 77 65  tudy.<br>..So we
29b0: 27 6c 6c 20 6e 6f 77 20 61 70 70 6c 79 20 61 20  'll now apply a 
29c0: 66 69 6e 61 6c 20 3c 61 20 68 72 65 66 3d 22 68  final <a href="h
29d0: 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64  ttp://en.wikiped
29e0: 69 61 2e 6f 72 67 2f 77 69 6b 69 2f 52 65 66 6c  ia.org/wiki/Refl
29f0: 65 63 74 69 6f 6e 5f 25 32 38 6d 61 74 68 65 6d  ection_%28mathem
2a00: 61 74 69 63 73 25 32 39 22 3e 72 65 66 6c 65 63  atics%29">reflec
2a10: 74 69 6f 6e 3c 2f 61 3e 20 74 72 61 6e 73 66 6f  tion</a> transfo
2a20: 72 6d 61 74 69 6f 6e 3b 20 74 68 69 73 20 73 69  rmation; this si
2a30: 6d 70 6c 79 20 63 6f 72 72 65 73 70 6f 6e 64 73  mply corresponds
2a40: 20 74 6f 20 61 20 3c 62 3e 31 38 30 20 64 65 67   to a <b>180 deg
2a50: 72 65 65 73 3c 2f 62 3e 20 72 6f 74 61 74 69 6f  rees</b> rotatio
2a60: 6e 20 61 72 6f 75 6e 64 20 74 68 65 20 3c 62 3e  n around the <b>
2a70: 59 20 61 78 69 73 3c 2f 62 3e 2e 3c 62 72 3e 0d  Y axis</b>.<br>.
2a80: 0a 41 6e 64 20 74 68 65 20 66 6f 6c 6c 6f 77 69  .And the followi
2a90: 6e 67 20 69 73 20 74 68 65 20 66 69 6e 61 6c 20  ng is the final 
2aa0: 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 20 61 70  SQL statement ap
2ab0: 70 6c 79 69 6e 67 20 61 6c 6c 20 74 68 65 20 61  plying all the a
2ac0: 62 6f 76 65 20 74 72 61 6e 73 66 6f 72 6d 61 74  bove transformat
2ad0: 69 6f 6e 73 20 69 6e 20 61 20 73 69 6e 67 6c 65  ions in a single
2ae0: 20 73 68 6f 74 3a 0d 0a 3c 76 65 72 62 61 74 69   shot:..<verbati
2af0: 6d 3e 0d 0a 43 52 45 41 54 45 20 54 41 42 4c 45  m>..CREATE TABLE
2b00: 20 73 69 63 69 6c 69 61 5f 34 20 41 53 0d 0a 53   sicilia_4 AS..S
2b10: 45 4c 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 0d  ELECT cod_reg, .
2b20: 0a 20 20 20 41 54 4d 5f 54 72 61 6e 73 66 6f 72  .   ATM_Transfor
2b30: 6d 28 67 65 6f 6d 65 74 72 79 2c 0d 0a 20 20 20  m(geometry,..   
2b40: 20 20 20 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65     ATM_Translate
2b50: 28 0d 0a 20 20 20 20 20 20 20 20 20 41 54 4d 5f  (..         ATM_
2b60: 54 72 61 6e 73 6c 61 74 65 28 0d 0a 20 20 20 20  Translate(..    
2b70: 20 20 20 20 20 20 20 20 41 54 4d 5f 59 52 6f 6c          ATM_YRol
2b80: 6c 28 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20  l(..            
2b90: 20 20 20 41 54 4d 5f 53 63 61 6c 65 28 0d 0a 20     ATM_Scale(.. 
2ba0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
2bb0: 20 41 54 4d 5f 52 6f 74 61 74 65 28 0d 0a 20 20   ATM_Rotate(..  
2bc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
2bd0: 20 20 20 41 54 4d 5f 43 72 65 61 74 65 54 72 61     ATM_CreateTra
2be0: 6e 73 6c 61 74 65 28 2d 63 78 2c 20 2d 63 79 29  nslate(-cx, -cy)
2bf0: 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20  ,..             
2c00: 20 20 20 20 20 32 35 29 2c 0d 0a 20 20 20 20 20       25),..     
2c10: 20 20 20 20 20 20 20 20 20 20 30 2e 39 2c 20 31            0.9, 1
2c20: 2e 33 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20  .3),..          
2c30: 20 20 31 38 30 29 2c 0d 0a 20 20 20 20 20 20 20    180),..       
2c40: 20 20 63 78 2c 20 63 79 29 2c 0d 0a 20 20 20 20    cx, cy),..    
2c50: 20 20 2d 31 35 30 30 30 30 2c 20 31 35 30 30 30    -150000, 15000
2c60: 30 29 0d 0a 20 20 20 29 20 41 53 20 67 65 6f 6d  0)..   ) AS geom
2c70: 0d 0a 46 52 4f 4d 20 28 53 45 4c 45 43 54 20 63  ..FROM (SELECT c
2c80: 6f 64 5f 72 65 67 2c 20 53 54 5f 58 28 63 65 6e  od_reg, ST_X(cen
2c90: 74 72 6f 69 64 29 20 41 53 20 63 78 2c 20 53 54  troid) AS cx, ST
2ca0: 5f 59 28 63 65 6e 74 72 6f 69 64 29 20 41 53 20  _Y(centroid) AS 
2cb0: 63 79 2c 20 67 65 6f 6d 65 74 72 79 0d 0a 20 20  cy, geometry..  
2cc0: 20 20 20 20 46 52 4f 4d 20 28 53 45 4c 45 43 54      FROM (SELECT
2cd0: 20 63 6f 64 5f 72 65 67 2c 20 53 54 5f 43 65 6e   cod_reg, ST_Cen
2ce0: 74 72 6f 69 64 28 67 65 6f 6d 65 74 72 79 29 20  troid(geometry) 
2cf0: 41 53 20 63 65 6e 74 72 6f 69 64 2c 20 67 65 6f  AS centroid, geo
2d00: 6d 65 74 72 79 20 0d 0a 20 20 20 20 20 20 20 20  metry ..        
2d10: 20 20 20 20 46 52 4f 4d 20 73 69 63 69 6c 69 61      FROM sicilia
2d20: 29 20 41 53 20 67 31 0d 0a 29 20 41 53 20 67 32  ) AS g1..) AS g2
2d30: 3b 0d 0a 0d 0a 53 45 4c 45 43 54 20 52 65 63 6f  ;....SELECT Reco
2d40: 76 65 72 47 65 6f 6d 65 74 72 79 43 6f 6c 75 6d  verGeometryColum
2d50: 6e 28 27 73 69 63 69 6c 69 61 5f 34 27 2c 20 27  n('sicilia_4', '
2d60: 67 65 6f 6d 27 2c 20 33 32 36 33 32 2c 20 27 4d  geom', 32632, 'M
2d70: 55 4c 54 49 50 4f 4c 59 47 4f 4e 27 2c 20 27 58  ULTIPOLYGON', 'X
2d80: 59 27 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d  Y');..</verbatim
2d90: 3e 20 0d 0a 3c 62 3e 52 65 6d 61 72 6b 73 3c 2f  > ..<b>Remarks</
2da0: 62 3e 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74  b>:..<ul>..<li>t
2db0: 68 65 72 65 20 61 72 65 20 73 65 76 65 72 61 6c  here are several
2dc0: 20 70 6f 73 73 69 62 6c 65 20 72 6f 74 61 74 69   possible rotati
2dd0: 6f 6e 73 20 73 75 70 70 6f 72 74 65 64 20 62 79  ons supported by
2de0: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72   Affine Transfor
2df0: 6d 61 74 69 6f 6e 3a 0d 0a 3c 6f 6c 3e 0d 0a 3c  mation:..<ol>..<
2e00: 6c 69 3e 3c 62 3e 41 54 4d 5f 52 6f 74 61 74 65  li><b>ATM_Rotate
2e10: 28 29 3c 2f 62 3e 20 61 6c 77 61 79 73 20 69 6e  ()</b> always in
2e20: 74 65 6e 64 73 20 61 20 3c 62 3e 32 44 3c 2f 62  tends a <b>2D</b
2e30: 3e 20 72 6f 74 61 74 69 6f 6e 2c 20 69 2e 65 2e  > rotation, i.e.
2e40: 20 61 20 72 6f 74 61 74 69 6f 6e 20 63 65 6e 74   a rotation cent
2e50: 65 72 65 64 20 61 72 6f 75 6e 64 20 74 68 65 20  ered around the 
2e60: 3c 62 3e 5a 20 61 78 69 73 3c 2f 62 3e 3c 2f 6c  <b>Z axis</b></l
2e70: 69 3e 0d 0a 3c 6c 69 3e 49 6e 20 74 68 65 20 6d  i>..<li>In the m
2e80: 6f 72 65 20 67 65 6e 65 72 61 6c 20 3c 62 3e 33  ore general <b>3
2e90: 44 3c 2f 62 3e 20 63 61 73 65 20 74 68 65 72 65  D</b> case there
2ea0: 20 61 72 65 20 74 68 72 65 65 20 70 6f 73 73 69   are three possi
2eb0: 62 6c 65 20 72 6f 74 61 74 69 6f 6e 73 2c 20 6f  ble rotations, o
2ec0: 6e 65 20 66 6f 72 20 65 61 63 68 20 61 78 69 73  ne for each axis
2ed0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74 68 65 20  .</li>..<li>the 
2ee0: 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20 53 51  corresponding SQ
2ef0: 4c 20 66 75 6e 63 74 69 6f 6e 73 20 61 72 65 3a  L functions are:
2f00: 20 3c 62 3e 41 54 4d 5f 58 52 6f 6c 6c 28 29 3c   <b>ATM_XRoll()<
2f10: 2f 62 3e 2c 20 3c 62 3e 41 54 4d 5f 59 52 6f 6c  /b>, <b>ATM_YRol
2f20: 6c 28 29 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 41  l()</b> and <b>A
2f30: 54 4d 5f 5a 52 6f 6c 6c 28 29 3c 2f 62 3e 3c 2f  TM_ZRoll()</b></
2f40: 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 3e 3c 75 3e 4e  li>..<li><i><u>N
2f50: 6f 74 65 3c 2f 75 3e 3a 20 41 54 4d 5f 5a 52 6f  ote</u>: ATM_ZRo
2f60: 6c 6c 28 29 20 61 6e 64 20 41 54 4d 5f 52 6f 74  ll() and ATM_Rot
2f70: 61 74 65 28 29 20 73 69 6d 70 6c 79 20 61 72 65  ate() simply are
2f80: 20 74 77 6f 20 64 69 66 66 65 72 65 6e 74 20 61   two different a
2f90: 6c 69 61 73 2d 6e 61 6d 65 73 20 66 6f 72 20 74  lias-names for t
2fa0: 68 65 20 73 61 6d 65 20 69 64 65 6e 74 69 63 61  he same identica
2fb0: 6c 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 3c 2f  l SQL function</
2fc0: 69 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e 3c  i>.</li>..</ol><
2fd0: 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c 2f 74  /li>..</ul>..</t
2fe0: 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73 72 63  d><td>..<img src
2ff0: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61  ="https://www.ga
3000: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73  ia-gis.it/gaia-s
3010: 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 63 73 2f  ins/affine-pics/
3020: 73 69 63 69 6c 79 5f 34 2e 70 6e 67 22 20 61 6c  sicily_4.png" al
3030: 74 3d 22 73 69 63 69 6c 69 61 2d 34 22 20 62 6f  t="sicilia-4" bo
3040: 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74 64 3e  rder="1">..</td>
3050: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d  </tr>..<tr><td>.
3060: 0a 3c 68 33 3e 46 69 6e 61 6c 20 63 6f 6e 73 69  .<h3>Final consi
3070: 64 65 72 61 74 69 6f 6e 73 20 61 6e 64 20 63 6f  derations and co
3080: 6e 63 6c 75 73 69 6f 6e 73 3c 2f 68 33 3e 0d 0a  nclusions</h3>..
3090: 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 41 67 72  <ol>..<li><b>Agr
30a0: 69 63 75 6c 74 75 72 65 3c 2f 62 3e 3a 20 61 66  iculture</b>: af
30b0: 74 65 72 20 61 70 70 6c 79 69 6e 67 20 74 68 65  ter applying the
30c0: 20 73 75 67 67 65 73 74 65 64 20 72 65 6c 6f 63   suggested reloc
30d0: 61 74 69 6f 6e 20 53 69 63 69 6c 79 20 77 69 6c  ation Sicily wil
30e0: 6c 20 67 61 69 6e 20 61 6e 20 69 6e 63 72 65 61  l gain an increa
30f0: 73 65 64 20 61 67 72 69 63 75 6c 74 75 72 61 6c  sed agricultural
3100: 20 73 75 72 66 61 63 65 20 61 6e 64 20 77 69 6c   surface and wil
3110: 6c 20 65 6e 6a 6f 79 20 61 20 6d 6f 72 65 20 66  l enjoy a more f
3120: 61 76 6f 75 72 61 62 6c 65 20 63 6c 69 6d 61 74  avourable climat
3130: 65 3a 20 73 74 69 6c 6c 20 73 75 6e 6e 79 20 61  e: still sunny a
3140: 6e 64 20 77 61 72 6d 20 62 75 74 20 6d 75 63 68  nd warm but much
3150: 20 6c 65 73 73 20 74 6f 72 72 69 64 20 61 6e 64   less torrid and
3160: 20 61 72 69 64 2e 0d 0a 54 68 69 73 20 77 69 6c   arid...This wil
3170: 6c 20 63 65 72 74 61 69 6e 6c 79 20 73 75 73 74  l certainly sust
3180: 61 69 6e 20 61 20 6e 6f 74 69 63 65 61 62 6c 65  ain a noticeable
3190: 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 6f 66 20   development of 
31a0: 6d 61 6e 79 20 65 63 6f 6e 6f 6d 69 63 20 61 63  many economic ac
31b0: 74 69 76 69 74 69 65 73 20 62 61 73 65 64 20 6f  tivities based o
31c0: 6e 20 61 67 72 69 2d 66 6f 6f 64 20 69 6e 64 75  n agri-food indu
31d0: 73 74 72 69 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c  stries.</li>..<l
31e0: 69 3e 3c 62 3e 54 72 61 6e 73 70 6f 72 74 61 74  i><b>Transportat
31f0: 69 6f 6e 20 73 79 73 74 65 6d 73 3c 2f 62 3e 3a  ion systems</b>:
3200: 20 74 68 65 20 73 75 67 67 65 73 74 65 64 20 6e   the suggested n
3210: 65 77 20 6c 61 79 6f 75 74 20 66 6f 72 20 74 68  ew layout for th
3220: 65 20 4c 6f 77 65 72 20 54 79 72 72 68 65 6e 69  e Lower Tyrrheni
3230: 61 6e 20 53 65 61 20 73 74 72 6f 6e 67 6c 79 20  an Sea strongly 
3240: 66 61 63 69 6c 69 74 61 74 65 73 20 74 68 65 20  facilitates the 
3250: 64 65 76 65 6c 6f 70 6d 65 6e 74 20 6f 66 20 6d  development of m
3260: 61 72 69 74 69 6d 65 20 74 72 61 6e 73 70 6f 72  aritime transpor
3270: 74 73 2e 20 53 69 63 69 6c 79 20 63 6f 75 6c 64  ts. Sicily could
3280: 20 6e 6f 77 20 62 65 63 6f 6d 65 20 74 68 65 20   now become the 
3290: 63 65 6e 74 72 61 6c 20 68 75 62 20 6f 66 20 61  central hub of a
32a0: 6e 20 65 66 66 69 63 69 65 6e 74 20 6e 65 74 77  n efficient netw
32b0: 6f 72 6b 20 6f 66 20 68 69 67 68 2d 73 70 65 65  ork of high-spee
32c0: 64 20 61 6e 64 20 68 69 67 68 2d 66 72 65 71 75  d and high-frequ
32d0: 65 6e 63 79 20 66 65 72 72 79 20 63 6f 6e 6e 65  ency ferry conne
32e0: 63 74 69 6f 6e 73 3a 0d 0a 3c 75 6c 3e 0d 0a 3c  ctions:..<ul>..<
32f0: 6c 69 3e 50 61 6c 65 72 6d 6f 20 77 69 6c 6c 20  li>Palermo will 
3300: 6e 6f 77 20 64 69 72 65 63 74 6c 79 20 66 61 63  now directly fac
3310: 65 20 4e 61 70 6c 65 73 3b 20 43 69 76 69 74 61  e Naples; Civita
3320: 76 65 63 63 68 69 61 20 28 52 6f 6d 65 29 20 73  vecchia (Rome) s
3330: 65 65 6d 73 20 74 6f 20 62 65 20 61 20 73 65 63  eems to be a sec
3340: 6f 6e 64 20 6f 62 76 69 6f 75 73 20 74 65 72 6d  ond obvious term
3350: 69 6e 61 6c 20 66 6f 72 20 64 69 72 65 63 74 20  inal for direct 
3360: 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 6c 65 61 64  connections lead
3370: 69 6e 67 20 74 6f 20 43 65 6e 74 72 61 6c 20 49  ing to Central I
3380: 74 61 6c 79 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  taly.</li>..<li>
3390: 4d 65 73 73 69 6e 61 20 77 69 6c 6c 20 61 63 71  Messina will acq
33a0: 75 69 72 65 20 61 20 64 65 63 69 73 69 76 65 20  uire a decisive 
33b0: 73 74 72 61 74 65 67 69 63 20 72 6f 6c 65 2c 20  strategic role, 
33c0: 61 6e 64 20 77 69 6c 6c 20 62 65 63 6f 6d 65 20  and will become 
33d0: 74 68 65 20 74 65 72 6d 69 6e 61 6c 20 66 6f 72  the terminal for
33e0: 20 66 65 72 72 79 20 63 6f 6e 6e 65 63 74 69 6f   ferry connectio
33f0: 6e 73 20 6c 65 61 64 69 6e 67 20 74 6f 20 43 65  ns leading to Ce
3400: 6e 74 72 61 6c 20 61 6e 64 20 4e 6f 72 74 68 65  ntral and Northe
3410: 72 6e 20 49 74 61 6c 79 3a 20 43 69 76 69 74 61  rn Italy: Civita
3420: 76 65 63 63 68 69 61 2c 20 4c 65 67 68 6f 72 6e  vecchia, Leghorn
3430: 20 61 6e 64 20 47 65 6e 6f 61 20 61 72 65 20 74   and Genoa are t
3440: 68 65 20 6f 62 76 69 6f 75 73 20 64 65 73 74 69  he obvious desti
3450: 6e 61 74 69 6f 6e 73 2e 3c 2f 6c 69 3e 0d 0a 3c  nations.</li>..<
3460: 6c 69 3e 41 20 6c 65 73 73 20 72 65 6c 65 76 61  li>A less releva
3470: 6e 74 20 28 62 75 74 20 61 6e 79 77 61 79 20 69  nt (but anyway i
3480: 6e 74 65 72 65 73 74 69 6e 67 29 20 66 65 72 72  nteresting) ferr
3490: 79 20 6c 69 6e 6b 20 77 69 6c 6c 20 6a 6f 69 6e  y link will join
34a0: 20 54 72 61 70 61 6e 69 20 61 6e 64 20 52 65 67   Trapani and Reg
34b0: 67 69 6f 20 43 61 6c 61 62 72 69 61 2e 3c 2f 6c  gio Calabria.</l
34c0: 69 3e 0d 0a 3c 6c 69 3e 53 61 72 64 69 6e 69 61  i>..<li>Sardinia
34d0: 20 61 73 20 77 65 6c 6c 20 77 69 6c 6c 20 73 74   as well will st
34e0: 72 6f 6e 67 6c 79 20 62 65 6e 65 66 69 74 20 66  rongly benefit f
34f0: 72 6f 6d 20 74 68 65 20 6e 65 77 20 6c 61 79 6f  rom the new layo
3500: 75 74 3b 20 43 61 67 6c 69 61 72 69 20 77 69 6c  ut; Cagliari wil
3510: 6c 20 62 65 20 64 69 72 65 63 74 6c 79 20 63 6f  l be directly co
3520: 6e 6e 65 63 74 65 64 20 74 6f 20 53 79 72 61 63  nnected to Syrac
3530: 75 73 65 20 28 6f 72 20 6d 61 79 20 62 65 20 41  use (or may be A
3540: 75 67 75 73 74 61 29 2c 20 61 6e 64 20 4f 6c 62  ugusta), and Olb
3550: 69 61 20 74 6f 20 4d 65 73 73 69 6e 61 2e 3c 62  ia to Messina.<b
3560: 72 3e 54 68 69 73 20 6d 65 61 6e 73 20 64 65 66  r>This means def
3570: 69 6e 69 74 65 6c 79 20 62 72 65 61 6b 69 6e 67  initely breaking
3580: 20 74 68 65 20 73 65 63 75 6c 61 72 20 69 6e 73   the secular ins
3590: 75 6c 61 74 69 6f 6e 20 6f 66 20 53 61 72 64 69  ulation of Sardi
35a0: 6e 69 61 2c 20 74 68 61 74 20 77 69 6c 6c 20 6e  nia, that will n
35b0: 6f 77 20 73 74 61 72 74 20 65 6e 6a 6f 79 69 6e  ow start enjoyin
35c0: 67 20 61 20 73 74 72 6f 6e 67 65 72 20 61 6e 64  g a stronger and
35d0: 20 6d 6f 72 65 20 65 66 66 65 63 74 69 76 65 20   more effective 
35e0: 69 6e 74 65 67 72 61 74 69 6f 6e 20 77 69 74 68  integration with
35f0: 20 53 6f 75 74 68 65 72 6e 20 49 74 61 6c 79 2e   Southern Italy.
3600: 3c 2f 6c 69 3e 20 0d 0a 3c 6c 69 3e 4c 61 73 74  </li> ..<li>Last
3610: 20 62 75 74 20 6e 6f 74 20 6c 65 61 73 74 3a 20   but not least: 
3620: 61 74 20 61 20 6d 6f 72 65 20 73 74 72 61 74 65  at a more strate
3630: 67 69 63 20 6c 65 76 65 6c 20 69 74 27 73 20 61  gic level it's a
3640: 62 73 6f 6c 75 74 65 6c 79 20 6f 62 76 69 6f 75  bsolutely obviou
3650: 73 20 74 68 61 74 20 6e 6f 77 20 73 75 70 65 72  s that now super
3660: 74 61 6e 6b 65 72 73 2c 20 62 69 67 20 63 6f 6e  tankers, big con
3670: 74 61 69 6e 65 72 20 73 68 69 70 73 20 61 6e 64  tainer ships and
3680: 20 63 72 75 69 73 65 20 6c 69 6e 65 72 73 20 63   cruise liners c
3690: 61 6e 20 66 72 65 65 6c 79 20 63 69 72 63 75 6d  an freely circum
36a0: 6e 61 76 69 67 61 74 65 20 53 69 63 69 6c 79 20  navigate Sicily 
36b0: 69 6e 20 61 6e 79 20 64 69 72 65 63 74 69 6f 6e  in any direction
36c0: 20 75 6e 64 65 72 20 75 6e 63 6f 6d 70 72 6f 6d   under uncomprom
36d0: 69 73 65 64 20 73 61 66 65 74 79 20 63 6f 6e 64  ised safety cond
36e0: 69 74 69 6f 6e 73 2e 3c 62 72 3e 0d 0a 41 6e 64  itions.<br>..And
36f0: 20 63 6f 6e 73 65 71 75 65 6e 74 6c 79 20 61 6c   consequently al
3700: 6c 20 54 79 72 72 68 65 6e 69 61 6e 20 68 61 72  l Tyrrhenian har
3710: 62 6f 72 73 20 77 69 6c 6c 20 6e 6f 77 20 62 65  bors will now be
3720: 20 64 69 72 65 63 74 6c 79 20 63 6f 6e 6e 65 63   directly connec
3730: 74 65 64 20 62 6f 74 68 20 74 6f 20 45 61 73 74  ted both to East
3740: 65 72 6e 20 61 6e 64 20 57 65 73 74 65 72 6e 20  ern and Western 
3750: 4d 65 64 69 74 65 72 72 61 6e 65 61 6e 3a 20 74  Mediterranean: t
3760: 68 69 73 20 77 69 6c 6c 20 73 75 72 65 6c 79 20  his will surely 
3770: 69 6e 64 75 63 65 20 61 20 72 65 6d 61 72 6b 61  induce a remarka
3780: 62 6c 65 20 67 72 6f 77 74 68 20 69 6e 20 74 68  ble growth in th
3790: 65 20 76 6f 6c 75 6d 65 73 20 6f 66 20 69 6e 74  e volumes of int
37a0: 65 72 6e 61 74 69 6f 6e 61 6c 20 74 72 61 66 66  ernational traff
37b0: 69 63 73 20 74 68 65 79 20 63 6f 75 6c 64 20 70  ics they could p
37c0: 6f 74 65 6e 74 69 61 6c 6c 79 20 61 74 74 72 61  otentially attra
37d0: 63 74 2e 3c 2f 6c 69 3e 20 0d 0a 3c 2f 75 6c 3e  ct.</li> ..</ul>
37e0: 3c 2f 6c 69 3e 20 0d 0a 3c 6c 69 3e 3c 62 3e 48  </li> ..<li><b>H
37f0: 65 61 76 79 20 69 6e 64 75 73 74 72 79 3c 2f 62  eavy industry</b
3800: 3e 3a 20 74 68 65 20 6e 65 77 20 74 72 61 6e 73  >: the new trans
3810: 70 6f 72 74 61 74 69 6f 6e 20 73 79 73 74 65 6d  portation system
3820: 20 73 74 72 6f 6e 67 6c 79 20 63 65 6e 74 65 72   strongly center
3830: 65 64 20 61 72 6f 75 6e 64 20 6d 61 72 69 74 69  ed around mariti
3840: 6d 65 20 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e  me communication
3850: 73 20 77 69 6c 6c 20 73 75 72 65 6c 79 20 69 6e  s will surely in
3860: 64 75 63 65 20 61 6e 20 61 63 74 69 76 65 20 72  duce an active r
3870: 65 62 69 72 74 68 20 6f 66 20 73 68 69 70 79 61  ebirth of shipya
3880: 72 64 73 2c 20 61 20 66 6c 6f 75 72 69 73 68 69  rds, a flourishi
3890: 6e 67 20 74 72 61 64 69 74 69 6f 6e 61 6c 20 65  ng traditional e
38a0: 78 63 65 6c 6c 65 6e 63 65 20 6f 66 20 6d 61 6e  xcellence of man
38b0: 79 20 73 6f 75 74 68 65 72 6e 20 72 65 67 69 6f  y southern regio
38c0: 6e 73 20 69 6e 20 70 61 73 74 20 74 69 6d 65 73  ns in past times
38d0: 20 62 75 74 20 6e 6f 77 61 64 61 79 73 20 61 20   but nowadays a 
38e0: 73 61 64 6c 79 20 64 65 63 6c 69 6e 69 6e 67 20  sadly declining 
38f0: 61 63 74 69 76 69 74 79 2e 3c 2f 6c 69 3e 0d 0a  activity.</li>..
3900: 3c 6c 69 3e 3c 62 3e 54 6f 75 72 69 73 6d 3c 2f  <li><b>Tourism</
3910: 62 3e 3a 20 61 20 72 65 61 72 72 61 6e 67 65 64  b>: a rearranged
3920: 20 4c 6f 77 65 72 20 54 79 72 72 68 65 6e 69 61   Lower Tyrrhenia
3930: 6e 20 53 65 61 20 77 69 6c 6c 20 63 65 72 74 61  n Sea will certa
3940: 69 6e 6c 79 20 62 65 63 6f 6d 65 20 61 20 76 65  inly become a ve
3950: 72 79 20 61 74 74 72 61 63 74 69 76 65 20 64 65  ry attractive de
3960: 73 74 69 6e 61 74 69 6f 6e 20 66 6f 72 20 69 6e  stination for in
3970: 74 65 72 6e 61 74 69 6f 6e 61 6c 20 74 6f 75 72  ternational tour
3980: 69 73 74 73 2e 3c 62 72 3e 0d 0a 49 74 27 73 20  ists.<br>..It's 
3990: 77 6f 72 74 68 20 6e 6f 74 69 6e 67 20 74 68 61  worth noting tha
39a0: 74 20 74 68 65 20 70 72 6f 70 6f 73 65 64 20 6c  t the proposed l
39b0: 61 79 6f 75 74 20 77 69 6c 6c 20 67 69 76 65 20  ayout will give 
39c0: 62 69 72 74 68 20 74 6f 20 61 20 77 6f 6e 64 65  birth to a wonde
39d0: 72 66 75 6c 20 69 73 6c 61 6e 64 20 67 72 6f 75  rful island grou
39e0: 70 20 65 78 74 65 6e 64 69 6e 67 20 62 65 74 77  p extending betw
39f0: 65 65 6e 20 53 69 63 69 6c 79 20 61 6e 64 20 73  een Sicily and s
3a00: 6f 75 74 68 65 72 6e 20 4c 61 7a 69 6f 20 2d 20  outhern Lazio - 
3a10: 43 61 6d 70 61 6e 69 61 3b 20 74 68 65 20 50 6f  Campania; the Po
3a20: 6e 74 69 6e 65 2c 20 41 65 6f 6c 69 61 6e 20 61  ntine, Aeolian a
3a30: 6e 64 20 47 75 6c 66 20 6f 66 20 4e 61 70 6c 65  nd Gulf of Naple
3a40: 73 20 69 73 6c 61 6e 64 73 20 77 69 6c 6c 20 62  s islands will b
3a50: 65 20 70 72 61 63 74 69 63 61 6c 6c 79 20 6d 65  e practically me
3a60: 72 67 65 64 20 69 6e 74 6f 20 61 20 73 69 6e 67  rged into a sing
3a70: 6c 65 20 61 72 63 68 69 70 65 6c 61 67 6f 2e 3c  le archipelago.<
3a80: 62 72 3e 0d 0a 53 65 76 65 72 61 6c 20 6f 66 20  br>..Several of 
3a90: 74 68 65 73 65 20 69 73 6c 61 6e 64 73 20 61 63  these islands ac
3aa0: 74 75 61 6c 6c 79 20 61 72 65 20 61 63 74 69 76  tually are activ
3ab0: 65 20 76 6f 6c 63 61 6e 6f 65 73 2c 20 61 6e 64  e volcanoes, and
3ac0: 20 74 68 65 20 6e 65 77 20 69 73 6c 61 6e 64 20   the new island 
3ad0: 63 68 61 69 6e 20 77 69 6c 6c 20 64 69 72 65 63  chain will direc
3ae0: 74 6c 79 20 6a 6f 69 6e 20 4d 6f 75 6e 74 20 45  tly join Mount E
3af0: 74 6e 61 20 61 6e 64 20 4d 6f 75 6e 74 20 56 65  tna and Mount Ve
3b00: 73 75 76 69 75 73 2e 3c 62 72 3e 0d 0a 53 6f 20  suvius.<br>..So 
3b10: 74 68 69 73 20 61 72 65 61 20 77 69 6c 6c 20 72  this area will r
3b20: 65 70 72 65 73 65 6e 74 20 74 68 65 20 6d 6f 73  epresent the mos
3b30: 74 20 69 6d 70 72 65 73 73 69 76 65 20 76 6f 6c  t impressive vol
3b40: 63 61 6e 69 63 20 66 69 65 6c 64 20 6f 66 20 45  canic field of E
3b50: 75 72 6f 70 65 20 61 6e 64 20 77 69 6c 6c 20 63  urope and will c
3b60: 65 72 74 61 69 6e 6c 79 20 62 65 63 6f 6d 65 20  ertainly become 
3b70: 61 20 6d 61 6a 6f 72 20 74 6f 75 72 69 73 74 20  a major tourist 
3b80: 61 74 74 72 61 63 74 69 6f 6e 20 74 68 61 6e 6b  attraction thank
3b90: 73 20 74 6f 20 69 74 73 20 6e 69 63 65 6c 79 20  s to its nicely 
3ba0: 73 75 6e 6e 79 20 77 65 61 74 68 65 72 20 61 6e  sunny weather an
3bb0: 64 20 70 6c 65 61 73 61 6e 74 20 63 6c 69 6d 61  d pleasant clima
3bc0: 74 65 2e 0d 0a 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  te...</li>..<li>
3bd0: 3c 62 3e 49 6e 74 65 72 6e 61 6c 20 63 6f 6d 6d  <b>Internal comm
3be0: 65 72 63 65 3c 2f 62 3e 3a 20 77 65 20 63 61 6e  erce</b>: we can
3bf0: 20 65 61 73 69 6c 79 20 66 6f 72 65 63 61 73 74   easily forecast
3c00: 20 61 20 73 74 72 6f 6e 67 20 67 72 6f 77 74 68   a strong growth
3c10: 20 69 6e 20 76 6f 6c 75 6d 65 20 6f 66 20 69 6e   in volume of in
3c20: 74 65 72 6e 61 6c 20 65 78 63 68 61 6e 67 65 73  ternal exchanges
3c30: 20 74 68 61 6e 6b 73 20 74 6f 20 74 68 65 20 62   thanks to the b
3c40: 65 74 74 65 72 20 63 6f 6e 6e 65 63 74 69 76 69  etter connectivi
3c50: 74 79 20 62 61 73 65 64 20 6f 6e 20 6d 61 72 69  ty based on mari
3c60: 74 69 6d 65 20 74 72 61 6e 73 70 6f 72 74 73 2e  time transports.
3c70: 3c 62 72 3e 20 0d 0a 4a 75 73 74 20 61 20 73 69  <br> ..Just a si
3c80: 6e 67 6c 65 20 65 78 61 6d 70 6c 65 3a 20 53 61  ngle example: Sa
3c90: 72 64 69 6e 69 61 20 73 68 6f 75 6c 64 20 6e 6f  rdinia should no
3ca0: 77 20 62 65 20 61 62 6c 65 20 74 6f 20 65 78 70  w be able to exp
3cb0: 6f 72 74 20 69 74 73 20 66 69 6e 65 73 74 20 73  ort its finest s
3cc0: 68 65 65 70 20 63 68 65 65 73 65 20 6f 6e 20 43  heep cheese on C
3cd0: 61 6c 61 62 72 69 61 6e 20 6d 61 72 6b 65 74 73  alabrian markets
3ce0: 20 77 68 69 6c 73 74 20 43 61 6c 61 62 72 69 61   whilst Calabria
3cf0: 20 63 6f 75 6c 64 20 66 72 65 65 6c 79 20 65 78   could freely ex
3d00: 70 6f 72 74 20 69 74 73 20 72 65 6e 6f 77 6e 20  port its renown 
3d10: 72 65 64 20 68 6f 74 20 63 68 69 6c 6c 79 20 70  red hot chilly p
3d20: 65 70 70 65 72 73 20 74 6f 20 53 61 72 64 69 6e  eppers to Sardin
3d30: 69 61 3b 20 6e 6f 74 20 6f 6e 6c 79 20 62 6f 74  ia; not only bot
3d40: 68 20 72 65 67 69 6f 6e 73 20 77 69 6c 6c 20 77  h regions will w
3d50: 69 64 65 6c 79 20 62 65 6e 65 66 69 74 20 66 72  idely benefit fr
3d60: 6f 6d 20 69 6e 63 72 65 61 73 65 64 20 65 78 63  om increased exc
3d70: 68 61 6e 67 65 20 76 6f 6c 75 6d 65 73 2c 20 62  hange volumes, b
3d80: 75 74 20 53 69 63 69 6c 79 20 61 73 20 77 65 6c  ut Sicily as wel
3d90: 6c 20 77 69 6c 6c 20 74 61 6b 65 20 70 72 6f 66  l will take prof
3da0: 69 74 20 66 72 6f 6d 20 66 6c 6f 75 72 69 73 68  it from flourish
3db0: 69 6e 67 20 6c 6f 67 69 73 74 69 63 20 61 6e 64  ing logistic and
3dc0: 20 62 79 20 6f 74 68 65 72 20 61 63 74 69 76 69   by other activi
3dd0: 74 69 65 73 20 62 61 73 65 64 20 6f 6e 20 63 6f  ties based on co
3de0: 6d 6d 65 72 63 69 61 6c 20 69 6e 74 65 72 6d 65  mmercial interme
3df0: 64 69 61 74 69 6f 6e 20 73 65 72 76 69 63 65 73  diation services
3e00: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 50  .</li>..<li><b>P
3e10: 72 61 63 74 69 63 61 6c 20 72 65 61 6c 69 7a 61  ractical realiza
3e20: 74 69 6f 6e 3c 2f 62 3e 3a 20 74 68 65 20 70 72  tion</b>: the pr
3e30: 65 73 65 6e 74 20 73 74 75 64 79 20 63 6c 65 61  esent study clea
3e40: 72 6c 79 20 64 65 6d 6f 6e 73 74 72 61 74 65 73  rly demonstrates
3e50: 20 74 68 61 74 20 74 68 65 72 65 20 69 73 20 6e   that there is n
3e60: 6f 74 68 69 6e 67 20 69 6e 20 4d 61 74 68 65 6d  othing in Mathem
3e70: 61 74 69 63 73 2c 20 47 65 6f 6d 65 74 72 79 20  atics, Geometry 
3e80: 6f 72 20 47 65 6f 67 72 61 70 68 79 20 66 6f 72  or Geography for
3e90: 62 69 64 64 69 6e 67 20 74 68 65 20 70 72 61 63  bidding the prac
3ea0: 74 69 63 61 6c 20 72 65 61 6c 69 7a 61 74 69 6f  tical realizatio
3eb0: 6e 20 6f 66 20 74 68 65 20 73 75 67 67 65 73 74  n of the suggest
3ec0: 65 64 20 69 64 65 61 2e 3c 62 72 3e 0d 0a 55 6e  ed idea.<br>..Un
3ed0: 68 61 70 70 69 6c 79 20 74 68 65 20 63 75 72 72  happily the curr
3ee0: 65 6e 74 20 73 74 61 74 65 20 6f 66 20 74 68 65  ent state of the
3ef0: 20 61 72 74 20 69 6e 20 47 65 6f 6c 6f 67 79 20   art in Geology 
3f00: 73 74 69 6c 6c 20 70 6f 73 65 73 20 6d 61 6e 79  still poses many
3f10: 20 70 75 7a 7a 6c 69 6e 67 20 70 72 6f 62 6c 65   puzzling proble
3f20: 6d 73 20 6e 6f 74 20 79 65 74 20 66 75 6c 6c 79  ms not yet fully
3f30: 20 72 65 73 6f 6c 76 65 64 3b 20 61 6e 79 77 61   resolved; anywa
3f40: 79 20 77 65 20 61 72 65 20 68 6f 70 65 66 75 6c  y we are hopeful
3f50: 6c 79 20 65 78 70 65 63 74 69 6e 67 20 74 68 61  ly expecting tha
3f60: 74 20 66 75 74 75 72 65 20 61 64 76 61 6e 63 65  t future advance
3f70: 6d 65 6e 74 73 20 69 6e 20 54 65 63 74 6f 6e 69  ments in Tectoni
3f80: 63 73 20 77 69 6c 6c 20 70 6f 73 73 69 62 6c 79  cs will possibly
3f90: 20 61 6c 6c 6f 77 20 74 6f 20 6f 76 65 72 63 6f   allow to overco
3fa0: 6d 65 20 61 6e 79 20 72 65 6d 61 69 6e 69 6e 67  me any remaining
3fb0: 20 69 73 73 75 65 2e 3c 62 72 3e 0d 0a 4d 6f 72   issue.<br>..Mor
3fc0: 65 20 73 70 65 63 69 66 69 63 61 6c 6c 79 20 61  e specifically a
3fd0: 20 62 65 74 74 65 72 20 6b 6e 6f 77 6c 65 64 67   better knowledg
3fe0: 65 20 6f 66 20 64 65 65 70 20 69 6e 74 65 72 61  e of deep intera
3ff0: 63 74 69 6f 6e 73 20 62 65 74 77 65 65 6e 20 74  ctions between t
4000: 68 65 20 63 72 75 73 74 20 61 6e 64 20 74 68 65  he crust and the
4010: 20 75 70 70 65 72 20 6d 61 6e 74 6c 65 20 61 6c   upper mantle al
4020: 6f 6e 67 20 74 68 65 20 4d 6f 68 6f 20 61 6e 64  ong the Moho and
4030: 20 61 20 6d 6f 72 65 20 64 65 74 61 69 6c 65 64   a more detailed
4040: 20 63 6f 6d 70 72 65 68 65 6e 73 69 6f 6e 20 6f   comprehension o
4050: 66 20 74 68 65 20 6d 69 63 72 6f 2d 70 6c 61 71  f the micro-plaq
4060: 75 65 73 20 6d 65 63 68 61 6e 69 63 73 20 77 69  ues mechanics wi
4070: 6c 6c 20 63 65 72 74 61 69 6e 6c 79 20 68 65 6c  ll certainly hel
4080: 70 3b 20 77 65 20 61 72 65 20 72 61 74 68 65 72  p; we are rather
4090: 20 63 6f 6e 66 69 64 65 6e 74 20 69 6e 20 66 75   confident in fu
40a0: 74 75 72 65 20 72 65 73 65 61 72 63 68 20 61 63  ture research ac
40b0: 68 69 65 76 65 6d 65 6e 74 73 20 6f 6e 20 74 68  hievements on th
40c0: 65 73 65 20 66 69 65 6c 64 73 2e 0d 0a 3c 2f 6f  ese fields...</o
40d0: 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 0d 0a 3c  l>..</td><td>..<
40e0: 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73 3a 2f  img src="https:/
40f0: 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69 74  /www.gaia-gis.it
4100: 2f 67 61 69 61 2d 73 69 6e 73 2f 61 66 66 69 6e  /gaia-sins/affin
4110: 65 2d 70 69 63 73 2f 69 74 61 6c 79 2d 32 2e 30  e-pics/italy-2.0
4120: 2e 70 6e 67 22 20 61 6c 74 3d 22 69 74 61 6c 79  .png" alt="italy
4130: 2d 32 2e 30 22 20 62 6f 72 64 65 72 3d 22 31 22  -2.0" border="1"
4140: 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  >..</td></tr>..<
4150: 2f 74 61 62 6c 65 3e 3c 62 72 3e 3c 68 72 3e 0d  /table><br><hr>.
4160: 0a 3c 68 32 3e 42 6f 72 69 6e 67 20 4d 61 74 68  .<h2>Boring Math
4170: 3a 20 61 20 6d 6f 72 65 20 66 6f 72 6d 61 6c 20  : a more formal 
4180: 70 72 65 73 65 6e 74 61 74 69 6f 6e 3c 2f 68 32  presentation</h2
4190: 3e 0d 0a 50 6c 61 79 74 69 6d 65 20 69 73 20 6f  >..Playtime is o
41a0: 76 65 72 3a 20 77 65 27 6c 6c 20 6e 6f 77 20 73  ver: we'll now s
41b0: 74 61 72 74 20 61 20 6d 6f 72 65 20 73 65 72 69  tart a more seri
41c0: 6f 75 73 20 65 78 70 6c 61 6e 61 74 69 6f 6e 2e  ous explanation.
41d0: 3c 62 72 3e 3c 62 72 3e 0d 0a 41 6e 20 41 66 66  <br><br>..An Aff
41e0: 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69  ine Transformati
41f0: 6f 6e 20 63 61 6e 20 62 65 20 72 65 70 72 65 73  on can be repres
4200: 65 6e 74 65 64 20 69 6e 20 74 68 65 20 66 6f 72  ented in the for
4210: 6d 20 6f 66 20 61 20 73 71 75 61 72 65 20 6d 61  m of a square ma
4220: 74 72 69 78 3b 20 74 68 65 20 73 69 6d 70 6c 65  trix; the simple
4230: 72 20 3c 62 3e 32 44 3c 2f 62 3e 20 63 61 73 65  r <b>2D</b> case
4240: 20 72 65 71 75 69 72 65 73 20 61 20 3c 62 3e 33   requires a <b>3
4250: 20 78 20 33 3c 2f 62 3e 20 6d 61 74 72 69 78 2c   x 3</b> matrix,
4260: 20 61 6e 64 20 74 68 65 20 66 6f 6c 6c 6f 77 69   and the followi
4270: 6e 67 73 20 61 72 65 20 74 68 65 20 70 6f 73 73  ngs are the poss
4280: 69 62 6c 65 20 61 72 72 61 6e 67 65 6d 65 6e 74  ible arrangement
4290: 73 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67 20  s corresponding 
42a0: 74 6f 20 65 61 63 68 20 65 6c 65 6d 65 6e 74 61  to each elementa
42b0: 72 79 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f  ry transformatio
42c0: 6e 3a 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 74 61 62  n:<br><br>..<tab
42d0: 6c 65 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77  le>..<tr><td row
42e0: 73 70 61 6e 3d 22 34 22 20 76 61 6c 69 67 6e 3d  span="4" valign=
42f0: 22 6d 69 64 64 6c 65 22 3e 47 65 6e 65 72 61 6c  "middle">General
4300: 20 6c 61 79 6f 75 74 3c 2f 74 64 3e 0d 0a 3c 74   layout</td>..<t
4310: 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  d>/</td><td alig
4320: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 61 3c  n="center"><b>a<
4330: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  /b></td><td alig
4340: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 62 3c  n="center"><b>b<
4350: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  /b></td><td alig
4360: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 78 6f  n="center"><b>xo
4370: 66 66 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 5c  ff</b></td><td>\
4380: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
4390: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c  <td>|</td><td al
43a0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e  ign="center"><b>
43b0: 64 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c  d</b></td><td al
43c0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e  ign="center"><b>
43d0: 65 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c  e</b></td><td al
43e0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e  ign="center"><b>
43f0: 79 6f 66 66 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64  yoff</b></td><td
4400: 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74  >|</td></tr>..<t
4410: 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20  r><td>\</td><td 
4420: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
4430: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4440: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
4450: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
4460: 3e 31 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64  >1</td><td>/</td
4470: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20  ></tr>..<tr><td 
4480: 63 6f 6c 73 70 61 6e 3d 22 35 22 3e 3c 68 72 3e  colspan="5"><hr>
4490: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
44a0: 3c 74 64 20 72 6f 77 73 70 61 6e 3d 22 34 22 20  <td rowspan="4" 
44b0: 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e  valign="middle">
44c0: 49 64 65 6e 74 69 74 79 3c 2f 74 64 3e 0d 0a 3c  Identity</td>..<
44d0: 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  td>/</td><td ali
44e0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74  gn="center">1</t
44f0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
4500: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
4510: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
4520: 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f  /td><td>\</td></
4530: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f  tr>..<tr><td>|</
4540: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
4550: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20  nter">0</td><td 
4560: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31  align="center">1
4570: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4580: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
4590: 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  d>|</td></tr>..<
45a0: 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64  tr><td>\</td><td
45b0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
45c0: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  0</td><td align=
45d0: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
45e0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
45f0: 22 3e 31 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74  ">1</td><td>/</t
4600: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
4610: 20 63 6f 6c 73 70 61 6e 3d 22 35 22 3e 3c 68 72   colspan="5"><hr
4620: 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  ></td></tr>..<tr
4630: 3e 3c 74 64 20 72 6f 77 73 70 61 6e 3d 22 34 22  ><td rowspan="4"
4640: 20 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22   valign="middle"
4650: 3e 54 72 61 6e 73 6c 61 74 65 28 3c 62 3e 74 78  >Translate(<b>tx
4660: 3c 2f 62 3e 2c 20 3c 62 3e 74 79 3c 2f 62 3e 29  </b>, <b>ty</b>)
4670: 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73  &nbsp;&nbsp;&nbs
4680: 70 3b 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f  p;</td>..<td>/</
4690: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
46a0: 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 20  nter">1</td><td 
46b0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
46c0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
46d0: 63 65 6e 74 65 72 22 3e 3c 62 3e 74 78 3c 2f 62  center"><b>tx</b
46e0: 3e 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e  ></td><td>\</td>
46f0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c  </tr>..<tr><td>|
4700: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4710: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
4720: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
4730: 3e 31 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >1</td><td align
4740: 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 74 79 3c  ="center"><b>ty<
4750: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74  /b></td><td>|</t
4760: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
4770: 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >\</td><td align
4780: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
4790: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
47a0: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
47b0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74  gn="center">1</t
47c0: 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72  d><td>/</td></tr
47d0: 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70  >..<tr><td colsp
47e0: 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e  an="5"><hr></td>
47f0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72  </tr>..<tr><td r
4800: 6f 77 73 70 61 6e 3d 22 34 22 20 76 61 6c 69 67  owspan="4" valig
4810: 6e 3d 22 6d 69 64 64 6c 65 22 3e 53 63 61 6c 65  n="middle">Scale
4820: 28 3c 62 3e 73 78 3c 2f 62 3e 2c 20 3c 62 3e 73  (<b>sx</b>, <b>s
4830: 79 3c 2f 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64  y</b>)</td>..<td
4840: 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >/</td><td align
4850: 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 73 78 3c  ="center"><b>sx<
4860: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  /b></td><td alig
4870: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
4880: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
4890: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 5c 3c  er">0</td><td>\<
48a0: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
48b0: 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  td>|</td><td ali
48c0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
48d0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
48e0: 74 65 72 22 3e 3c 62 3e 73 79 3c 2f 62 3e 3c 2f  ter"><b>sy</b></
48f0: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
4900: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e  nter">0</td><td>
4910: 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  |</td></tr>..<tr
4920: 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61  ><td>\</td><td a
4930: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
4940: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
4950: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
4960: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
4970: 31 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e  1</td><td>/</td>
4980: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63  </tr>..<tr><td c
4990: 6f 6c 73 70 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c  olspan="5"><hr><
49a0: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
49b0: 74 64 20 72 6f 77 73 70 61 6e 3d 22 34 22 20 76  td rowspan="4" v
49c0: 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 52  align="middle">R
49d0: 6f 74 61 74 65 28 3c 62 3e 26 74 68 65 74 61 3b  otate(<b>&theta;
49e0: 3c 2f 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e  </b>)</td>..<td>
49f0: 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  /</td><td align=
4a00: 22 63 65 6e 74 65 72 22 3e 3c 62 3e 63 6f 73 28  "center"><b>cos(
4a10: 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64  &theta;)</b></td
4a20: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
4a30: 65 72 22 3e 3c 62 3e 2d 73 69 6e 28 26 74 68 65  er"><b>-sin(&the
4a40: 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64  ta;)</b></td><td
4a50: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
4a60: 30 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e  0</td><td>\</td>
4a70: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c  </tr>..<tr><td>|
4a80: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4a90: 63 65 6e 74 65 72 22 3e 3c 62 3e 73 69 6e 28 26  center"><b>sin(&
4aa0: 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e  theta;)</b></td>
4ab0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
4ac0: 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68 65 74 61  r"><b>cos(&theta
4ad0: 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61  ;)</b></td><td a
4ae0: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
4af0: 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f  /td><td>|</td></
4b00: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f  tr>..<tr><td>\</
4b10: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
4b20: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20  nter">0</td><td 
4b30: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
4b40: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4b50: 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74  center">1</td><t
4b60: 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  d>/</td></tr>..<
4b70: 74 72 3e 3c 74 64 3e 3c 2f 74 64 3e 3c 2f 74 72  tr><td></td></tr
4b80: 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 3c 62 72 3e 0d  >..</table><br>.
4b90: 0a 41 20 3c 62 3e 33 44 3c 2f 62 3e 20 61 66 66  .A <b>3D</b> aff
4ba0: 69 6e 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 69  ine transformati
4bb0: 6f 6e 20 72 65 71 75 69 72 65 73 20 61 20 3c 62  on requires a <b
4bc0: 3e 34 20 78 20 34 3c 2f 62 3e 20 6d 61 74 72 69  >4 x 4</b> matri
4bd0: 78 2e 3c 62 72 3e 0d 0a 41 73 20 79 6f 75 20 63  x.<br>..As you c
4be0: 61 6e 20 65 61 73 69 6c 79 20 6e 6f 74 69 63 65  an easily notice
4bf0: 20 74 68 65 72 65 20 69 73 20 61 6e 20 6f 62 76   there is an obv
4c00: 69 6f 75 73 20 64 69 72 65 63 74 20 72 65 6c 61  ious direct rela
4c10: 74 69 6f 6e 20 62 65 74 77 65 65 6e 20 61 20 33  tion between a 3
4c20: 44 20 6d 61 74 72 69 78 20 61 6e 64 20 61 20 32  D matrix and a 2
4c30: 44 20 6d 61 74 72 69 78 3b 20 6e 6f 74 69 63 65  D matrix; notice
4c40: 20 74 68 65 20 63 65 6c 6c 73 20 73 68 6f 77 69   the cells showi
4c50: 6e 67 20 61 20 67 72 61 79 20 62 61 63 6b 67 72  ng a gray backgr
4c60: 6f 75 6e 64 2e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c  ound.<br><br>..<
4c70: 74 61 62 6c 65 3e 0d 0a 3c 74 72 3e 3c 74 64 20  table>..<tr><td 
4c80: 72 6f 77 73 70 61 6e 3d 22 35 22 20 76 61 6c 69  rowspan="5" vali
4c90: 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 47 65 6e 65  gn="middle">Gene
4ca0: 72 61 6c 20 6c 61 79 6f 75 74 26 6e 62 73 70 3b  ral layout&nbsp;
4cb0: 26 6e 62 73 70 3b 26 6e 62 73 70 3b 3c 2f 74 64  &nbsp;&nbsp;</td
4cc0: 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64  >..<td>/</td><td
4cd0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
4ce0: 3c 62 3e 61 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64  <b>a</b></td><td
4cf0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
4d00: 3c 62 3e 62 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64  <b>b</b></td><td
4d10: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 20   align="center" 
4d20: 62 67 63 6f 6c 6f 72 3d 22 23 64 30 64 30 64 30  bgcolor="#d0d0d0
4d30: 22 3e 3c 62 3e 63 3c 2f 62 3e 3c 2f 74 64 3e 3c  "><b>c</b></td><
4d40: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
4d50: 22 3e 3c 62 3e 78 6f 66 66 3c 2f 62 3e 3c 2f 74  "><b>xoff</b></t
4d60: 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72  d><td>\</td></tr
4d70: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64  >..<tr><td>|</td
4d80: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
4d90: 65 72 22 3e 3c 62 3e 64 3c 2f 62 3e 3c 2f 74 64  er"><b>d</b></td
4da0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
4db0: 65 72 22 3e 3c 62 3e 65 3c 2f 62 3e 3c 2f 74 64  er"><b>e</b></td
4dc0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
4dd0: 65 72 22 20 62 67 63 6f 6c 6f 72 3d 22 23 64 30  er" bgcolor="#d0
4de0: 64 30 64 30 22 3e 3c 62 3e 66 3c 2f 62 3e 3c 2f  d0d0"><b>f</b></
4df0: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
4e00: 6e 74 65 72 22 3e 3c 62 3e 79 6f 66 66 3c 2f 62  nter"><b>yoff</b
4e10: 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e  ></td><td>|</td>
4e20: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c  </tr>..<tr><td>|
4e30: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4e40: 63 65 6e 74 65 72 22 20 62 67 63 6f 6c 6f 72 3d  center" bgcolor=
4e50: 22 23 64 30 64 30 64 30 22 3e 3c 62 3e 67 3c 2f  "#d0d0d0"><b>g</
4e60: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  b></td><td align
4e70: 3d 22 63 65 6e 74 65 72 22 20 62 67 63 6f 6c 6f  ="center" bgcolo
4e80: 72 3d 22 23 64 30 64 30 64 30 22 3e 3c 62 3e 68  r="#d0d0d0"><b>h
4e90: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  </b></td><td ali
4ea0: 67 6e 3d 22 63 65 6e 74 65 72 22 20 62 67 63 6f  gn="center" bgco
4eb0: 6c 6f 72 3d 22 23 64 30 64 30 64 30 22 3e 3c 62  lor="#d0d0d0"><b
4ec0: 3e 69 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61  >i</b></td><td a
4ed0: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 20 62 67  lign="center" bg
4ee0: 63 6f 6c 6f 72 3d 22 23 64 30 64 30 64 30 22 3e  color="#d0d0d0">
4ef0: 3c 62 3e 7a 6f 66 66 3c 2f 62 3e 3c 2f 74 64 3e  <b>zoff</b></td>
4f00: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  <td>|</td></tr>.
4f10: 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c  .<tr><td>\</td><
4f20: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
4f30: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ">0</td><td alig
4f40: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
4f50: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
4f60: 65 72 22 20 62 67 63 6f 6c 6f 72 3d 22 23 64 30  er" bgcolor="#d0
4f70: 64 30 64 30 22 3e 30 3c 2f 74 64 3e 3c 74 64 20  d0d0">0</td><td 
4f80: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31  align="center">1
4f90: 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c  </td><td>/</td><
4fa0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f  /tr>..<tr><td co
4fb0: 6c 73 70 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f  lspan="5"><hr></
4fc0: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
4fd0: 64 20 72 6f 77 73 70 61 6e 3d 22 35 22 20 76 61  d rowspan="5" va
4fe0: 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 49 64  lign="middle">Id
4ff0: 65 6e 74 69 74 79 3c 2f 74 64 3e 0d 0a 3c 74 64  entity</td>..<td
5000: 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >/</td><td align
5010: 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e  ="center">1</td>
5020: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5030: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
5040: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
5050: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
5060: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 5c  ter">0</td><td>\
5070: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
5080: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c  <td>|</td><td al
5090: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f  ign="center">0</
50a0: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
50b0: 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 20  nter">1</td><td 
50c0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
50d0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
50e0: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
50f0: 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  d>|</td></tr>..<
5100: 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64  tr><td>\</td><td
5110: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
5120: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  0</td><td align=
5130: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
5140: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
5150: 22 3e 31 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ">1</td><td alig
5160: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
5170: 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e  ><td>/</td></tr>
5180: 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e  ..<tr><td>\</td>
5190: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
51a0: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
51b0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
51c0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
51d0: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
51e0: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c  lign="center">1<
51f0: 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f  /td><td>/</td></
5200: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c  tr>..<tr><td col
5210: 73 70 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74  span="5"><hr></t
5220: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
5230: 20 72 6f 77 73 70 61 6e 3d 22 35 22 20 76 61 6c   rowspan="5" val
5240: 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 54 72 61  ign="middle">Tra
5250: 6e 73 6c 61 74 65 28 3c 62 3e 74 78 3c 2f 62 3e  nslate(<b>tx</b>
5260: 2c 20 3c 62 3e 74 79 3c 2f 62 3e 2c 20 3c 62 3e  , <b>ty</b>, <b>
5270: 74 7a 3c 2f 62 3e 29 26 6e 62 73 70 3b 26 6e 62  tz</b>)&nbsp;&nb
5280: 73 70 3b 26 6e 62 73 70 3b 3c 2f 74 64 3e 0d 0a  sp;&nbsp;</td>..
5290: 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c  <td>/</td><td al
52a0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f  ign="center">1</
52b0: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
52c0: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20  nter">0</td><td 
52d0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
52e0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
52f0: 63 65 6e 74 65 72 22 3e 3c 62 3e 74 78 3c 2f 62  center"><b>tx</b
5300: 3e 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e  ></td><td>\</td>
5310: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c  </tr>..<tr><td>|
5320: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
5330: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
5340: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5350: 3e 31 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >1</td><td align
5360: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
5370: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5380: 72 22 3e 3c 62 3e 74 79 3c 2f 62 3e 3c 2f 74 64  r"><b>ty</b></td
5390: 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e  ><td>|</td></tr>
53a0: 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e  ..<tr><td>|</td>
53b0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
53c0: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
53d0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
53e0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
53f0: 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 20 61  ter">1</td><td a
5400: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62  lign="center"><b
5410: 3e 74 7a 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e  >tz</b></td><td>
5420: 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  |</td></tr>..<tr
5430: 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61  ><td>\</td><td a
5440: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
5450: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
5460: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
5470: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
5480: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  0</td><td align=
5490: 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c  "center">1</td><
54a0: 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>/</td></tr>..
54b0: 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d  <tr><td colspan=
54c0: 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74  "5"><hr></td></t
54d0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73  r>..<tr><td rows
54e0: 70 61 6e 3d 22 35 22 20 76 61 6c 69 67 6e 3d 22  pan="5" valign="
54f0: 6d 69 64 64 6c 65 22 3e 53 63 61 6c 65 28 3c 62  middle">Scale(<b
5500: 3e 73 78 3c 2f 62 3e 2c 20 3c 62 3e 73 79 3c 2f  >sx</b>, <b>sy</
5510: 62 3e 2c 20 3c 62 3e 73 7a 3c 2f 62 3e 29 3c 2f  b>, <b>sz</b>)</
5520: 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e 3c  td>..<td>/</td><
5530: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
5540: 22 3e 3c 62 3e 73 78 3c 2f 62 3e 3c 2f 74 64 3e  "><b>sx</b></td>
5550: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5560: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
5570: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
5580: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
5590: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 5c  ter">0</td><td>\
55a0: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
55b0: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c  <td>|</td><td al
55c0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f  ign="center">0</
55d0: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
55e0: 6e 74 65 72 22 3e 3c 62 3e 73 79 3c 2f 62 3e 3c  nter"><b>sy</b><
55f0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
5600: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
5610: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
5620: 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e  0</td><td>|</td>
5630: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c  </tr>..<tr><td>|
5640: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
5650: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
5660: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5670: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >0</td><td align
5680: 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 73 7a 3c  ="center"><b>sz<
5690: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  /b></td><td alig
56a0: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
56b0: 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e  ><td>|</td></tr>
56c0: 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e  ..<tr><td>\</td>
56d0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
56e0: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
56f0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
5700: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
5710: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
5720: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c  lign="center">1<
5730: 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f  /td><td>/</td></
5740: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c  tr>..<tr><td col
5750: 73 70 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74  span="5"><hr></t
5760: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
5770: 20 72 6f 77 73 70 61 6e 3d 22 35 22 20 76 61 6c   rowspan="5" val
5780: 69 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 58 20 52  ign="middle">X R
5790: 6f 6c 6c 28 3c 62 3e 26 74 68 65 74 61 3b 3c 2f  oll(<b>&theta;</
57a0: 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c  b>)</td>..<td>/<
57b0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
57c0: 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64  enter">1</td><td
57d0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
57e0: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  0</td><td align=
57f0: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
5800: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
5810: 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74  ">0</td><td>\</t
5820: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
5830: 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >|</td><td align
5840: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
5850: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5860: 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68 65 74 61  r"><b>cos(&theta
5870: 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61  ;)</b></td><td a
5880: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62  lign="center"><b
5890: 3e 2d 73 69 6e 28 26 74 68 65 74 61 3b 29 3c 2f  >-sin(&theta;)</
58a0: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  b></td><td align
58b0: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
58c0: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  <td>|</td></tr>.
58d0: 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c  .<tr><td>|</td><
58e0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
58f0: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ">0</td><td alig
5900: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 73 69  n="center"><b>si
5910: 6e 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f  n(&theta;)</b></
5920: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
5930: 6e 74 65 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68  nter"><b>cos(&th
5940: 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74  eta;)</b></td><t
5950: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5960: 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64  >0</td><td>|</td
5970: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  ></tr>..<tr><td>
5980: 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  \</td><td align=
5990: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
59a0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
59b0: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ">0</td><td alig
59c0: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
59d0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
59e0: 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 3e 2f 3c  er">1</td><td>/<
59f0: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
5a00: 74 64 20 63 6f 6c 73 70 61 6e 3d 22 35 22 3e 3c  td colspan="5"><
5a10: 68 72 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  hr></td></tr>..<
5a20: 74 72 3e 3c 74 64 20 72 6f 77 73 70 61 6e 3d 22  tr><td rowspan="
5a30: 35 22 20 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c  5" valign="middl
5a40: 65 22 3e 59 20 52 6f 6c 6c 28 3c 62 3e 26 74 68  e">Y Roll(<b>&th
5a50: 65 74 61 3b 3c 2f 62 3e 29 3c 2f 74 64 3e 0d 0a  eta;</b>)</td>..
5a60: 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c  <td>/</td><td al
5a70: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e  ign="center"><b>
5a80: 63 6f 73 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e  cos(&theta;)</b>
5a90: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
5aa0: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
5ab0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5ac0: 3e 3c 62 3e 73 69 6e 28 26 74 68 65 74 61 3b 29  ><b>sin(&theta;)
5ad0: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  </b></td><td ali
5ae0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
5af0: 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72  d><td>\</td></tr
5b00: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64  >..<tr><td>|</td
5b10: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
5b20: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c  er">0</td><td al
5b30: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f  ign="center">1</
5b40: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
5b50: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20  nter">0</td><td 
5b60: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
5b70: 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c  </td><td>|</td><
5b80: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c  /tr>..<tr><td>|<
5b90: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
5ba0: 65 6e 74 65 72 22 3e 3c 62 3e 2d 73 69 6e 28 26  enter"><b>-sin(&
5bb0: 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e  theta;)</b></td>
5bc0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5bd0: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
5be0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 63  gn="center"><b>c
5bf0: 6f 73 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c  os(&theta;)</b><
5c00: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
5c10: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
5c20: 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74  >|</td></tr>..<t
5c30: 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20  r><td>\</td><td 
5c40: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
5c50: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
5c60: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
5c70: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5c80: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >0</td><td align
5c90: 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e  ="center">1</td>
5ca0: 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  <td>/</td></tr>.
5cb0: 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e  .<tr><td colspan
5cc0: 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f  ="5"><hr></td></
5cd0: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77  tr>..<tr><td row
5ce0: 73 70 61 6e 3d 22 35 22 20 76 61 6c 69 67 6e 3d  span="5" valign=
5cf0: 22 6d 69 64 64 6c 65 22 3e 5a 20 52 6f 6c 6c 28  "middle">Z Roll(
5d00: 3c 62 3e 26 74 68 65 74 61 3b 3c 2f 62 3e 29 3c  <b>&theta;</b>)<
5d10: 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e  /td>..<td>/</td>
5d20: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5d30: 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68 65 74 61  r"><b>cos(&theta
5d40: 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61  ;)</b></td><td a
5d50: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62  lign="center"><b
5d60: 3e 2d 73 69 6e 28 26 74 68 65 74 61 3b 29 3c 2f  >-sin(&theta;)</
5d70: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  b></td><td align
5d80: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
5d90: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5da0: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f  r">0</td><td>\</
5db0: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
5dc0: 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  d>|</td><td alig
5dd0: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 73 69  n="center"><b>si
5de0: 6e 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f  n(&theta;)</b></
5df0: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
5e00: 6e 74 65 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68  nter"><b>cos(&th
5e10: 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74  eta;)</b></td><t
5e20: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5e30: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >0</td><td align
5e40: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
5e50: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  <td>|</td></tr>.
5e60: 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c  .<tr><td>|</td><
5e70: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
5e80: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ">0</td><td alig
5e90: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
5ea0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
5eb0: 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 20 61 6c  er">1</td><td al
5ec0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f  ign="center">0</
5ed0: 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74  td><td>|</td></t
5ee0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74  r>..<tr><td>\</t
5ef0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
5f00: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
5f10: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
5f20: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
5f30: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
5f40: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
5f50: 31 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e  1</td><td>/</td>
5f60: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c  </tr>..<tr><td><
5f70: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62  /td></tr>..</tab
5f80: 6c 65 3e 0d 0a 3c 62 72 3e 3c 68 72 3e 0d 0a 3c  le>..<br><hr>..<
5f90: 68 33 3e 61 70 70 6c 79 69 6e 67 20 61 6e 20 41  h3>applying an A
5fa0: 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61  ffine Transforma
5fb0: 74 69 6f 6e 3c 2f 68 33 3e 0d 0a 49 6e 20 6f 72  tion</h3>..In or
5fc0: 64 65 72 20 74 6f 20 6d 61 74 65 72 69 61 6c 69  der to materiali
5fd0: 7a 65 20 61 6e 20 61 66 66 69 6e 65 20 74 72 61  ze an affine tra
5fe0: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 77 65 20 73  nsformation we s
5ff0: 69 6d 70 6c 79 20 68 61 76 65 20 74 6f 20 63 6f  imply have to co
6000: 6d 70 75 74 65 20 20 3c 62 3e 28 78 27 2c 20 79  mpute  <b>(x', y
6010: 27 2c 20 7a 27 29 3c 2f 62 3e 20 63 6f 6f 72 64  ', z')</b> coord
6020: 69 6e 61 74 65 73 20 73 74 61 72 74 69 6e 67 20  inates starting 
6030: 66 72 6f 6d 20 3c 62 3e 28 78 2c 20 79 2c 20 7a  from <b>(x, y, z
6040: 29 3c 2f 62 3e 20 66 6f 72 20 65 76 65 72 79 20  )</b> for every 
6050: 70 6f 69 6e 74 20 6f 72 20 76 65 72 74 65 78 20  point or vertex 
6060: 66 6f 75 6e 64 20 69 6e 20 74 68 65 20 69 6e 70  found in the inp
6070: 75 74 20 47 65 6f 6d 65 74 72 79 20 61 63 63 6f  ut Geometry acco
6080: 72 64 69 6e 67 6c 79 20 74 6f 20 74 68 65 20 66  rdingly to the f
6090: 6f 6c 6c 6f 77 69 6e 67 20 66 6f 72 6d 75 6c 61  ollowing formula
60a0: 65 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 3c 62  e:..<ul>..<li><b
60b0: 3e 78 27 20 3d 20 61 2a 78 20 2b 20 62 2a 79 20  >x' = a*x + b*y 
60c0: 2b 20 63 2a 7a 20 2b 20 78 6f 66 66 3c 2f 62 3e  + c*z + xoff</b>
60d0: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 79 27  </li>..<li><b>y'
60e0: 20 3d 20 64 2a 78 20 2b 20 65 2a 79 20 2b 20 66   = d*x + e*y + f
60f0: 2a 7a 20 2b 20 79 6f 66 66 3c 2f 62 3e 3c 2f 6c  *z + yoff</b></l
6100: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 7a 27 20 3d 20  i>..<li><b>z' = 
6110: 67 2a 78 20 2b 20 68 2a 79 20 2b 20 69 2a 7a 20  g*x + h*y + i*z 
6120: 2b 20 7a 6f 66 66 3c 2f 62 3e 3c 2f 6c 69 3e 0d  + zoff</b></li>.
6130: 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 69 6e 20 74  .</ul><br>..in t
6140: 68 65 20 73 69 6d 70 6c 65 72 20 3c 62 3e 32 44  he simpler <b>2D
6150: 3c 2f 62 3e 20 63 61 73 65 20 74 68 69 73 20 77  </b> case this w
6160: 69 6c 6c 20 61 73 73 75 6d 65 20 74 68 65 20 72  ill assume the r
6170: 65 64 75 63 65 64 20 66 6f 72 6d 3a 0d 0a 3c 75  educed form:..<u
6180: 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 78 27 20 3d 20  l>..<li><b>x' = 
6190: 61 2a 78 20 2b 20 62 2a 79 20 2b 20 78 6f 66 66  a*x + b*y + xoff
61a0: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c  </b></li>..<li><
61b0: 62 3e 79 27 20 3d 20 64 2a 78 20 2b 20 65 2a 79  b>y' = d*x + e*y
61c0: 20 2b 20 79 6f 66 66 3c 2f 62 3e 3c 2f 6c 69 3e   + yoff</b></li>
61d0: 0d 0a 3c 2f 75 6c 3e 3c 62 72 3e 0d 0a 41 73 20  ..</ul><br>..As 
61e0: 79 6f 75 20 63 61 6e 20 73 65 65 2c 20 61 70 70  you can see, app
61f0: 6c 79 69 6e 67 20 61 6e 20 41 66 66 69 6e 65 20  lying an Affine 
6200: 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 64  Transformation d
6210: 6f 65 73 20 6e 6f 74 20 72 65 71 75 69 72 65 73  oes not requires
6220: 20 63 6f 6d 70 75 74 69 6e 67 20 61 6e 79 20 74   computing any t
6230: 72 69 67 6f 6e 6f 6d 65 74 72 69 63 20 66 75 6e  rigonometric fun
6240: 63 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 54 72 69 67  ction.<br>..Trig
6250: 6f 6e 6f 6d 65 74 72 69 63 20 66 75 6e 63 74 69  onometric functi
6260: 6f 6e 73 20 61 72 65 20 76 65 72 79 20 63 6f 73  ons are very cos
6270: 74 6c 79 20 69 6e 20 63 6f 6d 70 75 74 61 74 69  tly in computati
6280: 6f 6e 61 6c 20 74 65 72 6d 73 2c 20 73 6f 20 61  onal terms, so a
6290: 70 70 6c 79 69 6e 67 20 61 6e 20 41 66 66 69 6e  pplying an Affin
62a0: 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  e Transformation
62b0: 20 69 73 20 61 6e 20 69 6e 74 72 69 6e 73 69 63   is an intrinsic
62c0: 61 6c 6c 79 20 65 66 66 69 63 69 65 6e 74 20 6d  ally efficient m
62d0: 65 63 68 61 6e 69 73 6d 20 62 65 63 61 75 73 65  echanism because
62e0: 20 69 74 20 6f 6e 6c 79 20 72 65 71 75 69 72 65   it only require
62f0: 73 20 6d 75 6c 74 69 70 6c 69 63 61 74 69 6f 6e  s multiplication
6300: 73 20 61 6e 64 20 61 64 64 69 74 69 6f 6e 73 2e  s and additions.
6310: 3c 62 72 3e 0d 0a 3c 62 72 3e 3c 68 72 3e 0d 0a  <br>..<br><hr>..
6320: 3c 68 33 3e 63 68 61 69 6e 69 6e 67 20 74 77 6f  <h3>chaining two
6330: 20 28 6f 72 20 65 76 65 6e 20 6d 6f 72 65 29 20   (or even more) 
6340: 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d  Affine Transform
6350: 61 74 69 6f 6e 73 20 69 6e 20 61 20 73 69 6e 67  ations in a sing
6360: 6c 65 20 6f 70 65 72 61 74 69 6f 6e 3c 2f 68 33  le operation</h3
6370: 3e 0d 0a 41 66 66 69 6e 65 20 74 72 61 6e 73 66  >..Affine transf
6380: 6f 72 6d 61 74 69 6f 6e 20 6d 61 74 72 69 63 65  ormation matrice
6390: 73 20 68 61 76 65 20 61 6e 6f 74 68 65 72 20 61  s have another a
63a0: 73 74 6f 6e 69 73 68 69 6e 67 20 70 72 6f 70 65  stonishing prope
63b0: 72 74 79 2e 3c 62 72 3e 0d 0a 57 65 20 63 61 6e  rty.<br>..We can
63c0: 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f   <a href="http:/
63d0: 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72  /en.wikipedia.or
63e0: 67 2f 77 69 6b 69 2f 4d 61 74 72 69 78 5f 6d 75  g/wiki/Matrix_mu
63f0: 6c 74 69 70 6c 69 63 61 74 69 6f 6e 22 3e 6d 75  ltiplication">mu
6400: 6c 74 69 70 6c 79 3c 2f 61 3e 20 74 77 6f 20 64  ltiply</a> two d
6410: 69 66 66 65 72 65 6e 74 20 61 66 66 69 6e 65 20  ifferent affine 
6420: 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 6d  transformation m
6430: 61 74 72 69 63 65 73 20 74 68 75 73 20 6f 62 74  atrices thus obt
6440: 61 69 6e 69 6e 67 20 61 20 74 68 69 72 64 20 6d  aining a third m
6450: 61 74 72 69 78 2c 20 61 6e 64 20 74 68 69 73 20  atrix, and this 
6460: 6c 61 74 65 73 74 20 6f 6e 63 65 20 61 70 70 6c  latest once appl
6470: 69 65 64 20 77 69 6c 6c 20 63 6f 6e 74 61 69 6e  ied will contain
6480: 20 62 6f 74 68 20 74 72 61 6e 73 66 6f 72 6d 61   both transforma
6490: 74 69 6f 6e 73 20 61 6e 64 20 69 6e 20 74 68 65  tions and in the
64a0: 20 72 69 67 68 74 20 73 65 71 75 65 6e 63 65 2e   right sequence.
64b0: 3c 62 72 3e 0d 0a 54 68 65 72 65 20 69 73 20 6e  <br>..There is n
64c0: 6f 20 6c 69 6d 69 74 3b 20 77 65 20 63 61 6e 20  o limit; we can 
64d0: 69 6e 66 69 6e 69 74 65 6c 79 20 63 68 61 69 6e  infinitely chain
64e0: 20 61 73 20 6d 61 6e 79 20 74 72 61 6e 73 66 6f   as many transfo
64f0: 72 6d 61 74 69 6f 6e 73 20 61 73 20 72 65 71 75  rmations as requ
6500: 69 72 65 64 2c 20 77 65 27 6c 6c 20 73 69 6d 70  ired, we'll simp
6510: 6c 79 20 68 61 76 65 20 74 6f 20 63 6f 6e 74 69  ly have to conti
6520: 6e 75 65 20 6d 75 6c 74 69 70 6c 79 69 6e 67 20  nue multiplying 
6530: 61 6c 6c 20 6d 61 74 72 69 63 65 73 20 6f 6e 65  all matrices one
6540: 20 61 66 74 65 72 20 74 68 65 20 6f 74 68 65 72   after the other
6550: 20 63 61 72 65 66 75 6c 6c 79 20 72 65 73 70 65   carefully respe
6560: 63 74 69 6e 67 20 74 68 65 20 61 70 70 72 6f 70  cting the approp
6570: 72 69 61 74 65 20 73 65 71 75 65 6e 63 65 2e 3c  riate sequence.<
6580: 62 72 3e 0d 0a 41 74 20 74 68 65 20 65 6e 64 20  br>..At the end 
6590: 6f 66 20 74 68 65 20 70 72 6f 63 65 73 73 20 77  of the process w
65a0: 65 27 6c 6c 20 61 6c 77 61 79 73 20 67 65 74 20  e'll always get 
65b0: 6a 75 73 74 20 61 20 73 69 6e 67 6c 65 20 61 66  just a single af
65c0: 66 69 6e 65 20 74 72 61 6e 73 66 6f 72 6d 61 74  fine transformat
65d0: 69 6f 6e 20 6d 61 74 72 69 78 20 66 61 69 74 68  ion matrix faith
65e0: 66 75 6c 6c 79 20 72 65 70 72 65 73 65 6e 74 69  fully representi
65f0: 6e 67 20 61 6e 79 20 69 6e 64 69 76 69 64 75 61  ng any individua
6600: 6c 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  l transformation
6610: 20 69 6e 20 74 68 65 20 63 68 61 69 6e 2e 0d 0a   in the chain...
6620: 3c 74 61 62 6c 65 20 62 67 63 6f 6c 6f 72 3d 22  <table bgcolor="
6630: 23 66 66 63 30 30 30 22 20 63 65 6c 6c 70 61 64  #ffc000" cellpad
6640: 64 69 6e 67 3d 22 31 30 22 3e 3c 74 72 3e 3c 74  ding="10"><tr><t
6650: 64 3e 0d 0a 54 68 65 20 6d 75 6c 74 69 70 6c 69  d>..The multipli
6660: 63 61 74 69 6f 6e 20 62 65 74 77 65 65 6e 20 74  cation between t
6670: 77 6f 20 6d 61 74 72 69 63 65 73 20 3c 75 3e 69  wo matrices <u>i
6680: 73 20 6e 6f 74 20 61 20 63 6f 6d 6d 75 74 61 74  s not a commutat
6690: 69 76 65 20 6f 70 65 72 61 74 69 6f 6e 3c 2f 75  ive operation</u
66a0: 3e 3a 20 74 68 65 20 72 65 6c 61 74 69 76 65 20  >: the relative 
66b0: 6f 72 64 65 72 20 6f 66 20 6f 70 65 72 61 6e 64  order of operand
66c0: 73 20 69 73 20 61 62 73 6f 6c 75 74 65 6c 79 20  s is absolutely 
66d0: 72 65 6c 65 76 61 6e 74 2e 3c 2f 74 64 3e 3c 2f  relevant.</td></
66e0: 74 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 68 33  tr></table>..<h3
66f0: 3e 6d 75 6c 74 69 70 6c 79 69 6e 67 20 74 77 6f  >multiplying two
6700: 20 6d 61 74 72 69 63 65 73 3c 2f 68 33 3e 0d 0a   matrices</h3>..
6710: 4d 75 6c 74 69 70 6c 69 63 61 74 69 6f 6e 20 69  Multiplication i
6720: 73 20 6e 6f 74 20 72 65 61 6c 6c 79 20 61 20 73  s not really a s
6730: 69 6d 70 6c 65 20 6f 70 65 72 61 74 69 6f 6e 20  imple operation 
6740: 77 68 65 6e 20 6d 61 74 72 69 63 65 73 20 61 72  when matrices ar
6750: 65 20 69 6e 76 6f 6c 76 65 64 20 61 6e 64 20 72  e involved and r
6760: 65 71 75 69 72 65 73 20 61 20 72 61 74 68 65 72  equires a rather
6770: 20 63 6f 6d 70 6c 65 78 20 70 72 6f 63 65 64 75   complex procedu
6780: 72 65 3b 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e  re; the followin
6790: 67 20 65 78 61 6d 70 6c 65 20 73 68 6f 77 73 20  g example shows 
67a0: 68 6f 77 20 74 6f 20 6d 75 6c 74 69 70 6c 79 20  how to multiply 
67b0: 74 77 6f 20 3c 62 3e 34 20 78 20 34 3c 2f 62 3e  two <b>4 x 4</b>
67c0: 20 6d 61 74 72 69 63 65 73 2e 3c 62 72 3e 0d 0a   matrices.<br>..
67d0: 3c 74 61 62 6c 65 20 63 65 6c 6c 73 70 61 63 69  <table cellspaci
67e0: 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 64 64 69  ng="4" cellpaddi
67f0: 6e 67 3d 22 34 22 3e 0d 0a 3c 74 72 3e 3c 74 64  ng="4">..<tr><td
6800: 3e 0d 0a 3c 74 61 62 6c 65 3e 0d 0a 3c 74 72 3e  >..<table>..<tr>
6810: 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c  <td>/</td><td al
6820: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73  ign="center">a<s
6830: 75 62 3e 31 31 3c 2f 73 75 62 3e 3c 2f 74 64 3e  ub>11</sub></td>
6840: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
6850: 72 22 3e 61 3c 73 75 62 3e 31 32 3c 2f 73 75 62  r">a<sub>12</sub
6860: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  ></td><td align=
6870: 22 63 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e 31  "center">a<sub>1
6880: 33 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20  3</sub></td><td 
6890: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61  align="center">a
68a0: 3c 73 75 62 3e 31 34 3c 2f 73 75 62 3e 3c 2f 74  <sub>14</sub></t
68b0: 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72  d><td>\</td></tr
68c0: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64  >..<tr><td>|</td
68d0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
68e0: 65 72 22 3e 61 3c 73 75 62 3e 32 31 3c 2f 73 75  er">a<sub>21</su
68f0: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  b></td><td align
6900: 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e  ="center">a<sub>
6910: 32 32 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64  22</sub></td><td
6920: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
6930: 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e 3c 2f  a<sub>23</sub></
6940: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
6950: 6e 74 65 72 22 3e 61 3c 73 75 62 3e 32 34 3c 2f  nter">a<sub>24</
6960: 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f  sub></td><td>|</
6970: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
6980: 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  d>|</td><td alig
6990: 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73 75 62  n="center">a<sub
69a0: 3e 33 31 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74  >31</sub></td><t
69b0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
69c0: 3e 61 3c 73 75 62 3e 33 32 3c 2f 73 75 62 3e 3c  >a<sub>32</sub><
69d0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
69e0: 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e 33 33 3c  enter">a<sub>33<
69f0: 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c  /sub></td><td al
6a00: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73  ign="center">a<s
6a10: 75 62 3e 33 34 3c 2f 73 75 62 3e 3c 2f 74 64 3e  ub>34</sub></td>
6a20: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  <td>|</td></tr>.
6a30: 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c  .<tr><td>\</td><
6a40: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
6a50: 22 3e 61 3c 73 75 62 3e 34 31 3c 2f 73 75 62 3e  ">a<sub>41</sub>
6a60: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
6a70: 63 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e 34 32  center">a<sub>42
6a80: 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61  </sub></td><td a
6a90: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c  lign="center">a<
6aa0: 73 75 62 3e 34 33 3c 2f 73 75 62 3e 3c 2f 74 64  sub>43</sub></td
6ab0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
6ac0: 65 72 22 3e 61 3c 73 75 62 3e 34 34 3c 2f 73 75  er">a<sub>44</su
6ad0: 62 3e 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64  b></td><td>/</td
6ae0: 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e  ></tr>..</table>
6af0: 0d 0a 3c 2f 74 64 3e 3c 74 64 20 76 61 6c 69 67  ..</td><td valig
6b00: 6e 3d 22 6d 69 64 64 6c 65 22 3e 2a 3c 2f 74 64  n="middle">*</td
6b10: 3e 0d 0a 3c 74 64 3e 0d 0a 3c 74 61 62 6c 65 3e  >..<td>..<table>
6b20: 0d 0a 3c 74 72 3e 3c 74 64 3e 2f 3c 2f 74 64 3e  ..<tr><td>/</td>
6b30: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
6b40: 72 22 3e 62 3c 73 75 62 3e 31 31 3c 2f 73 75 62  r">b<sub>11</sub
6b50: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  ></td><td align=
6b60: 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 31  "center">b<sub>1
6b70: 32 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20  2</sub></td><td 
6b80: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62  align="center">b
6b90: 3c 73 75 62 3e 31 33 3c 2f 73 75 62 3e 3c 2f 74  <sub>13</sub></t
6ba0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
6bb0: 74 65 72 22 3e 62 3c 73 75 62 3e 31 34 3c 2f 73  ter">b<sub>14</s
6bc0: 75 62 3e 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74  ub></td><td>\</t
6bd0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
6be0: 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >|</td><td align
6bf0: 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e  ="center">b<sub>
6c00: 32 31 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64  21</sub></td><td
6c10: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
6c20: 62 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e 3c 2f  b<sub>22</sub></
6c30: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
6c40: 6e 74 65 72 22 3e 62 3c 73 75 62 3e 32 33 3c 2f  nter">b<sub>23</
6c50: 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  sub></td><td ali
6c60: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 75  gn="center">b<su
6c70: 62 3e 32 34 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c  b>24</sub></td><
6c80: 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>|</td></tr>..
6c90: 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74  <tr><td>|</td><t
6ca0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
6cb0: 3e 62 3c 73 75 62 3e 33 31 3c 2f 73 75 62 3e 3c  >b<sub>31</sub><
6cc0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
6cd0: 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 33 32 3c  enter">b<sub>32<
6ce0: 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c  /sub></td><td al
6cf0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73  ign="center">b<s
6d00: 75 62 3e 33 33 3c 2f 73 75 62 3e 3c 2f 74 64 3e  ub>33</sub></td>
6d10: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
6d20: 72 22 3e 62 3c 73 75 62 3e 33 34 3c 2f 73 75 62  r">b<sub>34</sub
6d30: 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e  ></td><td>|</td>
6d40: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c  </tr>..<tr><td>\
6d50: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
6d60: 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 34 31  center">b<sub>41
6d70: 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61  </sub></td><td a
6d80: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c  lign="center">b<
6d90: 73 75 62 3e 34 32 3c 2f 73 75 62 3e 3c 2f 74 64  sub>42</sub></td
6da0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
6db0: 65 72 22 3e 62 3c 73 75 62 3e 34 33 3c 2f 73 75  er">b<sub>43</su
6dc0: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  b></td><td align
6dd0: 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e  ="center">b<sub>
6de0: 34 34 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64  44</sub></td><td
6df0: 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f  >/</td></tr>..</
6e00: 74 61 62 6c 65 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c  table>..</td>..<
6e10: 2f 74 64 3e 3c 74 64 20 76 61 6c 69 67 6e 3d 22  /td><td valign="
6e20: 6d 69 64 64 6c 65 22 3e 3d 3c 2f 74 64 3e 0d 0a  middle">=</td>..
6e30: 3c 74 64 3e 0d 0a 3c 74 61 62 6c 65 3e 0d 0a 3c  <td>..<table>..<
6e40: 74 72 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64  tr><td>/</td><td
6e50: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
6e60: 0d 0a 28 61 3c 73 75 62 3e 31 31 3c 2f 73 75 62  ..(a<sub>11</sub
6e70: 3e 2a 62 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e  >*b<sub>11</sub>
6e80: 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 32 3c 2f 73   + ..a<sub>12</s
6e90: 75 62 3e 2a 62 3c 73 75 62 3e 32 31 3c 2f 73 75  ub>*b<sub>21</su
6ea0: 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 33 3c  b> + ..a<sub>13<
6eb0: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 31 3c 2f  /sub>*b<sub>31</
6ec0: 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31  sub> + ..a<sub>1
6ed0: 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 31  4</sub>*b<sub>41
6ee0: 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74  </sub>)</td>..<t
6ef0: 64 3e 28 61 3c 73 75 62 3e 31 31 3c 2f 73 75 62  d>(a<sub>11</sub
6f00: 3e 2a 62 3c 73 75 62 3e 31 32 3c 2f 73 75 62 3e  >*b<sub>12</sub>
6f10: 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 32 3c 2f 73   + ..a<sub>12</s
6f20: 75 62 3e 2a 62 3c 73 75 62 3e 32 32 3c 2f 73 75  ub>*b<sub>22</su
6f30: 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 33 3c  b> + ..a<sub>13<
6f40: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 32 3c 2f  /sub>*b<sub>32</
6f50: 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 31 34  sub> +..a<sub>14
6f60: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 32 3c  </sub>*b<sub>42<
6f70: 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64  /sub>)</td>..<td
6f80: 3e 28 61 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e  >(a<sub>11</sub>
6f90: 2a 62 3c 73 75 62 3e 31 33 3c 2f 73 75 62 3e 20  *b<sub>13</sub> 
6fa0: 2b 20 0d 0a 61 3c 73 75 62 3e 31 32 3c 2f 73 75  + ..a<sub>12</su
6fb0: 62 3e 2a 62 3c 73 75 62 3e 32 33 3c 2f 73 75 62  b>*b<sub>23</sub
6fc0: 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 33 3c 2f  > + ..a<sub>13</
6fd0: 73 75 62 3e 2a 62 3c 73 75 62 3e 33 33 3c 2f 73  sub>*b<sub>33</s
6fe0: 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 31 34 3c  ub> +..a<sub>14<
6ff0: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 33 3c 2f  /sub>*b<sub>43</
7000: 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e  sub>)</td>..<td>
7010: 28 61 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e 2a  (a<sub>11</sub>*
7020: 62 3c 73 75 62 3e 31 34 3c 2f 73 75 62 3e 20 2b  b<sub>14</sub> +
7030: 20 0d 0a 61 3c 73 75 62 3e 31 32 3c 2f 73 75 62   ..a<sub>12</sub
7040: 3e 2a 62 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e  >*b<sub>24</sub>
7050: 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 33 3c 2f 73   + ..a<sub>13</s
7060: 75 62 3e 2a 62 3c 73 75 62 3e 33 34 3c 2f 73 75  ub>*b<sub>34</su
7070: 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 31 34 3c 2f  b> +..a<sub>14</
7080: 73 75 62 3e 2a 62 3c 73 75 62 3e 34 34 3c 2f 73  sub>*b<sub>44</s
7090: 75 62 3e 29 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f  ub>)</td><td>\</
70a0: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
70b0: 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  d>|</td><td alig
70c0: 6e 3d 22 63 65 6e 74 65 72 22 3e 0d 0a 28 61 3c  n="center">..(a<
70d0: 73 75 62 3e 32 31 3c 2f 73 75 62 3e 2a 62 3c 73  sub>21</sub>*b<s
70e0: 75 62 3e 31 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a  ub>11</sub> + ..
70f0: 61 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e 2a 62  a<sub>22</sub>*b
7100: 3c 73 75 62 3e 32 31 3c 2f 73 75 62 3e 20 2b 20  <sub>21</sub> + 
7110: 0d 0a 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e  ..a<sub>23</sub>
7120: 2a 62 3c 73 75 62 3e 33 31 3c 2f 73 75 62 3e 20  *b<sub>31</sub> 
7130: 2b 20 0d 0a 61 3c 73 75 62 3e 32 34 3c 2f 73 75  + ..a<sub>24</su
7140: 62 3e 2a 62 3c 73 75 62 3e 34 31 3c 2f 73 75 62  b>*b<sub>41</sub
7150: 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 28 61 3c  >)</td>..<td>(a<
7160: 73 75 62 3e 32 31 3c 2f 73 75 62 3e 2a 62 3c 73  sub>21</sub>*b<s
7170: 75 62 3e 31 32 3c 2f 73 75 62 3e 20 2b 20 0d 0a  ub>12</sub> + ..
7180: 61 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e 2a 62  a<sub>22</sub>*b
7190: 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e 20 2b 20  <sub>22</sub> + 
71a0: 0d 0a 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e  ..a<sub>23</sub>
71b0: 2a 62 3c 73 75 62 3e 33 32 3c 2f 73 75 62 3e 20  *b<sub>32</sub> 
71c0: 2b 0d 0a 61 3c 73 75 62 3e 32 34 3c 2f 73 75 62  +..a<sub>24</sub
71d0: 3e 2a 62 3c 73 75 62 3e 34 32 3c 2f 73 75 62 3e  >*b<sub>42</sub>
71e0: 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 28 61 3c 73  )</td>..<td>(a<s
71f0: 75 62 3e 32 31 3c 2f 73 75 62 3e 2a 62 3c 73 75  ub>21</sub>*b<su
7200: 62 3e 31 33 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61  b>13</sub> + ..a
7210: 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e 2a 62 3c  <sub>22</sub>*b<
7220: 73 75 62 3e 32 33 3c 2f 73 75 62 3e 20 2b 20 0d  sub>23</sub> + .
7230: 0a 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e 2a  .a<sub>23</sub>*
7240: 62 3c 73 75 62 3e 33 33 3c 2f 73 75 62 3e 20 2b  b<sub>33</sub> +
7250: 0d 0a 61 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e  ..a<sub>24</sub>
7260: 2a 62 3c 73 75 62 3e 34 33 3c 2f 73 75 62 3e 29  *b<sub>43</sub>)
7270: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 28 61 3c 73 75  </td>..<td>(a<su
7280: 62 3e 32 31 3c 2f 73 75 62 3e 2a 62 3c 73 75 62  b>21</sub>*b<sub
7290: 3e 31 34 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c  >14</sub> + ..a<
72a0: 73 75 62 3e 32 32 3c 2f 73 75 62 3e 2a 62 3c 73  sub>22</sub>*b<s
72b0: 75 62 3e 32 34 3c 2f 73 75 62 3e 20 2b 20 0d 0a  ub>24</sub> + ..
72c0: 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e 2a 62  a<sub>23</sub>*b
72d0: 3c 73 75 62 3e 33 34 3c 2f 73 75 62 3e 20 2b 0d  <sub>34</sub> +.
72e0: 0a 61 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e 2a  .a<sub>24</sub>*
72f0: 62 3c 73 75 62 3e 34 34 3c 2f 73 75 62 3e 29 3c  b<sub>44</sub>)<
7300: 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f  /td><td>|</td></
7310: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f  tr>..<tr><td>|</
7320: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
7330: 6e 74 65 72 22 3e 0d 0a 28 61 3c 73 75 62 3e 33  nter">..(a<sub>3
7340: 31 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 31  1</sub>*b<sub>11
7350: 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62  </sub> + ..a<sub
7360: 3e 33 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e  >32</sub>*b<sub>
7370: 32 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73  21</sub> + ..a<s
7380: 75 62 3e 33 33 3c 2f 73 75 62 3e 2a 62 3c 73 75  ub>33</sub>*b<su
7390: 62 3e 33 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61  b>31</sub> + ..a
73a0: 3c 73 75 62 3e 33 34 3c 2f 73 75 62 3e 2a 62 3c  <sub>34</sub>*b<
73b0: 73 75 62 3e 34 31 3c 2f 73 75 62 3e 29 3c 2f 74  sub>41</sub>)</t
73c0: 64 3e 0d 0a 3c 74 64 3e 28 61 3c 73 75 62 3e 33  d>..<td>(a<sub>3
73d0: 31 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 32  1</sub>*b<sub>12
73e0: 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62  </sub> + ..a<sub
73f0: 3e 33 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e  >32</sub>*b<sub>
7400: 32 32 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73  22</sub> + ..a<s
7410: 75 62 3e 33 33 3c 2f 73 75 62 3e 2a 62 3c 73 75  ub>33</sub>*b<su
7420: 62 3e 33 32 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c  b>32</sub> +..a<
7430: 73 75 62 3e 33 34 3c 2f 73 75 62 3e 2a 62 3c 73  sub>34</sub>*b<s
7440: 75 62 3e 34 32 3c 2f 73 75 62 3e 29 3c 2f 74 64  ub>42</sub>)</td
7450: 3e 0d 0a 3c 74 64 3e 28 61 3c 73 75 62 3e 33 31  >..<td>(a<sub>31
7460: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 33 3c  </sub>*b<sub>13<
7470: 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e  /sub> + ..a<sub>
7480: 33 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32  32</sub>*b<sub>2
7490: 33 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75  3</sub> + ..a<su
74a0: 62 3e 33 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62  b>33</sub>*b<sub
74b0: 3e 33 33 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73  >33</sub> +..a<s
74c0: 75 62 3e 33 34 3c 2f 73 75 62 3e 2a 62 3c 73 75  ub>34</sub>*b<su
74d0: 62 3e 34 33 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e  b>43</sub>)</td>
74e0: 0d 0a 3c 74 64 3e 28 61 3c 73 75 62 3e 33 31 3c  ..<td>(a<sub>31<
74f0: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 34 3c 2f  /sub>*b<sub>14</
7500: 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 33  sub> + ..a<sub>3
7510: 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 34  2</sub>*b<sub>24
7520: 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62  </sub> + ..a<sub
7530: 3e 33 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e  >33</sub>*b<sub>
7540: 33 34 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75  34</sub> +..a<su
7550: 62 3e 33 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62  b>34</sub>*b<sub
7560: 3e 34 34 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 3c  >44</sub>)</td><
7570: 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>|</td></tr>..
7580: 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74  <tr><td>\</td><t
7590: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
75a0: 3e 0d 0a 28 61 3c 73 75 62 3e 34 31 3c 2f 73 75  >..(a<sub>41</su
75b0: 62 3e 2a 62 3c 73 75 62 3e 31 31 3c 2f 73 75 62  b>*b<sub>11</sub
75c0: 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 32 3c 2f  > + ..a<sub>42</
75d0: 73 75 62 3e 2a 62 3c 73 75 62 3e 32 31 3c 2f 73  sub>*b<sub>21</s
75e0: 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 33  ub> + ..a<sub>43
75f0: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 31 3c  </sub>*b<sub>31<
7600: 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e  /sub> + ..a<sub>
7610: 34 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34  44</sub>*b<sub>4
7620: 31 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c  1</sub>)</td>..<
7630: 74 64 3e 28 61 3c 73 75 62 3e 34 31 3c 2f 73 75  td>(a<sub>41</su
7640: 62 3e 2a 62 3c 73 75 62 3e 31 32 3c 2f 73 75 62  b>*b<sub>12</sub
7650: 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 32 3c 2f  > + ..a<sub>42</
7660: 73 75 62 3e 2a 62 3c 73 75 62 3e 32 32 3c 2f 73  sub>*b<sub>22</s
7670: 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 33  ub> + ..a<sub>43
7680: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 32 3c  </sub>*b<sub>32<
7690: 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 34  /sub> +..a<sub>4
76a0: 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 32  4</sub>*b<sub>42
76b0: 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74  </sub>)</td>..<t
76c0: 64 3e 28 61 3c 73 75 62 3e 34 31 3c 2f 73 75 62  d>(a<sub>41</sub
76d0: 3e 2a 62 3c 73 75 62 3e 31 33 3c 2f 73 75 62 3e  >*b<sub>13</sub>
76e0: 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 32 3c 2f 73   + ..a<sub>42</s
76f0: 75 62 3e 2a 62 3c 73 75 62 3e 32 33 3c 2f 73 75  ub>*b<sub>23</su
7700: 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 33 3c  b> + ..a<sub>43<
7710: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 33 3c 2f  /sub>*b<sub>33</
7720: 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 34 34  sub> +..a<sub>44
7730: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 33 3c  </sub>*b<sub>43<
7740: 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64  /sub>)</td>..<td
7750: 3e 28 61 3c 73 75 62 3e 34 31 3c 2f 73 75 62 3e  >(a<sub>41</sub>
7760: 2a 62 3c 73 75 62 3e 31 34 3c 2f 73 75 62 3e 20  *b<sub>14</sub> 
7770: 2b 20 0d 0a 61 3c 73 75 62 3e 34 32 3c 2f 73 75  + ..a<sub>42</su
7780: 62 3e 2a 62 3c 73 75 62 3e 32 34 3c 2f 73 75 62  b>*b<sub>24</sub
7790: 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 33 3c 2f  > + ..a<sub>43</
77a0: 73 75 62 3e 2a 62 3c 73 75 62 3e 33 34 3c 2f 73  sub>*b<sub>34</s
77b0: 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 34 34 3c  ub> +..a<sub>44<
77c0: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 34 3c 2f  /sub>*b<sub>44</
77d0: 73 75 62 3e 29 3c 2f 74 64 3e 3c 74 64 3e 2f 3c  sub>)</td><td>/<
77e0: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62  /td></tr>..</tab
77f0: 6c 65 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c  le>..</td></tr><
7800: 2f 74 61 62 6c 65 3e 0d 0a 3c 68 33 3e 69 64 65  /table>..<h3>ide
7810: 6e 74 69 74 79 20 6d 61 74 72 69 78 3c 2f 68 33  ntity matrix</h3
7820: 3e 0d 0a 41 6e 20 69 64 65 6e 74 69 74 79 20 6d  >..An identity m
7830: 61 74 72 69 78 20 73 69 6d 70 6c 79 20 63 6f 72  atrix simply cor
7840: 72 65 73 70 6f 6e 64 73 20 74 6f 20 61 6e 20 61  responds to an a
7850: 66 66 69 6e 65 20 74 72 61 6e 73 66 6f 72 6d 61  ffine transforma
7860: 74 69 6f 6e 20 6c 61 63 6b 69 6e 67 20 61 6e 79  tion lacking any
7870: 20 61 63 74 75 61 6c 20 65 66 66 65 63 74 3a 20   actual effect: 
7880: 61 74 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68  at the end of th
7890: 65 20 70 72 6f 63 65 73 73 20 74 68 65 20 74 72  e process the tr
78a0: 61 6e 73 66 6f 72 6d 65 64 20 67 65 6f 6d 65 74  ansformed geomet
78b0: 72 79 20 77 69 6c 6c 20 62 65 20 65 78 61 63 74  ry will be exact
78c0: 6c 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 62  ly the same as b
78d0: 65 66 6f 72 65 2e 3c 62 72 3e 0d 0a 4d 6f 72 65  efore.<br>..More
78e0: 6f 76 65 72 20 61 6e 20 69 64 65 6e 74 69 74 79  over an identity
78f0: 20 6d 61 74 72 69 78 20 70 6c 61 79 73 20 61 20   matrix plays a 
7900: 73 70 65 63 69 61 6c 20 72 6f 6c 65 20 69 6e 20  special role in 
7910: 6d 75 6c 74 69 70 6c 69 63 61 74 69 6f 6e 3a 20  multiplication: 
7920: 74 68 65 20 72 65 73 75 6c 74 69 6e 67 20 6d 61  the resulting ma
7930: 74 72 69 78 20 77 69 6c 6c 20 61 6c 77 61 79 73  trix will always
7940: 20 62 65 20 65 78 61 63 74 6c 79 20 74 68 65 20   be exactly the 
7950: 73 61 6d 65 20 6f 66 20 74 68 65 20 6f 74 68 65  same of the othe
7960: 72 20 6d 61 74 72 69 78 2e 3c 62 72 3e 0d 0a 28  r matrix.<br>..(
7970: 3c 69 3e 69 74 27 73 20 6d 6f 72 65 20 6f 72 20  <i>it's more or 
7980: 6c 65 73 73 20 74 68 65 20 65 71 75 69 76 61 6c  less the equival
7990: 65 6e 74 20 6f 66 20 6d 75 6c 74 69 70 6c 79 69  ent of multiplyi
79a0: 6e 67 20 65 2e 67 2e 20 3c 62 3e 38 2a 31 3d 38  ng e.g. <b>8*1=8
79b0: 3c 2f 62 3e 20 69 6e 20 61 6e 20 6f 72 64 69 6e  </b> in an ordin
79c0: 61 72 79 20 73 63 61 6c 61 72 20 6d 75 6c 74 69  ary scalar multi
79d0: 70 6c 69 63 61 74 69 6f 6e 3c 2f 69 3e 29 2e 0d  plication</i>)..
79e0: 0a 3c 68 33 3e 69 6e 76 65 72 73 65 20 6d 61 74  .<h3>inverse mat
79f0: 72 69 78 3c 2f 68 33 3e 0d 0a 49 66 20 74 77 6f  rix</h3>..If two
7a00: 20 28 6e 6f 6e 2d 69 64 65 6e 74 69 74 79 29 20   (non-identity) 
7a10: 6d 61 74 72 69 63 65 73 20 61 72 65 20 73 75 63  matrices are suc
7a20: 68 20 74 68 61 74 20 74 68 65 69 72 20 6d 75 6c  h that their mul
7a30: 74 69 70 6c 69 63 61 74 69 6f 6e 20 70 72 6f 64  tiplication prod
7a40: 75 63 65 73 20 61 6e 20 69 64 65 6e 74 69 74 79  uces an identity
7a50: 20 6d 61 74 72 69 78 20 74 68 65 79 20 61 72 65   matrix they are
7a60: 20 73 61 69 64 20 74 6f 20 62 65 20 6f 6e 65 20   said to be one 
7a70: 74 68 65 20 69 6e 76 65 72 73 65 20 6f 66 20 74  the inverse of t
7a80: 68 65 20 6f 74 68 65 72 2e 3c 62 72 3e 0d 0a 49  he other.<br>..I
7a90: 6e 20 73 69 6d 70 6c 65 72 20 77 6f 72 64 73 20  n simpler words 
7aa0: 62 6f 74 68 20 74 68 65 6d 20 63 61 75 73 65 20  both them cause 
7ab0: 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74 69 63  the same identic
7ac0: 61 6c 20 74 72 61 73 66 6f 72 6d 61 74 69 6f 6e  al trasformation
7ad0: 73 20 62 75 74 20 69 6e 20 65 78 61 63 74 6c 79  s but in exactly
7ae0: 20 6f 70 70 6f 73 69 74 65 20 77 61 79 73 2c 20   opposite ways, 
7af0: 73 6f 20 74 68 61 74 20 74 68 65 20 66 69 6e 61  so that the fina
7b00: 6c 20 63 6f 6d 62 69 6e 61 74 69 6f 6e 20 73 69  l combination si
7b10: 6d 70 6c 79 20 69 73 20 61 20 6e 6f 2d 6f 70 2e  mply is a no-op.
7b20: 3c 62 72 3e 0d 0a 3c 75 3e 50 6c 65 61 73 65 20  <br>..<u>Please 
7b30: 6e 6f 74 65 3c 2f 75 3e 3a 20 6e 6f 74 20 61 6c  note</u>: not al
7b40: 6c 20 41 66 66 69 6e 65 20 54 72 61 73 66 6f 72  l Affine Trasfor
7b50: 6d 61 74 69 6f 6e 20 6d 61 74 72 69 63 65 73 20  mation matrices 
7b60: 6e 65 63 65 73 73 61 72 69 6c 79 20 68 61 76 65  necessarily have
7b70: 20 61 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67   a corresponding
7b80: 20 69 6e 76 65 72 73 65 20 6d 61 74 72 69 78 2e   inverse matrix.
7b90: 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 68 72 3e 0d 0a  <br><br>..<hr>..
7ba0: 3c 68 33 3e 42 6f 72 69 6e 67 20 53 51 4c 20 66  <h3>Boring SQL f
7bb0: 75 6e 63 74 69 6f 6e 73 3a 20 61 20 66 6f 72 6d  unctions: a form
7bc0: 61 6c 20 65 78 70 6c 61 6e 61 74 69 6f 6e 3c 2f  al explanation</
7bd0: 68 33 3e 0d 0a 3c 74 61 62 6c 65 20 62 6f 72 64  h3>..<table bord
7be0: 65 72 3d 22 31 22 20 63 65 6c 6c 73 70 61 63 69  er="1" cellspaci
7bf0: 6e 67 3d 22 34 22 20 63 65 6c 6c 70 61 64 64 69  ng="4" cellpaddi
7c00: 6e 67 3d 22 38 22 20 62 67 63 6f 6c 6f 72 3d 22  ng="8" bgcolor="
7c10: 23 66 66 66 30 64 30 22 3e 0d 0a 3c 74 72 3e 3c  #fff0d0">..<tr><
7c20: 74 68 20 62 67 63 6f 6c 6f 72 3d 22 23 43 33 42  th bgcolor="#C3B
7c30: 30 39 31 22 3e 53 51 4c 20 46 75 6e 63 74 69 6f  091">SQL Functio
7c40: 6e 3c 2f 74 68 3e 3c 74 68 20 62 67 63 6f 6c 6f  n</th><th bgcolo
7c50: 72 3d 22 23 43 33 42 30 39 31 22 3e 44 65 73 63  r="#C3B091">Desc
7c60: 72 69 70 74 69 6f 6e 3c 2f 74 68 3e 3c 2f 74 72  ription</th></tr
7c70: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54  >..<tr><td><b>AT
7c80: 4d 5f 54 72 61 6e 73 66 6f 72 6d 20 28 20 42 4c  M_Transform ( BL
7c90: 4f 42 20 47 65 6f 6d 65 74 72 79 20 2c 20 42 4c  OB Geometry , BL
7ca0: 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 29 20 3a  OB AT-matrix ) :
7cb0: 20 42 4c 4f 42 20 47 65 6f 6d 65 74 72 79 3c 2f   BLOB Geometry</
7cc0: 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75  td><td>Will retu
7cd0: 72 6e 20 61 20 6e 65 77 20 47 65 6f 6d 65 74 72  rn a new Geometr
7ce0: 79 20 62 79 20 61 70 70 6c 79 69 6e 67 20 61 6e  y by applying an
7cf0: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72   Affine Transfor
7d00: 6d 61 74 69 6f 6e 20 74 6f 20 74 68 65 20 69 6e  mation to the in
7d10: 70 75 74 20 47 65 6f 6d 65 74 72 79 2e 3c 62 72  put Geometry.<br
7d20: 3e 0d 0a 54 68 65 20 6f 75 74 70 75 74 20 47 65  >..The output Ge
7d30: 6f 6d 65 74 72 79 20 77 69 6c 6c 20 70 72 65 73  ometry will pres
7d40: 65 72 76 65 20 74 68 65 20 6f 72 69 67 69 6e 61  erve the origina
7d50: 6c 20 53 52 49 44 2c 20 64 69 6d 65 6e 73 69 6f  l SRID, dimensio
7d60: 6e 73 20 61 6e 64 20 74 79 70 65 2e 3c 62 72 3e  ns and type.<br>
7d70: 0d 0a 4e 55 4c 4c 20 77 69 6c 6c 20 62 65 20 72  ..NULL will be r
7d80: 65 74 75 72 6e 65 64 20 6f 6e 20 69 6e 76 61 6c  eturned on inval
7d90: 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74  id arguments.</t
7da0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
7db0: 3e 3c 62 3e 41 54 4d 5f 54 72 61 6e 73 66 6f 72  ><b>ATM_Transfor
7dc0: 6d 20 28 20 42 4c 4f 42 20 47 65 6f 6d 65 74 72  m ( BLOB Geometr
7dd0: 79 20 2c 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72  y , BLOB AT-matr
7de0: 69 78 20 2c 20 69 6e 74 20 73 72 69 64 20 29 20  ix , int srid ) 
7df0: 3a 20 42 4c 4f 42 20 47 65 6f 6d 65 74 72 79 3c  : BLOB Geometry<
7e00: 2f 74 64 3e 3c 74 64 3e 53 61 6d 65 20 61 73 20  /td><td>Same as 
7e10: 61 62 6f 76 65 2c 20 62 75 74 20 74 68 65 20 6f  above, but the o
7e20: 75 74 70 75 74 20 47 65 6f 6d 65 74 72 79 20 77  utput Geometry w
7e30: 69 6c 6c 20 61 73 73 75 6d 65 20 74 68 65 20 65  ill assume the e
7e40: 78 70 6c 69 63 69 74 6c 79 20 73 65 74 20 53 52  xplicitly set SR
7e50: 49 44 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  ID.</td></tr>..<
7e60: 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 49 73  tr><td><b>ATM_Is
7e70: 56 61 6c 69 64 20 28 20 42 4c 4f 42 20 41 54 2d  Valid ( BLOB AT-
7e80: 6d 61 74 72 69 78 20 29 20 3a 20 42 4f 4f 4c 45  matrix ) : BOOLE
7e90: 41 4e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20  AN</td><td>Will 
7ea0: 63 68 65 63 6b 20 69 66 20 61 20 42 4c 4f 42 20  check if a BLOB 
7eb0: 64 6f 20 72 65 61 6c 6c 79 20 63 6f 72 72 65 73  do really corres
7ec0: 70 6f 6e 64 20 74 6f 20 61 6e 20 65 6e 63 6f 64  pond to an encod
7ed0: 65 64 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66  ed Affine Transf
7ee0: 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 20  ormation Matrix 
7ef0: 74 68 65 6e 20 72 65 74 75 72 6e 69 6e 67 20 54  then returning T
7f00: 52 55 45 20 6f 72 20 46 41 4c 53 45 2e 3c 62 72  RUE or FALSE.<br
7f10: 3e 0d 0a 2d 31 20 77 69 6c 6c 20 62 65 20 72 65  >..-1 will be re
7f20: 74 75 72 6e 65 64 20 69 66 20 74 68 65 20 61 72  turned if the ar
7f30: 67 75 6d 65 6e 74 20 69 73 6e 27 74 20 6f 66 20  gument isn't of 
7f40: 74 68 65 20 42 4c 4f 42 20 74 79 70 65 2e 3c 2f  the BLOB type.</
7f50: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
7f60: 64 3e 3c 62 3e 41 54 4d 5f 41 73 54 65 78 74 20  d><b>ATM_AsText 
7f70: 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78  ( BLOB AT-matrix
7f80: 20 29 20 3a 20 54 45 58 54 3c 2f 74 64 3e 3c 74   ) : TEXT</td><t
7f90: 64 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 20  d>Will return a 
7fa0: 74 65 78 74 20 73 65 72 69 61 6c 69 7a 65 64 20  text serialized 
7fb0: 72 65 70 72 65 73 65 6e 74 61 74 69 6f 6e 20 6f  representation o
7fc0: 66 20 74 68 65 20 4d 61 74 72 69 78 2e 3c 62 72  f the Matrix.<br
7fd0: 3e 0d 0a 4e 55 4c 4c 20 77 69 6c 6c 20 62 65 20  >..NULL will be 
7fe0: 72 65 74 75 72 6e 65 64 20 6f 6e 20 69 6e 76 61  returned on inva
7ff0: 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f  lid arguments.</
8000: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
8010: 68 20 63 6f 6c 73 70 61 6e 3d 22 32 22 20 62 67  h colspan="2" bg
8020: 63 6f 6c 6f 72 3d 22 23 46 30 45 36 38 43 22 20  color="#F0E68C" 
8030: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62  align="center">b
8040: 61 73 69 63 20 53 51 4c 20 66 75 6e 63 74 69 6f  asic SQL functio
8050: 6e 73 20 6f 6e 20 41 66 66 69 6e 65 20 54 72 61  ns on Affine Tra
8060: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72  nsformation Matr
8070: 69 78 3c 2f 74 68 3e 3c 2f 74 72 3e 0d 0a 3c 74  ix</th></tr>..<t
8080: 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 4d 75 6c  r><td><b>ATM_Mul
8090: 74 69 70 6c 79 20 28 20 42 4c 4f 42 20 41 54 2d  tiply ( BLOB AT-
80a0: 6d 61 74 72 69 78 2d 41 20 2c 20 42 4c 4f 42 20  matrix-A , BLOB 
80b0: 41 54 2d 6d 61 74 72 69 78 2d 42 20 29 20 3a 20  AT-matrix-B ) : 
80c0: 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f  BLOB AT-matrix</
80d0: 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 6d 75 6c 74  td><td>Will mult
80e0: 69 70 6c 79 20 4d 61 74 72 69 78 2d 42 20 62 79  iply Matrix-B by
80f0: 20 4d 61 74 72 69 78 2d 41 20 74 68 65 6e 20 72   Matrix-A then r
8100: 65 74 75 72 6e 69 6e 67 20 74 68 65 20 72 65 73  eturning the res
8110: 75 6c 74 69 6e 67 20 4d 61 74 72 69 78 2e 3c 62  ulting Matrix.<b
8120: 72 3e 0d 0a 4e 55 4c 4c 20 77 69 6c 6c 20 62 65  r>..NULL will be
8130: 20 72 65 74 75 72 6e 65 64 20 6f 6e 20 69 6e 76   returned on inv
8140: 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c  alid arguments.<
8150: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
8160: 74 64 3e 3c 62 3e 41 54 4d 5f 44 65 74 65 72 6d  td><b>ATM_Determ
8170: 69 6e 61 6e 74 20 28 20 42 4c 4f 42 20 41 54 2d  inant ( BLOB AT-
8180: 6d 61 74 72 69 78 20 29 20 3a 20 64 6f 75 62 6c  matrix ) : doubl
8190: 65 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72  e</td><td>Will r
81a0: 65 74 75 72 6e 20 74 68 65 20 3c 61 20 68 72 65  eturn the <a hre
81b0: 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b  f="http://en.wik
81c0: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f  ipedia.org/wiki/
81d0: 44 65 74 65 72 6d 69 6e 61 6e 74 22 3e 64 65 74  Determinant">det
81e0: 65 72 6d 69 6e 61 6e 74 3c 2f 61 3e 20 6f 66 20  erminant</a> of 
81f0: 74 68 65 20 4d 61 74 72 69 78 2e 3c 62 72 3e 0d  the Matrix.<br>.
8200: 0a 4e 55 4c 4c 20 77 69 6c 6c 20 62 65 20 72 65  .NULL will be re
8210: 74 75 72 6e 65 64 20 6f 6e 20 69 6e 76 61 6c 69  turned on invali
8220: 64 20 61 72 67 75 6d 65 6e 74 2e 3c 2f 74 64 3e  d argument.</td>
8230: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c  </tr>..<tr><td><
8240: 62 3e 41 54 4d 5f 49 73 49 6e 76 65 72 74 69 62  b>ATM_IsInvertib
8250: 6c 65 20 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74  le ( BLOB AT-mat
8260: 72 69 78 20 29 20 3a 20 62 6f 6f 6c 65 61 6e 3c  rix ) : boolean<
8270: 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74  /td><td>Will ret
8280: 75 72 6e 20 31 20 3c 62 3e 54 52 55 45 3c 2f 62  urn 1 <b>TRUE</b
8290: 3e 20 69 66 20 74 68 65 20 41 66 66 69 6e 65 20  > if the Affine 
82a0: 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 6d  Transformation m
82b0: 61 74 72 69 78 20 63 61 6e 20 62 65 20 69 6e 76  atrix can be inv
82c0: 65 72 74 65 64 2c 20 30 20 3c 62 3e 46 41 4c 53  erted, 0 <b>FALS
82d0: 45 3c 2f 62 3e 20 69 66 20 6e 6f 74 20 28 3c 69  E</b> if not (<i
82e0: 3e 6f 6e 6c 79 20 6d 61 74 72 69 63 65 73 20 70  >only matrices p
82f0: 72 65 73 65 6e 74 69 6e 67 20 61 20 64 65 74 65  resenting a dete
8300: 72 6d 69 6e 61 6e 74 20 64 69 66 66 65 72 65 6e  rminant differen
8310: 74 20 66 72 6f 6d 20 7a 65 72 6f 20 63 61 6e 20  t from zero can 
8320: 62 65 20 69 6e 76 65 72 74 65 64 3c 2f 69 3e 29  be inverted</i>)
8330: 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 77 69 6c 6c  .<br>..NULL will
8340: 20 62 65 20 72 65 74 75 72 6e 65 64 20 6f 6e 20   be returned on 
8350: 69 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74  invalid argument
8360: 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  .</td></tr>..<tr
8370: 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 49 6e 76 65  ><td><b>ATM_Inve
8380: 72 74 20 28 20 42 4c 4f 42 20 41 54 2d 6d 61 74  rt ( BLOB AT-mat
8390: 72 69 78 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d  rix ) : BLOB AT-
83a0: 6d 61 74 72 69 78 3c 2f 74 64 3e 3c 74 64 3e 57  matrix</td><td>W
83b0: 69 6c 6c 20 72 65 74 75 72 6e 20 74 68 65 20 3c  ill return the <
83c0: 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65  a href="http://e
83d0: 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f  n.wikipedia.org/
83e0: 77 69 6b 69 2f 49 6e 76 65 72 74 69 62 6c 65 5f  wiki/Invertible_
83f0: 6d 61 74 72 69 78 22 3e 69 6e 76 65 72 73 65 3c  matrix">inverse<
8400: 2f 61 3e 20 6d 61 74 72 69 78 2e 3c 62 72 3e 0d  /a> matrix.<br>.
8410: 0a 4e 55 4c 4c 20 77 69 6c 6c 20 62 65 20 72 65  .NULL will be re
8420: 74 75 72 6e 65 64 20 6f 6e 20 69 6e 76 61 6c 69  turned on invali
8430: 64 20 61 72 67 75 6d 65 6e 74 2e 3c 2f 74 64 3e  d argument.</td>
8440: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 68 20 63  </tr>..<tr><th c
8450: 6f 6c 73 70 61 6e 3d 22 32 22 20 62 67 63 6f 6c  olspan="2" bgcol
8460: 6f 72 3d 22 23 46 30 45 36 38 43 22 20 61 6c 69  or="#F0E68C" ali
8470: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 53 51 4c 20  gn="center">SQL 
8480: 66 75 6e 63 74 69 6f 6e 73 20 63 72 65 61 74 69  functions creati
8490: 6e 67 20 61 6e 64 20 69 6e 69 74 69 61 6c 69 7a  ng and initializ
84a0: 69 6e 67 20 61 20 6e 65 77 20 41 66 66 69 6e 65  ing a new Affine
84b0: 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20   Transformation 
84c0: 4d 61 74 72 69 78 3c 2f 74 68 3e 3c 2f 74 72 3e  Matrix</th></tr>
84d0: 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d  ..<tr><td><b>ATM
84e0: 5f 43 72 65 61 74 65 20 28 20 76 6f 69 64 20 29  _Create ( void )
84f0: 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69   : BLOB AT-matri
8500: 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69  x</b></td><td>Wi
8510: 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 49 64 65  ll return an Ide
8520: 6e 74 69 74 79 20 41 66 66 69 6e 65 20 54 72 61  ntity Affine Tra
8530: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72  nsformation Matr
8540: 69 78 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66  ix.<br>..NULL if
8550: 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72   any error occur
8560: 73 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74  s.</td></tr>..<t
8570: 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 43 72 65  r><td><b>ATM_Cre
8580: 61 74 65 20 28 20 64 6f 75 62 6c 65 20 61 20 2c  ate ( double a ,
8590: 20 64 6f 75 62 6c 65 20 62 20 2c 20 64 6f 75 62   double b , doub
85a0: 6c 65 20 64 20 2c 20 64 6f 75 62 6c 65 20 65 20  le d , double e 
85b0: 2c 20 64 6f 75 62 6c 65 20 78 6f 66 66 20 2c 20  , double xoff , 
85c0: 64 6f 75 62 6c 65 20 79 6f 66 66 20 29 20 3a 20  double yoff ) : 
85d0: 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f  BLOB AT-matrix</
85e0: 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20  b></td><td>Will 
85f0: 72 65 74 75 72 6e 20 61 20 32 44 20 41 66 66 69  return a 2D Affi
8600: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f  ne Transformatio
8610: 6e 20 4d 61 74 72 69 78 20 69 6e 69 74 69 61 6c  n Matrix initial
8620: 69 7a 65 64 20 77 69 74 68 20 65 78 70 6c 69 63  ized with explic
8630: 69 74 20 76 61 6c 75 65 73 2e 3c 62 72 3e 0d 0a  it values.<br>..
8640: 4e 55 4c 4c 20 69 66 20 61 6e 79 20 65 72 72 6f  NULL if any erro
8650: 72 20 6f 63 63 75 72 73 20 6f 72 20 6f 6e 20 69  r occurs or on i
8660: 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 73  nvalid arguments
8670: 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  .</td></tr>..<tr
8680: 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 43 72 65 61  ><td><b>ATM_Crea
8690: 74 65 20 28 20 64 6f 75 62 6c 65 20 61 20 2c 20  te ( double a , 
86a0: 64 6f 75 62 6c 65 20 62 20 2c 20 64 6f 75 62 6c  double b , doubl
86b0: 65 20 63 20 2c 20 64 6f 75 62 6c 65 20 64 20 2c  e c , double d ,
86c0: 20 64 6f 75 62 6c 65 20 65 20 2c 20 64 6f 75 62   double e , doub
86d0: 6c 65 20 66 20 2c 20 64 6f 75 62 6c 65 20 67 20  le f , double g 
86e0: 2c 20 64 6f 75 62 6c 65 20 68 20 2c 20 64 6f 75  , double h , dou
86f0: 62 6c 65 20 69 20 2c 20 64 6f 75 62 6c 65 20 78  ble i , double x
8700: 6f 66 66 20 2c 20 64 6f 75 62 6c 65 20 79 6f 66  off , double yof
8710: 66 20 2c 20 64 6f 75 62 6c 65 20 64 6f 75 62 6c  f , double doubl
8720: 65 20 7a 6f 66 66 20 29 20 3a 20 42 4c 4f 42 20  e zoff ) : BLOB 
8730: 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 2f 74  AT-matrix</b></t
8740: 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72  d><td>Will retur
8750: 6e 20 61 20 33 44 20 41 66 66 69 6e 65 20 54 72  n a 3D Affine Tr
8760: 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74  ansformation Mat
8770: 72 69 78 20 69 6e 69 74 69 61 6c 69 7a 65 64 20  rix initialized 
8780: 77 69 74 68 20 65 78 70 6c 69 63 69 74 20 76 61  with explicit va
8790: 6c 75 65 73 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20  lues.<br>..NULL 
87a0: 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63  if any error occ
87b0: 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69  urs or on invali
87c0: 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64  d arguments.</td
87d0: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  ></tr>..<tr><td>
87e0: 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 54 72 61  <b>ATM_CreateTra
87f0: 6e 73 6c 61 74 65 20 28 20 64 6f 75 62 6c 65 20  nslate ( double 
8800: 74 78 20 2c 20 64 6f 75 62 6c 65 20 74 79 20 29  tx , double ty )
8810: 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69   : BLOB AT-matri
8820: 78 3c 2f 62 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 54  x</b><br>..<b>AT
8830: 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61 74  M_CreateTranslat
8840: 65 20 28 20 64 6f 75 62 6c 65 20 74 78 20 2c 20  e ( double tx , 
8850: 64 6f 75 62 6c 65 20 74 79 20 2c 20 64 6f 75 62  double ty , doub
8860: 6c 65 20 74 7a 20 29 20 3a 20 42 4c 4f 42 20 41  le tz ) : BLOB A
8870: 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 2f 74 64  T-matrix</b></td
8880: 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72 6e  ><td>Will return
8890: 20 61 6e 20 41 66 66 69 6e 65 20 54 72 61 6e 73   an Affine Trans
88a0: 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78  formation Matrix
88b0: 20 69 6e 69 74 69 61 6c 69 7a 65 64 20 72 65 73   initialized res
88c0: 70 65 63 74 69 76 65 6c 79 20 61 73 20 61 20 32  pectively as a 2
88d0: 44 20 6f 72 20 33 44 20 54 72 61 6e 73 6c 61 74  D or 3D Translat
88e0: 65 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20  e.<br>..NULL if 
88f0: 61 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72 73  any error occurs
8900: 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61   or on invalid a
8910: 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e 3c 2f  rguments.</td></
8920: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e  tr>..<tr><td><b>
8930: 41 54 4d 5f 43 72 65 61 74 65 53 63 61 6c 65 20  ATM_CreateScale 
8940: 28 20 64 6f 75 62 6c 65 20 73 78 20 2c 20 64 6f  ( double sx , do
8950: 75 62 6c 65 20 73 79 20 29 20 3a 20 42 4c 4f 42  uble sy ) : BLOB
8960: 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 62   AT-matrix</b><b
8970: 72 3e 0d 0a 3c 62 3e 41 54 4d 5f 43 72 65 61 74  r>..<b>ATM_Creat
8980: 65 53 63 61 6c 65 20 28 20 64 6f 75 62 6c 65 20  eScale ( double 
8990: 73 78 20 2c 20 64 6f 75 62 6c 65 20 73 79 20 2c  sx , double sy ,
89a0: 20 64 6f 75 62 6c 65 20 73 7a 20 29 20 3a 20 42   double sz ) : B
89b0: 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62  LOB AT-matrix</b
89c0: 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72  ></td><td>Will r
89d0: 65 74 75 72 6e 20 61 6e 20 41 66 66 69 6e 65 20  eturn an Affine 
89e0: 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d  Transformation M
89f0: 61 74 72 69 78 20 69 6e 69 74 69 61 6c 69 7a 65  atrix initialize
8a00: 64 20 72 65 73 70 65 63 74 69 76 65 6c 79 20 61  d respectively a
8a10: 73 20 61 20 32 44 20 6f 72 20 33 44 20 53 63 61  s a 2D or 3D Sca
8a20: 6c 65 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66  le.<br>..NULL if
8a30: 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72   any error occur
8a40: 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20  s or on invalid 
8a50: 61 72 67 75 6d 65 6e 74 73 2e 2e 3c 2f 74 64 3e  arguments..</td>
8a60: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c  </tr>..<tr><td><
8a70: 62 3e 41 54 4d 5f 43 72 65 61 74 65 52 6f 74 61  b>ATM_CreateRota
8a80: 74 65 20 28 20 64 6f 75 62 6c 65 20 61 6e 67 6c  te ( double angl
8a90: 65 49 6e 44 65 67 72 65 65 73 20 29 20 3a 20 42  eInDegrees ) : B
8aa0: 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62  LOB AT-matrix</b
8ab0: 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 54 4d 5f 43 72  ><br>..<b>ATM_Cr
8ac0: 65 61 74 65 5a 52 6f 6c 6c 20 28 20 64 6f 75 62  eateZRoll ( doub
8ad0: 6c 65 20 61 6e 67 6c 65 49 6e 44 65 67 72 65 65  le angleInDegree
8ae0: 73 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61  s ) : BLOB AT-ma
8af0: 74 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64  trix</b></td><td
8b00: 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20  >Will return an 
8b10: 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d  Affine Transform
8b20: 61 74 69 6f 6e 20 4d 61 74 72 69 78 20 69 6e 69  ation Matrix ini
8b30: 74 69 61 6c 69 7a 65 64 20 61 73 20 52 6f 74 61  tialized as Rota
8b40: 74 69 6f 6e 20 61 72 6f 75 6e 64 20 74 68 65 20  tion around the 
8b50: 5a 20 61 78 69 73 2e 3c 62 72 3e 0d 0a 4e 55 4c  Z axis.<br>..NUL
8b60: 4c 20 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f  L if any error o
8b70: 63 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61  ccurs or on inva
8b80: 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 68  lid arguments.<h
8b90: 72 3e 0d 0a 54 68 65 20 61 6e 67 6c 65 20 69 73  r>..The angle is
8ba0: 20 61 6c 77 61 79 73 20 65 78 70 65 63 74 65 64   always expected
8bb0: 20 74 6f 20 62 65 20 6d 65 61 73 75 72 65 64 20   to be measured 
8bc0: 69 6e 20 64 65 63 69 6d 61 6c 20 64 65 67 72 65  in decimal degre
8bd0: 65 73 2e 20 54 68 65 20 64 69 72 65 63 74 69 6f  es. The directio
8be0: 6e 20 6f 66 20 72 6f 74 61 74 69 6f 6e 20 69 73  n of rotation is
8bf0: 20 64 65 66 69 6e 65 64 20 73 75 63 68 20 74 68   defined such th
8c00: 61 74 20 70 6f 73 69 74 69 76 65 20 61 6e 67 6c  at positive angl
8c10: 65 73 20 72 6f 74 61 74 65 20 69 6e 20 74 68 65  es rotate in the
8c20: 20 64 69 72 65 63 74 69 6f 6e 20 66 72 6f 6d 20   direction from 
8c30: 74 68 65 20 70 6f 73 69 74 69 76 65 20 58 20 61  the positive X a
8c40: 78 69 73 20 74 6f 77 61 72 64 20 74 68 65 20 70  xis toward the p
8c50: 6f 73 69 74 69 76 65 20 59 20 61 78 69 73 2e 20  ositive Y axis. 
8c60: 57 69 74 68 20 74 68 65 20 64 65 66 61 75 6c 74  With the default
8c70: 20 61 78 69 73 20 6f 72 69 65 6e 74 61 74 69 6f   axis orientatio
8c80: 6e 20 20 70 6f 73 69 74 69 76 65 20 61 6e 67 6c  n  positive angl
8c90: 65 73 20 72 6f 74 61 74 65 20 69 6e 20 61 20 63  es rotate in a c
8ca0: 6f 75 6e 74 65 72 63 6c 6f 63 6b 77 69 73 65 20  ounterclockwise 
8cb0: 64 69 72 65 63 74 69 6f 6e 2e 3c 68 72 3e 0d 0a  direction.<hr>..
8cc0: 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 74 68 69  <u>Note</u>: thi
8cd0: 73 20 69 73 20 74 68 65 20 75 6e 69 71 75 65 20  s is the unique 
8ce0: 72 6f 74 61 74 69 6f 6e 20 61 6c 6c 6f 77 65 64  rotation allowed
8cf0: 20 6f 6e 20 61 20 70 75 72 65 6c 79 20 32 44 20   on a purely 2D 
8d00: 70 6c 61 6e 65 2e 3c 2f 74 64 3e 3c 2f 74 72 3e  plane.</td></tr>
8d10: 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d  ..<tr><td><b>ATM
8d20: 5f 43 72 65 61 74 65 58 52 6f 6c 6c 20 28 20 64  _CreateXRoll ( d
8d30: 6f 75 62 6c 65 20 61 6e 67 6c 65 49 6e 44 65 67  ouble angleInDeg
8d40: 72 65 65 73 20 29 20 3a 20 42 4c 4f 42 20 41 54  rees ) : BLOB AT
8d50: 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e  -matrix</b></td>
8d60: 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20  <td>Will return 
8d70: 61 6e 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66  an Affine Transf
8d80: 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 20  ormation Matrix 
8d90: 69 6e 69 74 69 61 6c 69 7a 65 64 20 61 73 20 52  initialized as R
8da0: 6f 74 61 74 69 6f 6e 20 61 72 6f 75 6e 64 20 74  otation around t
8db0: 68 65 20 58 20 61 78 69 73 2e 3c 62 72 3e 0d 0a  he X axis.<br>..
8dc0: 4e 55 4c 4c 20 69 66 20 61 6e 79 20 65 72 72 6f  NULL if any erro
8dd0: 72 20 6f 63 63 75 72 73 20 6f 72 20 6f 6e 20 69  r occurs or on i
8de0: 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 73  nvalid arguments
8df0: 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  .</td></tr>..<tr
8e00: 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 43 72 65 61  ><td><b>ATM_Crea
8e10: 74 65 59 52 6f 6c 6c 20 28 20 64 6f 75 62 6c 65  teYRoll ( double
8e20: 20 61 6e 67 6c 65 49 6e 44 65 67 72 65 65 73 20   angleInDegrees 
8e30: 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72  ) : BLOB AT-matr
8e40: 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57  ix</b></td><td>W
8e50: 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 41 66  ill return an Af
8e60: 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74  fine Transformat
8e70: 69 6f 6e 20 4d 61 74 72 69 78 20 69 6e 69 74 69  ion Matrix initi
8e80: 61 6c 69 7a 65 64 20 61 73 20 52 6f 74 61 74 69  alized as Rotati
8e90: 6f 6e 20 61 72 6f 75 6e 64 20 74 68 65 20 59 20  on around the Y 
8ea0: 61 78 69 73 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20  axis.<br>..NULL 
8eb0: 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63  if any error occ
8ec0: 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69  urs or on invali
8ed0: 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64  d arguments.</td
8ee0: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 68 20  ></tr>..<tr><th 
8ef0: 63 6f 6c 73 70 61 6e 3d 22 32 22 20 62 67 63 6f  colspan="2" bgco
8f00: 6c 6f 72 3d 22 23 46 30 45 36 38 43 22 20 61 6c  lor="#F0E68C" al
8f10: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 53 51 4c  ign="center">SQL
8f20: 20 66 75 6e 63 74 69 6f 6e 73 20 73 75 70 70 6f   functions suppo
8f30: 72 74 69 6e 67 20 63 68 61 69 6e 69 6e 67 20 74  rting chaining t
8f40: 77 6f 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66  wo Affine Transf
8f50: 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 63 65  ormation Matrice
8f60: 73 3c 2f 74 68 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  s</th></tr>..<tr
8f70: 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 54 72 61 6e  ><td><b>ATM_Tran
8f80: 73 6c 61 74 65 20 28 20 42 4c 4f 42 20 41 54 2d  slate ( BLOB AT-
8f90: 6d 61 74 72 69 78 20 2c 20 64 6f 75 62 6c 65 20  matrix , double 
8fa0: 74 78 20 2c 20 64 6f 75 62 6c 65 20 74 79 20 29  tx , double ty )
8fb0: 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69   : BLOB AT-matri
8fc0: 78 3c 2f 62 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 54  x</b><br>..<b>AT
8fd0: 4d 5f 54 72 61 6e 73 6c 61 74 65 20 28 20 42 4c  M_Translate ( BL
8fe0: 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 2c 20 64  OB AT-matrix , d
8ff0: 6f 75 62 6c 65 20 74 78 20 2c 20 64 6f 75 62 6c  ouble tx , doubl
9000: 65 20 74 79 20 2c 20 64 6f 75 62 6c 65 20 74 7a  e ty , double tz
9010: 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74   ) : BLOB AT-mat
9020: 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e  rix</b></td><td>
9030: 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 41  Will return an A
9040: 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61  ffine Transforma
9050: 74 69 6f 6e 20 4d 61 74 72 69 78 20 62 79 20 63  tion Matrix by c
9060: 68 61 69 6e 69 6e 67 20 72 65 73 70 65 63 74 69  haining respecti
9070: 76 65 6c 79 20 61 20 32 44 20 6f 72 20 33 44 20  vely a 2D or 3D 
9080: 54 72 61 6e 73 6c 61 74 65 20 61 6e 64 20 61 6e  Translate and an
9090: 6f 74 68 65 72 20 41 66 66 69 6e 65 20 54 72 61  other Affine Tra
90a0: 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 3c 62 72 3e  nsformation.<br>
90b0: 0d 0a 4e 55 4c 4c 20 69 66 20 61 6e 79 20 65 72  ..NULL if any er
90c0: 72 6f 72 20 6f 63 63 75 72 73 20 6f 72 20 6f 6e  ror occurs or on
90d0: 20 69 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e   invalid argumen
90e0: 74 73 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  ts.</td></tr>..<
90f0: 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 53 63  tr><td><b>ATM_Sc
9100: 61 6c 65 20 28 20 42 4c 4f 42 20 41 54 2d 6d 61  ale ( BLOB AT-ma
9110: 74 72 69 78 20 2c 20 64 6f 75 62 6c 65 20 73 78  trix , double sx
9120: 20 2c 20 64 6f 75 62 6c 65 20 73 79 20 29 20 3a   , double sy ) :
9130: 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c   BLOB AT-matrix<
9140: 2f 62 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 54 4d 5f  /b><br>..<b>ATM_
9150: 53 63 61 6c 65 20 28 20 42 4c 4f 42 20 41 54 2d  Scale ( BLOB AT-
9160: 6d 61 74 72 69 78 20 2c 20 64 6f 75 62 6c 65 20  matrix , double 
9170: 73 78 20 2c 20 64 6f 75 62 6c 65 20 73 79 20 2c  sx , double sy ,
9180: 20 64 6f 75 62 6c 65 20 73 7a 20 29 20 3a 20 42   double sz ) : B
9190: 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62  LOB AT-matrix</b
91a0: 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72  ></td><td>Will r
91b0: 65 74 75 72 6e 20 61 6e 20 41 66 66 69 6e 65 20  eturn an Affine 
91c0: 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d  Transformation M
91d0: 61 74 72 69 78 20 62 79 20 63 68 61 69 6e 69 6e  atrix by chainin
91e0: 67 20 72 65 73 70 65 63 74 69 76 65 6c 79 20 61  g respectively a
91f0: 20 32 44 20 6f 72 20 33 44 20 53 63 61 6c 65 20   2D or 3D Scale 
9200: 61 6e 64 20 61 6e 6f 74 68 65 72 20 41 66 66 69  and another Affi
9210: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f  ne Transformatio
9220: 6e 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20  n.<br>..NULL if 
9230: 61 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72 73  any error occurs
9240: 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61   or on invalid a
9250: 72 67 75 6d 65 6e 74 73 2e 2e 3c 2f 74 64 3e 3c  rguments..</td><
9260: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62  /tr>..<tr><td><b
9270: 3e 41 54 4d 5f 52 6f 74 61 74 65 20 28 20 42 4c  >ATM_Rotate ( BL
9280: 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 2c 20 64  OB AT-matrix , d
9290: 6f 75 62 6c 65 20 61 6e 67 6c 65 49 6e 44 65 67  ouble angleInDeg
92a0: 72 65 65 73 20 29 20 3a 20 42 4c 4f 42 20 41 54  rees ) : BLOB AT
92b0: 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 62 72 3e 0d  -matrix</b><br>.
92c0: 0a 3c 62 3e 41 54 4d 5f 5a 52 6f 6c 6c 20 28 20  .<b>ATM_ZRoll ( 
92d0: 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 2c  BLOB AT-matrix ,
92e0: 20 64 6f 75 62 6c 65 20 61 6e 67 6c 65 49 6e 44   double angleInD
92f0: 65 67 72 65 65 73 20 29 20 3a 20 42 4c 4f 42 20  egrees ) : BLOB 
9300: 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 2f 74  AT-matrix</b></t
9310: 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72  d><td>Will retur
9320: 6e 20 61 6e 20 41 66 66 69 6e 65 20 54 72 61 6e  n an Affine Tran
9330: 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69  sformation Matri
9340: 78 20 62 79 20 63 68 61 69 6e 69 6e 67 20 61 20  x by chaining a 
9350: 52 6f 74 61 74 69 6f 6e 20 61 72 6f 75 6e 64 20  Rotation around 
9360: 74 68 65 20 5a 20 61 78 69 73 20 61 6e 64 20 61  the Z axis and a
9370: 6e 6f 74 68 65 72 20 41 66 66 69 6e 65 20 54 72  nother Affine Tr
9380: 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e 3c 62 72  ansformation.<br
9390: 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61 6e 79 20 65  >..NULL if any e
93a0: 72 72 6f 72 20 6f 63 63 75 72 73 20 6f 72 20 6f  rror occurs or o
93b0: 6e 20 69 6e 76 61 6c 69 64 20 61 72 67 75 6d 65  n invalid argume
93c0: 6e 74 73 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  nts.</td></tr>..
93d0: 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 58  <tr><td><b>ATM_X
93e0: 52 6f 6c 6c 20 28 20 42 4c 4f 42 20 41 54 2d 6d  Roll ( BLOB AT-m
93f0: 61 74 72 69 78 20 2c 20 64 6f 75 62 6c 65 20 61  atrix , double a
9400: 6e 67 6c 65 49 6e 44 65 67 72 65 65 73 20 29 20  ngleInDegrees ) 
9410: 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78  : BLOB AT-matrix
9420: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c  </b></td><td>Wil
9430: 6c 20 72 65 74 75 72 6e 20 61 6e 20 41 66 66 69  l return an Affi
9440: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f  ne Transformatio
9450: 6e 20 4d 61 74 72 69 78 20 62 79 20 63 68 61 69  n Matrix by chai
9460: 6e 69 6e 67 20 61 20 52 6f 74 61 74 69 6f 6e 20  ning a Rotation 
9470: 61 72 6f 75 6e 64 20 74 68 65 20 58 20 61 78 69  around the X axi
9480: 73 20 61 6e 64 20 61 6e 6f 74 68 65 72 20 41 66  s and another Af
9490: 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74  fine Transformat
94a0: 69 6f 6e 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69  ion.<br>..NULL i
94b0: 66 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63 75  f any error occu
94c0: 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64  rs or on invalid
94d0: 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e   arguments.</td>
94e0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c  </tr>..<tr><td><
94f0: 62 3e 41 54 4d 5f 59 52 6f 6c 6c 20 28 20 42 4c  b>ATM_YRoll ( BL
9500: 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 2c 20 64  OB AT-matrix , d
9510: 6f 75 62 6c 65 20 61 6e 67 6c 65 49 6e 44 65 67  ouble angleInDeg
9520: 72 65 65 73 20 29 20 3a 20 42 4c 4f 42 20 41 54  rees ) : BLOB AT
9530: 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e  -matrix</b></td>
9540: 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20  <td>Will return 
9550: 61 6e 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66  an Affine Transf
9560: 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 20  ormation Matrix 
9570: 62 79 20 63 68 61 69 6e 69 6e 67 20 61 20 52 6f  by chaining a Ro
9580: 74 61 74 69 6f 6e 20 61 72 6f 75 6e 64 20 74 68  tation around th
9590: 65 20 59 20 61 78 69 73 20 61 6e 64 20 61 6e 6f  e Y axis and ano
95a0: 74 68 65 72 20 41 66 66 69 6e 65 20 54 72 61 6e  ther Affine Tran
95b0: 73 66 6f 72 6d 61 74 69 6f 6e 2e 3c 62 72 3e 0d  sformation.<br>.
95c0: 0a 4e 55 4c 4c 20 69 66 20 61 6e 79 20 65 72 72  .NULL if any err
95d0: 6f 72 20 6f 63 63 75 72 73 20 6f 72 20 6f 6e 20  or occurs or on 
95e0: 69 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74  invalid argument
95f0: 73 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74  s.</td></tr>..<t
9600: 72 3e 3c 74 64 3e 3c 2f 74 64 3e 3c 74 64 3e 0d  r><td></td><td>.
9610: 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 61 6c  .<u>Note</u>: al
9620: 6c 20 74 68 65 20 61 62 6f 76 65 20 66 75 6e 63  l the above func
9630: 74 69 6f 6e 73 20 73 69 6d 70 6c 79 20 61 72 65  tions simply are
9640: 20 63 6f 6e 76 65 6e 69 65 6e 63 65 20 6d 65 74   convenience met
9650: 68 6f 64 73 20 69 6e 74 65 6e 64 65 64 20 74 6f  hods intended to
9660: 20 61 76 6f 69 64 20 61 6e 79 20 6e 65 65 64 20   avoid any need 
9670: 74 6f 20 72 65 70 65 61 74 65 64 6c 79 20 63 61  to repeatedly ca
9680: 6c 6c 20 3c 62 3e 41 54 4d 5f 4d 75 6c 74 69 70  ll <b>ATM_Multip
9690: 6c 79 28 29 3c 2f 62 3e 2e 0d 0a 3c 76 65 72 62  ly()</b>...<verb
96a0: 61 74 69 6d 3e 0d 0a 53 45 4c 45 43 54 20 41 54  atim>..SELECT AT
96b0: 4d 5f 4d 75 6c 74 69 70 6c 79 28 41 54 4d 5f 43  M_Multiply(ATM_C
96c0: 72 65 61 74 65 52 6f 74 61 74 65 28 31 35 29 2c  reateRotate(15),
96d0: 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20   ..             
96e0: 20 20 20 20 20 20 20 41 54 4d 5f 4d 75 6c 74 69         ATM_Multi
96f0: 70 6c 79 28 41 54 4d 5f 43 72 65 61 74 65 53 63  ply(ATM_CreateSc
9700: 61 6c 65 28 31 2e 31 2c 20 31 2e 32 2c 20 31 2e  ale(1.1, 1.2, 1.
9710: 33 29 2c 20 0d 0a 20 20 20 20 20 20 20 20 20 20  3), ..          
9720: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
9730: 20 20 20 20 20 20 20 41 54 4d 5f 43 72 65 61 74         ATM_Creat
9740: 65 54 72 61 6e 73 6c 61 74 65 28 31 30 2c 20 32  eTranslate(10, 2
9750: 30 2c 20 33 30 29 29 29 3b 0d 0a 0d 0a 53 45 4c  0, 30)));....SEL
9760: 45 43 54 20 41 54 4d 5f 52 6f 74 61 74 65 28 0d  ECT ATM_Rotate(.
9770: 0a 20 20 20 20 20 20 20 20 20 20 41 54 4d 5f 53  .          ATM_S
9780: 63 61 6c 65 28 0d 0a 20 20 20 20 20 20 20 20 20  cale(..         
9790: 20 20 20 20 41 54 4d 5f 43 72 65 61 74 65 54 72      ATM_CreateTr
97a0: 61 6e 73 6c 61 74 65 28 31 30 2c 20 32 30 2c 20  anslate(10, 20, 
97b0: 33 30 29 2c 20 0d 0a 20 20 20 20 20 20 20 20 20  30), ..         
97c0: 20 31 2e 31 2c 20 31 2e 32 2c 20 31 2e 33 29 2c   1.1, 1.2, 1.3),
97d0: 20 0d 0a 20 20 20 20 20 20 20 31 35 29 3b 0d 0a   ..       15);..
97e0: 0d 0a 53 45 4c 45 43 54 20 41 54 4d 5f 52 6f 74  ..SELECT ATM_Rot
97f0: 61 74 65 28 0d 0a 20 20 20 20 20 20 20 20 20 20  ate(..          
9800: 41 54 4d 5f 53 63 61 6c 65 28 0d 0a 20 20 20 20  ATM_Scale(..    
9810: 20 20 20 20 20 20 20 20 20 41 54 4d 5f 54 72 61           ATM_Tra
9820: 6e 73 6c 61 74 65 28 0d 0a 20 20 20 20 20 20 20  nslate(..       
9830: 20 20 20 20 20 20 20 20 20 41 54 4d 5f 43 72 65           ATM_Cre
9840: 61 74 65 28 29 2c 20 0d 0a 20 20 20 20 20 20 20  ate(), ..       
9850: 20 20 20 20 20 20 31 30 2c 20 32 30 2c 20 33 30        10, 20, 30
9860: 29 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 31 2e  ),..          1.
9870: 31 2c 20 31 2e 32 2c 20 31 2e 33 29 2c 0d 0a 20  1, 1.2, 1.3),.. 
9880: 20 20 20 20 20 20 31 35 29 3b 0d 0a 3c 2f 76 65        15);..</ve
9890: 72 62 61 74 69 6d 3e 0d 0a 41 6c 6c 20 74 68 72  rbatim>..All thr
98a0: 65 65 20 73 74 61 74 65 6d 65 6e 74 73 20 77 69  ee statements wi
98b0: 6c 6c 20 72 65 74 75 72 6e 20 65 78 61 63 74 6c  ll return exactl
98c0: 79 20 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74  y the same ident
98d0: 69 63 61 6c 20 41 66 66 69 6e 65 20 54 72 61 6e  ical Affine Tran
98e0: 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69  sformation Matri
98f0: 78 3b 20 61 6e 79 77 61 79 20 74 68 65 20 73 65  x; anyway the se
9900: 63 6f 6e 64 20 6e 6f 74 61 74 69 6f 6e 20 69 73  cond notation is
9910: 20 6f 62 76 69 6f 75 73 6c 79 20 6d 6f 73 74 20   obviously most 
9920: 63 6f 6e 63 69 73 65 20 61 6e 64 20 6d 6f 72 65  concise and more
9930: 20 70 72 61 63 74 69 63 61 6c 20 74 68 61 6e 20   practical than 
9940: 74 68 65 20 6f 74 68 65 72 20 74 77 6f 2e 3c 62  the other two.<b
9950: 72 3e 0d 0a 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a  r>..<u>Note</u>:
9960: 20 69 6e 20 61 6e 79 20 63 6f 6d 70 6c 65 78 20   in any complex 
9970: 63 68 61 69 6e 20 6f 66 20 74 72 61 6e 73 66 6f  chain of transfo
9980: 72 6d 61 74 69 6f 6e 73 20 74 68 65 20 3c 62 3e  rmations the <b>
9990: 69 6e 6e 65 72 6d 6f 73 74 3c 2f 62 3e 20 6f 70  innermost</b> op
99a0: 65 72 61 74 69 6f 6e 20 77 69 6c 6c 20 62 65 20  eration will be 
99b0: 61 70 70 6c 69 65 64 20 3c 62 3e 66 69 72 73 74  applied <b>first
99c0: 3c 2f 62 3e 2c 20 61 6e 64 20 74 68 65 20 3c 62  </b>, and the <b
99d0: 3e 6f 75 74 65 72 6d 6f 73 74 3c 2f 62 3e 20 6f  >outermost</b> o
99e0: 70 65 72 61 74 69 6f 6e 20 77 69 6c 6c 20 62 65  peration will be
99f0: 20 61 70 70 6c 69 65 64 20 3c 62 3e 6c 61 73 74   applied <b>last
9a00: 3c 2f 62 3e 2e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72  </b>...</td></tr
9a10: 3e 0d 0a 3c 74 61 62 6c 65 3e 3c 62 72 3e 3c 62  >..<table><br><b
9a20: 72 3e 0d 0a 3c 62 3e 4e 6f 74 65 3c 2f 62 3e 3a  r>..<b>Note</b>:
9a30: 20 74 68 65 20 53 51 4c 20 69 6e 74 65 72 66 61   the SQL interfa
9a40: 63 65 20 73 75 70 70 6f 72 74 69 6e 67 20 41 66  ce supporting Af
9a50: 66 69 6e 65 20 54 72 61 73 66 6f 72 6d 61 74 69  fine Trasformati
9a60: 6f 6e 73 20 69 73 20 64 65 73 69 67 6e 65 64 20  ons is designed 
9a70: 69 6e 20 73 75 63 68 20 61 20 77 61 79 20 74 68  in such a way th
9a80: 61 74 20 61 6e 79 20 63 6f 6d 70 6c 65 78 69 74  at any complexit
9a90: 79 20 61 6e 64 20 64 69 66 66 69 63 75 6c 74 79  y and difficulty
9aa0: 20 72 65 71 75 69 72 65 64 20 69 6e 20 6f 72 64   required in ord
9ab0: 65 72 20 74 6f 20 64 69 72 65 63 74 6c 79 20 68  er to directly h
9ac0: 61 6e 64 6c 65 20 6d 61 74 72 69 63 69 61 6c 20  andle matricial 
9ad0: 6f 70 65 72 61 74 69 6f 6e 73 20 69 73 20 63 6f  operations is co
9ae0: 6d 70 6c 65 74 65 6c 79 20 68 69 64 64 65 6e 2e  mpletely hidden.
9af0: 3c 62 72 3e 0d 0a 59 6f 75 20 61 72 65 20 73 69  <br>..You are si
9b00: 6d 70 6c 79 20 72 65 71 75 69 72 65 64 20 74 6f  mply required to
9b10: 20 63 68 61 69 6e 20 73 65 76 65 72 61 6c 20 65   chain several e
9b20: 6c 65 6d 65 6e 74 61 72 79 20 74 72 61 6e 73 66  lementary transf
9b30: 6f 72 6d 61 74 69 6f 6e 73 2c 20 65 61 63 68 20  ormations, each 
9b40: 6f 6e 65 20 6f 66 20 74 68 65 6d 20 62 61 73 69  one of them basi
9b50: 63 61 6c 6c 79 20 73 69 6d 70 6c 65 2c 20 69 6e  cally simple, in
9b60: 20 74 68 65 20 63 6f 72 72 65 63 74 20 73 65 71   the correct seq
9b70: 75 65 6e 63 65 20 61 6e 64 20 74 68 61 74 27 73  uence and that's
9b80: 20 61 62 73 6f 6c 75 74 65 6c 79 20 61 6c 6c 2e   absolutely all.
9b90: 3c 62 72 3e 0d 0a 3c 62 3e 41 54 4d 3c 2f 62 3e  <br>..<b>ATM</b>
9ba0: 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 73 20 77   SQL functions w
9bb0: 69 6c 6c 20 3c 69 3e 3c 75 3e 6d 61 67 69 63 61  ill <i><u>magica
9bc0: 6c 6c 79 20 61 6e 64 20 73 69 6c 65 6e 74 6c 79  lly and silently
9bd0: 3c 2f 75 3e 3c 2f 69 3e 20 6b 65 65 70 20 63 61  </u></i> keep ca
9be0: 72 65 20 6f 66 20 61 6e 79 20 6d 61 74 68 65 6d  re of any mathem
9bf0: 61 74 69 63 61 6c 20 63 6f 6d 70 6c 65 78 69 74  atical complexit
9c00: 79 2e 3c 62 72 3e 3c 62 72 3e 20 20 0d 0a 3c 68  y.<br><br>  ..<h
9c10: 72 3e 0d 0a 3c 68 33 3e 43 6f 6e 63 6c 75 73 69  r>..<h3>Conclusi
9c20: 6f 6e 3c 2f 68 33 3e 0d 0a 3c 75 6c 3e 0d 0a 3c  on</h3>..<ul>..<
9c30: 6c 69 3e 41 66 66 69 6e 65 20 54 72 61 6e 73 66  li>Affine Transf
9c40: 6f 72 6d 61 74 69 6f 6e 73 20 61 72 65 20 61 20  ormations are a 
9c50: 76 65 72 79 20 70 6f 77 65 72 66 75 6c 20 61 6e  very powerful an
9c60: 64 20 76 65 72 79 20 66 6c 65 78 69 62 6c 65 20  d very flexible 
9c70: 6d 61 74 68 65 6d 61 74 69 63 61 6c 20 69 6e 73  mathematical ins
9c80: 74 72 75 6d 65 6e 74 61 74 69 6f 6e 2c 20 61 6e  trumentation, an
9c90: 64 20 74 68 65 69 72 20 70 72 61 63 74 69 63 61  d their practica
9ca0: 6c 20 75 74 69 6c 69 74 79 20 69 73 20 6e 6f 74  l utility is not
9cb0: 69 63 65 61 62 6c 79 20 72 65 6c 65 76 61 6e 74  iceably relevant
9cc0: 20 69 6e 20 6d 61 6e 79 20 61 70 70 6c 69 65 64   in many applied
9cd0: 20 62 72 61 6e 63 68 65 73 20 6f 66 20 63 6f 6d   branches of com
9ce0: 70 75 74 69 6e 67 2c 20 66 6f 72 20 65 78 61 6d  puting, for exam
9cf0: 70 6c 65 2e 3a 3c 2f 6c 69 3e 0d 0a 3c 75 6c 3e  ple.:</li>..<ul>
9d00: 0d 0a 3c 6c 69 3e 61 64 76 61 6e 63 65 64 20 32  ..<li>advanced 2
9d10: 44 20 2f 20 33 44 20 67 72 61 70 68 69 63 73 3c  D / 3D graphics<
9d20: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 76 69 64 65 6f 67  /li>..<li>videog
9d30: 61 6d 65 73 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 43  ames</li>..<li>C
9d40: 41 44 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 61 72 74  AD</li>..<li>art
9d50: 69 66 69 63 69 61 6c 20 76 69 73 69 6f 6e 20 2f  ificial vision /
9d60: 20 65 6e 68 61 6e 63 65 64 20 72 65 61 6c 69 74   enhanced realit
9d70: 79 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 72 6f 62 6f  y</li>..<li>robo
9d80: 74 69 63 73 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  tics</li>..</ul>
9d90: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 6e 20 74 68  </li>..<li>in th
9da0: 65 20 73 70 65 63 69 66 69 63 20 47 65 6f 53 70  e specific GeoSp
9db0: 61 74 69 61 6c 20 66 69 65 6c 64 20 74 68 65 20  atial field the 
9dc0: 6d 6f 73 74 20 69 6e 74 65 72 65 73 74 69 6e 67  most interesting
9dd0: 20 61 70 70 6c 69 63 61 74 69 6f 6e 20 66 6f 72   application for
9de0: 20 61 66 66 69 6e 65 20 74 72 61 6e 73 66 6f 72   affine transfor
9df0: 6d 61 74 69 6f 6e 73 20 69 73 20 74 68 61 74 20  mations is that 
9e00: 74 68 65 79 20 63 61 6e 20 65 66 66 65 63 74 69  they can effecti
9e10: 76 65 6c 79 20 74 72 61 6e 73 66 6f 72 6d 20 74  vely transform t
9e20: 68 65 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 66  he coordinates f
9e30: 72 6f 6d 20 6f 6e 65 20 52 65 66 65 72 65 6e 63  rom one Referenc
9e40: 65 20 53 79 73 74 65 6d 20 74 6f 20 61 6e 6f 74  e System to anot
9e50: 68 65 72 20 70 72 65 73 65 72 76 69 6e 67 20 61  her preserving a
9e60: 20 76 65 72 79 20 68 69 67 68 20 70 72 65 63 69   very high preci
9e70: 73 69 6f 6e 2e 3c 62 72 3e 0d 0a 54 68 65 20 75  sion.<br>..The u
9e80: 6e 69 71 75 65 20 70 72 65 72 65 71 75 69 73 69  nique prerequisi
9e90: 74 65 20 74 6f 20 62 65 20 66 75 6c 66 69 6c 6c  te to be fulfill
9ea0: 65 64 20 73 69 6d 70 6c 79 20 69 73 20 64 65 74  ed simply is det
9eb0: 65 72 6d 69 6e 69 6e 67 20 69 6e 20 61 64 76 61  ermining in adva
9ec0: 6e 63 65 20 74 68 65 20 61 70 70 72 6f 70 72 69  nce the appropri
9ed0: 61 74 65 73 20 76 61 6c 75 65 73 20 66 6f 72 20  ates values for 
9ee0: 74 68 65 20 61 70 70 72 6f 70 72 69 61 74 65 20  the appropriate 
9ef0: 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 6d  transformation m
9f00: 61 74 72 69 78 2e 0d 0a 54 68 69 73 20 61 62 73  atrix...This abs
9f10: 6f 6c 75 74 65 6c 79 20 69 73 6e 27 74 20 61 20  olutely isn't a 
9f20: 74 72 69 76 69 61 6c 20 74 61 73 6b 2c 20 61 6e  trivial task, an
9f30: 64 20 61 20 76 65 72 79 20 68 69 67 68 20 61 63  d a very high ac
9f40: 63 75 72 61 63 79 20 69 73 20 61 62 73 6f 6c 75  curacy is absolu
9f50: 74 65 6c 79 20 72 65 71 75 69 72 65 64 20 73 6f  tely required so
9f60: 20 74 6f 20 67 65 74 20 68 69 67 68 20 71 75 61   to get high qua
9f70: 6c 69 74 79 20 72 65 73 75 6c 74 73 2e 3c 62 72  lity results.<br
9f80: 3e 0d 0a 48 61 70 70 69 6c 79 20 65 6e 6f 75 67  >..Happily enoug
9f90: 68 20 77 65 20 63 61 6e 20 65 61 73 69 6c 79 20  h we can easily 
9fa0: 64 65 70 6c 6f 79 20 66 65 77 20 66 75 72 74 68  deploy few furth
9fb0: 65 72 20 6d 61 74 68 65 6d 61 74 69 63 61 6c 20  er mathematical 
9fc0: 61 6e 64 20 73 74 61 74 69 73 74 69 63 61 6c 20  and statistical 
9fd0: 6d 65 74 68 6f 64 73 20 61 6c 6c 6f 77 69 6e 67  methods allowing
9fe0: 20 74 6f 20 72 65 73 6f 6c 76 65 20 74 68 69 73   to resolve this
9ff0: 20 6b 69 6e 64 20 6f 66 20 70 72 6f 62 6c 65 6d   kind of problem
a000: 20 69 6e 20 61 20 72 61 74 68 65 72 20 70 61 69   in a rather pai
a010: 6e 6c 65 73 73 20 77 61 79 3a 20 70 6c 65 61 73  nless way: pleas
a020: 65 20 72 65 61 64 20 3c 61 20 68 72 65 66 3d 22  e read <a href="
a030: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61  https://www.gaia
a040: 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c  -gis.it/fossil/l
a050: 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 69 6b  ibspatialite/wik
a060: 69 3f 6e 61 6d 65 3d 47 72 6f 75 6e 64 2b 43 6f  i?name=Ground+Co
a070: 6e 74 72 6f 6c 2b 50 6f 69 6e 74 73 22 3e 74 68  ntrol+Points">th
a080: 69 73 20 77 69 6b 69 20 70 61 67 65 3c 2f 61 3e  is wiki page</a>
a090: 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 6c 65 61   in order to lea
a0a0: 72 6e 20 6d 6f 72 65 20 61 62 6f 75 74 20 61 6c  rn more about al
a0b0: 6c 20 74 68 65 73 65 20 74 6f 70 69 63 73 2e 0d  l these topics..
a0c0: 0a 3c 2f 75 6c 3e 0d 0a 3c 62 72 3e 3c 62 72 3e  .</ul>..<br><br>
a0d0: 0d 0a 3c 68 72 3e 3c 62 72 3e 0d 0a 3c 61 20 68  ..<hr><br>..<a h
a0e0: 72 65 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77  ref="https://www
a0f0: 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73  .gaia-gis.it/fos
a100: 73 69 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74  sil/libspatialit
a110: 65 2f 77 69 6b 69 3f 6e 61 6d 65 3d 34 2e 32 2e  e/wiki?name=4.2.
a120: 30 2d 64 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 0a  0-doc">back</a>.
a130: 5a 20 33 61 65 31 39 36 61 32 33 31 63 61 36 30  Z 3ae196a231ca60
a140: 66 36 63 64 65 64 64 32 34 33 62 33 38 36 63 66  f6cdedd243b386cf
a150: 65 31 0a                                         e1.