Hex Artifact Content
Not logged in

Artifact 163c3321a621ac9dcec77c52834e4055df6ee8d1:

Wiki page [Affine Transform] by sandro 2015-05-04 16:55:47.
0000: 44 20 32 30 31 35 2d 30 35 2d 30 34 54 31 36 3a  D 2015-05-04T16:
0010: 35 35 3a 34 37 2e 33 35 39 0a 4c 20 41 66 66 69  55:47.359.L Affi
0020: 6e 65 5c 73 54 72 61 6e 73 66 6f 72 6d 0a 50 20  ne\sTransform.P 
0030: 33 36 37 34 65 64 39 31 34 66 32 62 63 36 37 35  3674ed914f2bc675
0040: 65 30 66 65 32 37 66 30 31 63 30 39 66 35 62 30  e0fe27f01c09f5b0
0050: 63 34 34 39 33 64 34 66 0a 55 20 73 61 6e 64 72  c4493d4f.U sandr
0060: 6f 0a 57 20 33 36 39 32 38 0a 3c 61 20 68 72 65  o.W 36928.<a hre
0070: 66 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67  f="https://www.g
0080: 61 69 61 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69  aia-gis.it/fossi
0090: 6c 2f 6c 69 62 73 70 61 74 69 61 6c 69 74 65 2f  l/libspatialite/
00a0: 77 69 6b 69 3f 6e 61 6d 65 3d 34 2e 32 2e 30 2d  wiki?name=4.2.0-
00b0: 64 6f 63 22 3e 62 61 63 6b 3c 2f 61 3e 0d 0a 3c  doc">back</a>..<
00c0: 68 32 3e 41 66 66 69 6e 65 20 54 72 61 6e 73 66  h2>Affine Transf
00d0: 6f 72 6d 61 74 69 6f 6e 73 3c 2f 68 32 3e 0d 0a  ormations</h2>..
00e0: 53 74 61 72 74 69 6e 67 20 73 69 6e 63 65 20 76  Starting since v
00f0: 65 72 73 69 6f 6e 20 3c 62 3e 34 2e 33 2e 30 3c  ersion <b>4.3.0<
0100: 2f 62 3e 20 53 70 61 74 69 61 4c 69 74 65 20 73  /b> SpatiaLite s
0110: 75 70 70 6f 72 74 73 20 73 65 76 65 72 61 6c 20  upports several 
0120: 6e 65 77 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e  new SQL function
0130: 73 20 62 61 73 65 64 20 6f 6e 20 3c 61 20 68 72  s based on <a hr
0140: 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69  ef="http://en.wi
0150: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69  kipedia.org/wiki
0160: 2f 41 66 66 69 6e 65 5f 74 72 61 6e 73 66 6f 72  /Affine_transfor
0170: 6d 61 74 69 6f 6e 22 3e 61 66 66 69 6e 65 20 74  mation">affine t
0180: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 3c 2f  ransformations</
0190: 61 3e 2c 3c 62 72 3e 0d 0a 55 6e 64 65 72 73 74  a>,<br>..Underst
01a0: 61 6e 64 69 6e 67 20 61 6e 64 20 6d 61 73 74 65  anding and maste
01b0: 72 69 6e 67 20 61 6c 6c 20 74 68 65 20 75 6e 64  ring all the und
01c0: 65 72 6c 61 79 69 6e 67 20 6d 61 74 68 65 6d 61  erlaying mathema
01d0: 74 69 63 73 20 63 6f 75 6c 64 20 65 61 73 69 6c  tics could easil
01e0: 79 20 62 65 20 61 20 72 61 74 68 65 72 20 64 69  y be a rather di
01f0: 66 66 69 63 75 6c 74 20 74 61 73 6b 2c 20 6d 6f  fficult task, mo
0200: 72 65 20 6e 6f 74 61 62 6c 79 20 69 66 20 79 6f  re notably if yo
0210: 75 20 68 61 76 65 20 61 62 73 6f 6c 75 74 65 6c  u have absolutel
0220: 79 20 6e 6f 20 66 61 6d 69 6c 69 61 72 69 74 79  y no familiarity
0230: 20 77 69 74 68 20 74 68 69 73 20 6b 69 6e 64 20   with this kind 
0240: 6f 66 20 6f 70 65 72 61 74 69 6f 6e 73 2e 3c 62  of operations.<b
0250: 72 3e 0d 0a 53 6f 20 77 65 27 6c 6c 20 73 74 61  r>..So we'll sta
0260: 72 74 20 73 6c 6f 77 6c 79 20 61 6e 64 20 73 6d  rt slowly and sm
0270: 6f 6f 74 68 6c 79 20 62 79 20 69 6e 74 72 6f 64  oothly by introd
0280: 75 63 69 6e 67 20 66 69 72 73 74 20 61 20 76 65  ucing first a ve
0290: 72 79 20 73 69 6d 70 6c 65 20 70 72 61 63 74 69  ry simple practi
02a0: 63 61 6c 20 65 78 61 6d 70 6c 65 20 62 61 73 65  cal example base
02b0: 64 20 6f 6e 20 6b 69 6e 64 20 6f 66 20 61 20 6a  d on kind of a j
02c0: 6f 6b 65 20 61 62 6f 75 74 20 74 68 65 20 67 65  oke about the ge
02d0: 6f 67 72 61 70 68 79 20 6f 66 20 49 74 61 6c 79  ography of Italy
02e0: 20 61 6e 64 20 53 69 63 69 6c 79 2e 0d 0a 3c 68   and Sicily...<h
02f0: 32 3e 46 61 6e 63 79 20 47 65 6f 67 72 61 70 68  2>Fancy Geograph
0300: 79 20 61 6e 64 20 61 6d 75 73 69 6e 67 20 4d 61  y and amusing Ma
0310: 74 68 3c 2f 68 32 3e 0d 0a 3c 74 61 62 6c 65 20  th</h2>..<table 
0320: 62 6f 72 64 65 72 3d 22 31 22 20 63 65 6c 6c 73  border="1" cells
0330: 70 61 63 69 6e 67 3d 22 34 22 20 63 65 6c 6c 70  pacing="4" cellp
0340: 61 64 64 69 6e 67 3d 22 38 22 3e 0d 0a 3c 74 72  adding="8">..<tr
0350: 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 50 72 65 66 61  ><td>..<h3>Prefa
0360: 63 65 3c 2f 68 33 3e 0d 0a 4c 6f 6f 6b 20 61 74  ce</h3>..Look at
0370: 20 61 20 6d 61 70 20 6f 66 20 49 74 61 6c 79 3b   a map of Italy;
0380: 20 69 74 20 61 70 70 65 61 72 73 20 6f 62 76 69   it appears obvi
0390: 6f 75 73 20 61 74 20 66 69 72 73 74 20 67 6c 61  ous at first gla
03a0: 6e 63 65 20 74 68 61 74 20 53 69 63 69 6c 79 20  nce that Sicily 
03b0: 69 73 20 6c 6f 63 61 74 65 64 20 69 6e 20 61 20  is located in a 
03c0: 76 65 72 79 20 69 6e 63 6f 6e 76 65 6e 69 65 6e  very inconvenien
03d0: 74 20 70 6f 73 69 74 69 6f 6e 3a 0d 0a 3c 6f 6c  t position:..<ol
03e0: 3e 0d 0a 3c 6c 69 3e 53 69 63 69 6c 79 20 69 73  >..<li>Sicily is
03f0: 20 70 6c 61 63 65 64 20 74 6f 6f 20 66 61 72 20   placed too far 
0400: 53 6f 75 74 68 20 61 6e 64 20 74 6f 6f 20 6d 75  South and too mu
0410: 63 68 20 63 6c 6f 73 65 20 74 6f 20 4e 6f 72 74  ch close to Nort
0420: 68 20 41 66 72 69 63 61 3b 20 74 68 69 73 20 69  h Africa; this i
0430: 6d 70 6c 69 65 73 20 61 6e 20 75 6e 70 6c 65 61  mplies an unplea
0440: 73 61 6e 74 20 74 6f 72 72 69 64 20 73 75 6d 6d  sant torrid summ
0450: 65 72 2c 20 61 6e 64 20 74 68 69 73 20 6c 61 74  er, and this lat
0460: 65 72 20 70 6f 73 65 73 20 69 6e 20 74 75 72 6e  er poses in turn
0470: 20 6d 61 6e 79 20 73 65 76 65 72 65 20 6c 69 6d   many severe lim
0480: 69 74 61 74 69 6f 6e 73 20 74 6f 20 61 67 72 69  itations to agri
0490: 63 75 6c 74 75 72 61 6c 20 61 63 74 69 76 69 74  cultural activit
04a0: 69 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 54  ies.</li>..<li>T
04b0: 68 65 20 3c 61 20 68 72 65 66 3d 22 68 74 74 70  he <a href="http
04c0: 3a 2f 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e  ://en.wikipedia.
04d0: 6f 72 67 2f 77 69 6b 69 2f 53 74 72 61 69 74 5f  org/wiki/Strait_
04e0: 6f 66 5f 4d 65 73 73 69 6e 61 22 3e 53 74 72 61  of_Messina">Stra
04f0: 69 74 20 6f 66 20 4d 65 73 73 69 6e 61 3c 2f 61  it of Messina</a
0500: 3e 20 69 73 20 65 78 61 67 67 65 72 61 74 65 64  > is exaggerated
0510: 6c 79 20 6e 61 72 72 6f 77 2c 20 74 68 75 73 20  ly narrow, thus 
0520: 70 6f 73 69 6e 67 20 73 65 76 65 72 65 20 73 65  posing severe se
0530: 63 75 72 69 74 79 20 72 69 73 6b 73 20 74 6f 20  curity risks to 
0540: 74 68 65 20 6e 61 76 69 67 61 74 69 6f 6e 20 6f  the navigation o
0550: 66 20 63 61 70 69 74 61 6c 20 73 68 69 70 73 2c  f capital ships,
0560: 20 62 69 67 20 63 6f 6e 74 61 69 6e 65 72 20 73   big container s
0570: 68 69 70 73 2c 20 63 72 75 69 73 65 20 6c 69 6e  hips, cruise lin
0580: 65 72 73 20 61 6e 64 20 73 75 70 65 72 74 61 6e  ers and supertan
0590: 6b 65 72 73 2e 3c 62 72 3e 0d 0a 45 76 65 6e 20  kers.<br>..Even 
05a0: 77 6f 72 73 74 2c 20 66 72 6f 6d 20 74 69 6d 65  worst, from time
05b0: 20 74 6f 20 74 69 6d 65 20 73 6f 6d 65 20 63 72   to time some cr
05c0: 61 7a 79 20 70 6f 6c 69 74 69 63 69 61 6e 20 73  azy politician s
05d0: 74 61 72 74 73 20 73 74 72 6f 6e 67 6c 79 20 61  tarts strongly a
05e0: 64 76 6f 63 61 74 69 6e 67 20 74 68 65 20 76 65  dvocating the ve
05f0: 72 79 20 73 74 75 70 69 64 20 69 64 65 61 20 74  ry stupid idea t
0600: 6f 20 62 75 69 6c 64 20 61 6e 20 69 6e 63 72 65  o build an incre
0610: 64 69 62 6c 79 20 63 6f 73 74 6c 79 20 3c 61 20  dibly costly <a 
0620: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e  href="http://en.
0630: 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69  wikipedia.org/wi
0640: 6b 69 2f 53 74 72 61 69 74 5f 6f 66 5f 4d 65 73  ki/Strait_of_Mes
0650: 73 69 6e 61 5f 42 72 69 64 67 65 22 3e 62 72 69  sina_Bridge">bri
0660: 64 67 65 20 63 72 6f 73 73 69 6e 67 20 74 68 65  dge crossing the
0670: 20 53 74 72 61 69 74 3c 2f 61 3e 2c 20 63 6f 6d   Strait</a>, com
0680: 70 6c 65 74 65 6c 79 20 6f 76 65 72 6c 6f 6f 6b  pletely overlook
0690: 69 6e 67 20 74 68 65 20 76 65 72 79 20 68 69 67  ing the very hig
06a0: 68 20 73 65 69 73 6d 69 63 20 72 69 73 6b 20 6f  h seismic risk o
06b0: 66 20 74 68 69 73 20 64 69 73 74 72 69 63 74 20  f this district 
06c0: 61 6e 64 20 70 75 72 70 6f 73 65 6c 79 20 66 6f  and purposely fo
06d0: 72 67 65 74 74 69 6e 67 20 74 6f 20 72 65 6d 65  rgetting to reme
06e0: 6d 62 65 72 20 74 68 61 74 20 69 6e 20 31 39 30  mber that in 190
06f0: 38 20 62 6f 74 68 20 74 6f 77 6e 73 20 6f 66 20  8 both towns of 
0700: 3c 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f  <a href="http://
0710: 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67  en.wikipedia.org
0720: 2f 77 69 6b 69 2f 31 39 30 38 5f 4d 65 73 73 69  /wiki/1908_Messi
0730: 6e 61 5f 65 61 72 74 68 71 75 61 6b 65 22 3e 4d  na_earthquake">M
0740: 65 73 73 69 6e 61 20 61 6e 64 20 52 65 67 67 69  essina and Reggi
0750: 6f 20 43 61 6c 61 62 72 69 61 3c 2f 61 3e 20 77  o Calabria</a> w
0760: 65 72 65 20 63 6f 6d 70 6c 65 74 65 6c 79 20 64  ere completely d
0770: 65 73 74 72 6f 79 65 64 20 62 79 20 61 6e 20 65  estroyed by an e
0780: 61 72 74 68 71 75 61 6b 65 20 66 6f 6c 6c 6f 77  arthquake follow
0790: 65 64 20 62 79 20 61 20 74 73 75 6e 61 6d 69 2e  ed by a tsunami.
07a0: 3c 62 72 3e 0d 0a 4d 6f 72 65 20 74 68 61 6e 20  <br>..More than 
07b0: 31 32 30 2c 30 30 30 20 70 65 6f 70 6c 65 73 20  120,000 peoples 
07c0: 6c 6f 73 74 20 74 68 65 69 72 20 6c 69 76 65 73  lost their lives
07d0: 2c 20 61 6e 64 20 69 74 20 77 61 73 20 6f 6e 65  , and it was one
07e0: 20 6f 66 20 74 68 65 20 6d 6f 73 74 20 66 72 69   of the most fri
07f0: 67 68 74 65 6e 69 6e 67 20 6e 61 74 75 72 61 6c  ghtening natural
0800: 20 64 69 73 61 73 74 65 72 73 20 72 65 67 69 73   disasters regis
0810: 74 65 72 65 64 20 69 6e 20 45 75 72 6f 70 65 20  tered in Europe 
0820: 64 75 72 69 6e 67 20 6d 6f 64 65 72 6e 20 74 69  during modern ti
0830: 6d 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c 3e  mes.</li>..</ol>
0840: 0d 0a 53 6f 20 77 65 27 6c 6c 20 69 6d 6d 65 64  ..So we'll immed
0850: 69 61 74 65 6c 79 20 73 74 61 72 74 20 61 20 74  iately start a t
0860: 68 65 6f 72 65 74 69 63 61 6c 20 63 61 73 65 20  heoretical case 
0870: 73 74 75 64 79 20 69 6e 74 65 6e 64 65 64 20 74  study intended t
0880: 6f 20 69 64 65 6e 74 69 66 79 20 61 20 70 6f 73  o identify a pos
0890: 73 69 62 6c 65 20 61 6c 74 65 72 6e 61 74 69 76  sible alternativ
08a0: 65 20 6c 6f 63 61 74 69 6f 6e 20 66 6f 72 20 53  e location for S
08b0: 69 63 69 6c 79 2e 3c 62 72 3e 0d 0a 49 6e 63 69  icily.<br>..Inci
08c0: 64 65 6e 74 61 6c 6c 79 20 77 65 27 6c 6c 20 75  dentally we'll u
08d0: 73 65 20 74 68 65 20 6e 65 77 20 53 51 4c 20 66  se the new SQL f
08e0: 75 6e 63 74 69 6f 6e 73 20 62 61 73 65 64 20 6f  unctions based o
08f0: 6e 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f  n Affine Transfo
0900: 72 6d 61 74 69 6f 6e 73 20 66 6f 72 20 74 68 69  rmations for thi
0910: 73 20 74 61 73 6b 2e 3c 62 72 3e 0d 0a 4c 65 74  s task.<br>..Let
0920: 27 73 20 67 6f 20 6f 6e 2e 20 20 0d 0a 3c 2f 74  's go on.  ..</t
0930: 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73 72 63  d><td>..<img src
0940: 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61  ="https://www.ga
0950: 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d 73  ia-gis.it/gaia-s
0960: 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 63 73 2f  ins/affine-pics/
0970: 73 69 63 69 6c 79 5f 30 2e 70 6e 67 22 20 61 6c  sicily_0.png" al
0980: 74 3d 22 73 69 63 69 6c 79 2d 30 22 20 62 6f 72  t="sicily-0" bor
0990: 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74 64 3e 3c  der="1">..</td><
09a0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 0d 0a  /tr>..<tr><td>..
09b0: 3c 68 33 3e 53 74 65 70 20 23 31 3a 20 74 72 61  <h3>Step #1: tra
09c0: 6e 73 6c 61 74 69 6e 67 20 53 69 63 69 6c 79 20  nslating Sicily 
09d0: 69 6e 74 6f 20 61 20 6d 6f 72 65 20 63 6f 6e 76  into a more conv
09e0: 65 6e 69 65 6e 74 20 70 6f 73 69 74 69 6f 6e 3c  enient position<
09f0: 2f 68 33 3e 0d 0a 54 68 65 72 65 20 69 73 20 70  /h3>..There is p
0a00: 6c 65 6e 74 79 20 6f 66 20 66 72 65 65 20 72 6f  lenty of free ro
0a10: 6f 6d 20 69 6e 20 74 68 65 20 4c 6f 77 65 72 20  om in the Lower 
0a20: 54 79 72 72 68 65 6e 69 61 6e 20 53 65 61 2c 20  Tyrrhenian Sea, 
0a30: 73 6f 20 77 65 27 6c 6c 20 73 74 61 72 74 20 62  so we'll start b
0a40: 79 20 61 70 70 6c 79 69 6e 67 20 61 20 3c 61 20  y applying a <a 
0a50: 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e  href="http://en.
0a60: 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69  wikipedia.org/wi
0a70: 6b 69 2f 54 72 61 6e 73 6c 61 74 69 6f 6e 5f 25  ki/Translation_%
0a80: 32 38 67 65 6f 6d 65 74 72 79 25 32 39 22 3e 74  28geometry%29">t
0a90: 72 61 6e 73 6c 61 74 69 6f 6e 3c 2f 61 3e 20 74  ranslation</a> t
0aa0: 6f 20 53 69 63 69 6c 79 3a 20 74 68 69 73 20 70  o Sicily: this p
0ab0: 72 61 63 74 69 63 61 6c 6c 79 20 6d 65 61 6e 73  ractically means
0ac0: 20 61 64 64 69 6e 67 20 28 6f 72 20 73 75 62 74   adding (or subt
0ad0: 72 61 63 74 69 6e 67 29 20 61 20 63 6f 6e 73 74  racting) a const
0ae0: 61 6e 74 20 76 61 6c 75 65 20 74 6f 20 74 68 65  ant value to the
0af0: 20 63 6f 6f 72 64 69 6e 61 74 65 73 20 6f 6e 20   coordinates on 
0b00: 62 6f 74 68 20 3c 62 3e 78 3c 2f 62 3e 20 61 6e  both <b>x</b> an
0b10: 64 20 3c 62 3e 79 3c 2f 62 3e 20 61 78 65 73 2e  d <b>y</b> axes.
0b20: 3c 62 72 3e 0d 0a 41 66 74 65 72 20 61 20 76 65  <br>..After a ve
0b30: 72 79 20 71 75 69 63 6b 20 65 78 61 6d 69 6e 61  ry quick examina
0b40: 74 69 6f 6e 20 6d 6f 76 69 6e 67 20 53 69 63 69  tion moving Sici
0b50: 6c 79 20 3c 62 3e 31 35 30 20 6b 6d 3c 2f 62 3e  ly <b>150 km</b>
0b60: 20 28 69 2e 65 2e 20 3c 62 3e 31 35 30 2c 30 30   (i.e. <b>150,00
0b70: 30 20 6d 3c 2f 62 3e 29 20 77 65 73 74 77 61 72  0 m</b>) westwar
0b80: 64 20 61 6e 64 20 3c 62 3e 31 35 30 20 6b 6d 3c  d and <b>150 km<
0b90: 2f 62 3e 20 6e 6f 72 74 68 77 61 72 64 20 73 65  /b> northward se
0ba0: 65 6d 73 20 74 6f 20 62 65 20 61 6e 20 61 62 73  ems to be an abs
0bb0: 6f 6c 75 74 65 6c 79 20 72 65 61 73 6f 6e 61 62  olutely reasonab
0bc0: 6c 65 20 63 68 6f 69 63 65 2e 3c 62 72 3e 0d 0a  le choice.<br>..
0bd0: 53 6f 20 75 73 69 6e 67 20 74 68 65 20 41 66 66  So using the Aff
0be0: 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69  ine Transformati
0bf0: 6f 6e 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 73  on SQL functions
0c00: 20 77 65 27 6c 6c 20 64 75 6c 79 20 65 78 65 63   we'll duly exec
0c10: 75 74 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e  ute the followin
0c20: 67 20 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 3a  g SQL statement:
0c30: 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 43 52  ..<verbatim>..CR
0c40: 45 41 54 45 20 54 41 42 4c 45 20 73 69 63 69 6c  EATE TABLE sicil
0c50: 69 61 5f 31 20 41 53 0d 0a 53 45 4c 45 43 54 20  ia_1 AS..SELECT 
0c60: 63 6f 64 5f 72 65 67 2c 20 0d 0a 20 20 20 41 54  cod_reg, ..   AT
0c70: 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 67 65 6f 6d  M_Transform(geom
0c80: 65 74 72 79 2c 0d 0a 20 20 20 20 20 20 41 54 4d  etry,..      ATM
0c90: 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61 74 65  _CreateTranslate
0ca0: 28 2d 31 35 30 30 30 30 2c 20 31 35 30 30 30 30  (-150000, 150000
0cb0: 29 29 20 41 53 20 67 65 6f 6d 0d 0a 46 52 4f 4d  )) AS geom..FROM
0cc0: 20 73 69 63 69 6c 69 61 5f 30 3b 0d 0a 53 45 4c   sicilia_0;..SEL
0cd0: 45 43 54 20 52 65 63 6f 76 65 72 47 65 6f 6d 65  ECT RecoverGeome
0ce0: 74 72 79 43 6f 6c 75 6d 6e 28 27 73 69 63 69 6c  tryColumn('sicil
0cf0: 69 61 5f 31 27 2c 20 27 67 65 6f 6d 27 2c 20 33  ia_1', 'geom', 3
0d00: 32 36 33 32 2c 20 27 4d 55 4c 54 49 50 4f 4c 59  2632, 'MULTIPOLY
0d10: 47 4f 4e 27 2c 20 27 58 59 27 29 3b 0d 0a 3c 2f  GON', 'XY');..</
0d20: 76 65 72 62 61 74 69 6d 3e 20 0d 0a 3c 62 3e 52  verbatim> ..<b>R
0d30: 65 6d 61 72 6b 73 3c 2f 62 3e 3a 0d 0a 3c 75 6c  emarks</b>:..<ul
0d40: 3e 0d 0a 3c 6c 69 3e 61 6c 6c 20 61 66 66 69 6e  >..<li>all affin
0d50: 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  e transformation
0d60: 20 72 65 6c 61 74 65 64 20 53 51 4c 20 66 75 6e   related SQL fun
0d70: 63 74 69 6f 6e 20 6e 61 6d 65 73 20 73 74 61 72  ction names star
0d80: 74 20 77 69 74 68 20 61 6e 20 3c 62 3e 41 54 4d  t with an <b>ATM
0d90: 5f 3c 2f 62 3e 20 70 72 65 66 69 78 3a 20 74 68  _</b> prefix: th
0da0: 69 73 20 73 69 6d 70 6c 79 20 73 74 61 6e 64 73  is simply stands
0db0: 20 66 6f 72 20 3c 69 3e 3c 62 3e 3c 75 3e 41 3c   for <i><b><u>A<
0dc0: 2f 75 3e 3c 2f 62 3e 66 66 69 6e 65 20 3c 62 3e  /u></b>ffine <b>
0dd0: 3c 75 3e 54 3c 2f 75 3e 3c 2f 62 3e 72 61 6e 73  <u>T</u></b>rans
0de0: 66 6f 72 6d 61 74 69 6f 6e 20 3c 62 3e 3c 75 3e  formation <b><u>
0df0: 4d 3c 2f 75 3e 3c 2f 62 3e 61 74 72 69 78 3c 2f  M</u></b>atrix</
0e00: 69 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62  i>.</li>..<li><b
0e10: 3e 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28 29  >ATM_Transform()
0e20: 3c 2f 62 3e 20 69 73 20 76 65 72 79 20 73 69 6d  </b> is very sim
0e30: 69 6c 61 72 20 74 6f 20 3c 62 3e 53 54 5f 54 72  ilar to <b>ST_Tr
0e40: 61 6e 73 66 6f 72 6d 28 29 3c 2f 62 3e 3b 20 74  ansform()</b>; t
0e50: 68 65 20 6d 6f 73 74 20 6f 62 76 69 6f 75 73 20  he most obvious 
0e60: 64 69 66 66 65 72 65 6e 63 65 20 69 73 20 69 6e  difference is in
0e70: 20 74 68 61 74 20 61 6c 6c 20 74 72 61 6e 73 66   that all transf
0e80: 6f 72 6d 61 74 69 6f 6e 20 61 72 67 75 6d 65 6e  ormation argumen
0e90: 74 73 20 61 72 65 20 6e 6f 77 20 65 78 70 65 63  ts are now expec
0ea0: 74 65 64 20 74 6f 20 62 65 20 70 61 73 73 65 64  ted to be passed
0eb0: 20 75 6e 64 65 72 20 74 68 65 20 66 6f 72 6d 20   under the form 
0ec0: 6f 66 20 61 6e 20 61 70 70 72 6f 70 72 69 61 74  of an appropriat
0ed0: 65 20 3c 62 3e 42 4c 4f 42 2d 73 65 72 69 61 6c  e <b>BLOB-serial
0ee0: 69 7a 65 64 3c 2f 62 3e 20 41 66 66 69 6e 65 20  ized</b> Affine 
0ef0: 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d  Transformation M
0f00: 61 74 72 69 78 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  atrix.</li>..<li
0f10: 3e 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 54 72  ><b>ATM_CreateTr
0f20: 61 6e 73 6c 61 74 65 28 29 3c 2f 62 3e 20 73 69  anslate()</b> si
0f30: 6d 70 6c 79 20 69 73 20 61 6e 20 53 51 4c 20 66  mply is an SQL f
0f40: 75 6e 63 74 69 6f 6e 20 72 65 74 75 72 6e 69 6e  unction returnin
0f50: 67 20 61 20 3c 62 3e 42 4c 4f 42 2d 73 65 72 69  g a <b>BLOB-seri
0f60: 61 6c 69 7a 65 64 3c 2f 62 3e 20 41 66 66 69 6e  alized</b> Affin
0f70: 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  e Transformation
0f80: 20 4d 61 74 72 69 78 20 69 6e 69 74 69 61 6c 69   Matrix initiali
0f90: 7a 65 64 20 69 6e 20 73 75 63 68 20 61 20 77 61  zed in such a wa
0fa0: 79 20 74 6f 20 72 65 70 72 65 73 65 6e 74 20 61  y to represent a
0fb0: 20 73 69 6d 70 6c 65 20 3c 62 3e 32 44 20 54 72   simple <b>2D Tr
0fc0: 61 6e 73 6c 61 74 65 3c 2f 62 3e 20 61 63 63 6f  anslate</b> acco
0fd0: 72 64 69 6e 67 6c 79 20 74 6f 20 3c 62 3e 28 74  rdingly to <b>(t
0fe0: 78 2c 20 74 79 29 3c 2f 62 3e 20 61 72 67 75 6d  x, ty)</b> argum
0ff0: 65 6e 74 73 2e 3c 62 72 3e 0d 0a 59 6f 75 20 63  ents.<br>..You c
1000: 6f 75 6c 64 20 65 76 65 6e 74 75 61 6c 6c 79 20  ould eventually 
1010: 64 65 66 69 6e 65 20 61 20 63 6f 6d 70 6c 65 74  define a complet
1020: 65 20 3c 62 3e 33 44 20 54 72 61 6e 73 6c 61 74  e <b>3D Translat
1030: 65 3c 2f 62 3e 20 62 79 20 70 61 73 73 69 6e 67  e</b> by passing
1040: 20 3c 62 3e 28 74 78 2c 20 74 79 2c 20 74 7a 29   <b>(tx, ty, tz)
1050: 3c 2f 62 3e 20 61 72 67 75 6d 65 6e 74 73 2c 20  </b> arguments, 
1060: 62 75 74 20 74 68 69 73 20 69 73 6e 27 74 20 73  but this isn't s
1070: 74 72 69 63 74 6c 79 20 72 65 71 75 69 72 65 64  trictly required
1080: 20 69 6e 20 6f 75 72 20 63 75 72 72 65 6e 74 20   in our current 
1090: 65 78 61 6d 70 6c 65 2e 0d 0a 3c 2f 75 6c 3e 0d  example...</ul>.
10a0: 0a 3c 2f 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67  .</td><td>..<img
10b0: 20 73 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77   src="https://ww
10c0: 77 2e 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61  w.gaia-gis.it/ga
10d0: 69 61 2d 73 69 6e 73 2f 61 66 66 69 6e 65 2d 70  ia-sins/affine-p
10e0: 69 63 73 2f 73 69 63 69 6c 79 5f 31 2e 70 6e 67  ics/sicily_1.png
10f0: 22 20 61 6c 74 3d 22 73 69 63 69 6c 69 61 2d 31  " alt="sicilia-1
1100: 22 20 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c  " border="1">..<
1110: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
1120: 74 64 3e 0d 0a 3c 68 33 3e 53 74 65 70 20 23 32  td>..<h3>Step #2
1130: 3a 20 72 6f 74 61 74 69 6e 67 20 53 69 63 69 6c  : rotating Sicil
1140: 79 20 73 6f 20 74 6f 20 67 65 74 20 61 20 6e 69  y so to get a ni
1150: 63 65 20 68 6f 72 69 7a 6f 6e 74 61 6c 20 61 6c  ce horizontal al
1160: 69 67 6e 6d 65 6e 74 3c 2f 68 33 3e 0d 0a 41 6c  ignment</h3>..Al
1170: 69 67 6e 69 6e 67 20 74 68 65 20 73 6f 75 74 68  igning the south
1180: 65 72 6e 20 73 68 6f 72 65 73 20 6f 66 20 53 69  ern shores of Si
1190: 63 69 6c 79 20 74 6f 20 61 6e 20 61 6c 6d 6f 73  cily to an almos
11a0: 74 20 68 6f 72 69 7a 6f 6e 74 61 6c 20 6c 69 6e  t horizontal lin
11b0: 65 20 77 69 6c 6c 20 73 75 72 65 6c 79 20 6c 65  e will surely le
11c0: 61 64 20 74 6f 20 61 20 6d 6f 72 65 20 6e 69 63  ad to a more nic
11d0: 65 6c 79 20 6f 72 64 65 72 65 64 20 6c 61 79 6f  ely ordered layo
11e0: 75 74 3a 20 73 6f 20 77 65 20 68 61 76 65 20 6e  ut: so we have n
11f0: 6f 77 20 74 6f 20 61 70 70 6c 79 20 61 20 3c 61  ow to apply a <a
1200: 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e   href="http://en
1210: 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77  .wikipedia.org/w
1220: 69 6b 69 2f 52 6f 74 61 74 69 6f 6e 5f 25 32 38  iki/Rotation_%28
1230: 6d 61 74 68 65 6d 61 74 69 63 73 25 32 39 22 3e  mathematics%29">
1240: 63 6f 75 6e 74 65 72 63 6c 6f 63 6b 77 69 73 65  counterclockwise
1250: 20 72 6f 74 61 74 69 6f 6e 3c 2f 61 3e 20 6f 66   rotation</a> of
1260: 20 61 62 6f 75 74 20 3c 62 3e 32 35 2e 30 20 64   about <b>25.0 d
1270: 65 67 72 65 65 73 3c 2f 62 3e 2e 3c 62 72 3e 0d  egrees</b>.<br>.
1280: 0a 54 68 61 6e 6b 73 20 74 6f 20 41 66 66 69 6e  .Thanks to Affin
1290: 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  e Transformation
12a0: 73 2c 20 77 65 20 63 61 6e 20 63 6f 6d 62 69 6e  s, we can combin
12b0: 65 20 62 6f 74 68 20 74 68 65 20 70 72 65 76 69  e both the previ
12c0: 6f 75 73 20 74 72 61 6e 73 6c 61 74 69 6f 6e 20  ous translation 
12d0: 61 6e 64 20 74 68 65 20 63 75 72 72 65 6e 74 20  and the current 
12e0: 72 6f 74 61 74 69 6f 6e 20 69 6e 74 6f 20 61 20  rotation into a 
12f0: 73 69 6e 67 6c 65 20 6d 6f 76 65 6d 65 6e 74 20  single movement 
1300: 28 61 20 73 6f 20 63 61 6c 6c 65 64 20 3c 62 3e  (a so called <b>
1310: 72 6f 74 6f 74 72 61 6e 73 6c 61 74 69 6f 6e 3c  rototranslation<
1320: 2f 62 3e 29 2e 3c 62 72 3e 0d 0a 57 65 20 73 69  /b>).<br>..We si
1330: 6d 70 6c 79 20 68 61 76 65 20 74 6f 20 65 78 65  mply have to exe
1340: 63 75 74 65 20 74 68 65 20 66 6f 6c 6c 6f 77 69  cute the followi
1350: 6e 67 20 53 51 4c 20 73 74 61 74 65 6d 65 6e 74  ng SQL statement
1360: 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 43 52 45  :..<verbatim>CRE
1370: 41 54 45 20 54 41 42 4c 45 20 73 69 63 69 6c 69  ATE TABLE sicili
1380: 61 5f 32 20 41 53 0d 0a 53 45 4c 45 43 54 20 63  a_2 AS..SELECT c
1390: 6f 64 5f 72 65 67 2c 20 0d 0a 20 20 20 41 54 4d  od_reg, ..   ATM
13a0: 5f 54 72 61 6e 73 66 6f 72 6d 28 67 65 6f 6d 65  _Transform(geome
13b0: 74 72 79 2c 0d 0a 20 20 20 20 20 20 41 54 4d 5f  try,..      ATM_
13c0: 54 72 61 6e 73 6c 61 74 65 28 2d 31 35 30 30 30  Translate(-15000
13d0: 30 2c 20 31 35 30 30 30 30 2c 0d 0a 20 20 20 20  0, 150000,..    
13e0: 20 20 20 20 20 41 54 4d 5f 54 72 61 6e 73 6c 61       ATM_Transla
13f0: 74 65 28 63 78 2c 20 63 79 2c 0d 0a 20 20 20 20  te(cx, cy,..    
1400: 20 20 20 20 20 20 20 20 41 54 4d 5f 52 6f 74 61          ATM_Rota
1410: 74 65 28 32 35 2c 0d 0a 20 20 20 20 20 20 20 20  te(25,..        
1420: 20 20 20 20 20 20 20 41 54 4d 5f 43 72 65 61 74         ATM_Creat
1430: 65 54 72 61 6e 73 6c 61 74 65 28 2d 63 78 2c 20  eTranslate(-cx, 
1440: 2d 63 79 29 29 29 29 29 20 41 53 20 67 65 6f 6d  -cy))))) AS geom
1450: 0d 0a 46 52 4f 4d 20 28 53 45 4c 45 43 54 20 63  ..FROM (SELECT c
1460: 6f 64 5f 72 65 67 2c 20 53 54 5f 58 28 63 65 6e  od_reg, ST_X(cen
1470: 74 72 6f 69 64 29 20 41 53 20 63 78 2c 20 53 54  troid) AS cx, ST
1480: 5f 59 28 63 65 6e 74 72 6f 69 64 29 20 41 53 20  _Y(centroid) AS 
1490: 63 79 2c 20 67 65 6f 6d 65 74 72 79 0d 0a 20 20  cy, geometry..  
14a0: 20 20 20 20 46 52 4f 4d 20 28 53 45 4c 45 43 54      FROM (SELECT
14b0: 20 63 6f 64 5f 72 65 67 2c 20 53 54 5f 43 65 6e   cod_reg, ST_Cen
14c0: 74 72 6f 69 64 28 67 65 6f 6d 65 74 72 79 29 20  troid(geometry) 
14d0: 41 53 20 63 65 6e 74 72 6f 69 64 2c 20 67 65 6f  AS centroid, geo
14e0: 6d 65 74 72 79 20 0d 0a 20 20 20 20 20 20 20 20  metry ..        
14f0: 20 20 20 20 46 52 4f 4d 20 73 69 63 69 6c 69 61      FROM sicilia
1500: 5f 30 29 20 41 53 20 67 31 0d 0a 29 20 41 53 20  _0) AS g1..) AS 
1510: 67 32 3b 0d 0a 53 45 4c 45 43 54 20 52 65 63 6f  g2;..SELECT Reco
1520: 76 65 72 47 65 6f 6d 65 74 72 79 43 6f 6c 75 6d  verGeometryColum
1530: 6e 28 27 73 69 63 69 6c 69 61 5f 32 27 2c 20 27  n('sicilia_2', '
1540: 67 65 6f 6d 27 2c 20 33 32 36 33 32 2c 20 27 4d  geom', 32632, 'M
1550: 55 4c 54 49 50 4f 4c 59 47 4f 4e 27 2c 20 27 58  ULTIPOLYGON', 'X
1560: 59 27 29 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d  Y');..</verbatim
1570: 3e 20 20 0d 0a 3c 62 3e 52 65 6d 61 72 6b 73 3c  >  ..<b>Remarks<
1580: 2f 62 3e 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e  /b>:..<ul>..<li>
1590: 63 6f 72 72 65 63 74 6c 79 20 68 61 6e 64 6c 69  correctly handli
15a0: 6e 67 20 52 6f 74 61 74 65 20 69 73 20 61 20 6c  ng Rotate is a l
15b0: 69 74 74 6c 65 20 62 69 74 20 6d 6f 72 65 20 64  ittle bit more d
15c0: 69 66 66 69 63 75 6c 74 2e 0d 0a 41 6e 79 20 72  ifficult...Any r
15d0: 6f 74 61 74 69 6f 6e 20 77 69 6c 6c 20 61 6c 77  otation will alw
15e0: 61 79 73 20 69 6d 70 6c 79 20 61 20 3c 62 3e 66  ays imply a <b>f
15f0: 69 78 65 64 20 63 65 6e 74 65 72 20 70 6f 69 6e  ixed center poin
1600: 74 3c 2f 62 3e 2c 20 61 6e 64 20 62 79 20 64 65  t</b>, and by de
1610: 66 61 75 6c 74 20 74 68 69 73 20 69 73 20 65 78  fault this is ex
1620: 61 63 74 6c 79 20 70 6c 61 63 65 64 20 61 74 20  actly placed at 
1630: 74 68 65 20 63 6f 6f 72 64 69 6e 61 74 65 73 20  the coordinates 
1640: 6f 72 69 67 69 6e 3a 20 3c 62 3e 28 30 2c 20 30  origin: <b>(0, 0
1650: 29 3c 2f 62 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  )</b>.</li>..<li
1660: 3e 73 6f 20 61 20 76 65 72 79 20 6e 61 69 76 65  >so a very naive
1670: 20 61 74 74 65 6d 70 74 20 74 6f 20 64 69 72 65   attempt to dire
1680: 63 74 6c 79 20 69 6e 76 6f 6b 65 20 3c 62 3e 41  ctly invoke <b>A
1690: 54 4d 5f 52 6f 74 61 74 65 28 32 35 29 3c 2f 62  TM_Rotate(25)</b
16a0: 3e 20 77 69 6c 6c 20 73 69 6d 70 6c 79 20 72 65  > will simply re
16b0: 6c 6f 63 61 74 65 20 53 69 63 69 6c 79 20 69 6e  locate Sicily in
16c0: 20 53 6f 75 74 68 65 72 6e 20 53 70 61 69 6e 2c   Southern Spain,
16d0: 20 61 6e 64 20 74 68 69 73 20 61 62 73 6f 6c 75   and this absolu
16e0: 74 65 6c 79 20 69 73 6e 27 74 20 6f 75 72 20 69  tely isn't our i
16f0: 6e 74 65 6e 74 69 6f 6e 2e 3c 2f 6c 69 3e 0d 0a  ntention.</li>..
1700: 3c 6c 69 3e 77 68 61 74 20 77 65 20 72 65 61 6c  <li>what we real
1710: 6c 79 20 6e 65 65 64 20 69 73 20 61 20 6d 6f 72  ly need is a mor
1720: 65 20 63 6f 6d 70 6c 65 78 20 73 65 71 75 65 6e  e complex sequen
1730: 63 65 20 6f 66 20 63 68 61 69 6e 65 64 20 74 72  ce of chained tr
1740: 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 3a 0d 0a  ansformations:..
1750: 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 77 65 27 6c 6c 20  <ol>..<li>we'll 
1760: 73 74 61 72 74 20 66 69 72 73 74 20 62 79 20 63  start first by c
1770: 72 65 61 74 69 6e 67 20 61 20 6e 65 77 20 3c 62  reating a new <b
1780: 3e 42 4c 4f 42 2d 4d 61 74 72 69 78 3c 2f 62 3e  >BLOB-Matrix</b>
1790: 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 72 65 6c   intended to rel
17a0: 6f 63 61 74 65 20 53 69 63 69 6c 79 27 73 20 3c  ocate Sicily's <
17b0: 61 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65  a href="http://e
17c0: 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f  n.wikipedia.org/
17d0: 77 69 6b 69 2f 43 65 6e 74 72 6f 69 64 22 3e 63  wiki/Centroid">c
17e0: 65 6e 74 72 6f 69 64 3c 2f 61 3e 20 65 78 61 63  entroid</a> exac
17f0: 74 6c 79 20 6f 6e 20 74 68 65 20 63 6f 6f 72 64  tly on the coord
1800: 69 6e 61 74 65 73 20 6f 72 69 67 69 6e 3a 20 3c  inates origin: <
1810: 62 3e 41 54 4d 5f 43 72 65 61 74 65 54 72 61 6e  b>ATM_CreateTran
1820: 73 6c 61 74 65 28 2d 63 78 2c 20 2d 63 79 29 3c  slate(-cx, -cy)<
1830: 2f 62 3e 3c 2f 6c 69 3e 20 0d 0a 3c 6c 69 3e 6e  /b></li> ..<li>n
1840: 6f 77 20 77 65 20 63 61 6e 20 73 61 66 65 6c 79  ow we can safely
1850: 20 63 68 61 69 6e 20 74 68 65 20 69 6e 74 65 6e   chain the inten
1860: 64 65 64 20 52 6f 74 61 74 65 3a 20 3c 62 3e 41  ded Rotate: <b>A
1870: 54 4d 5f 52 6f 74 61 74 65 28 32 35 2c 20 61 74  TM_Rotate(25, at
1880: 6d 2d 62 6c 6f 62 29 3c 2f 62 3e 3c 2f 6c 69 3e  m-blob)</b></li>
1890: 0d 0a 3c 6c 69 3e 61 66 74 65 72 20 61 70 70 6c  ..<li>after appl
18a0: 79 69 6e 67 20 52 6f 74 61 74 65 20 77 65 20 68  ying Rotate we h
18b0: 61 76 65 20 6e 6f 77 20 74 6f 20 72 65 73 74 6f  ave now to resto
18c0: 72 65 20 74 68 65 20 69 6e 69 74 69 61 6c 20 70  re the initial p
18d0: 6f 73 69 74 69 6f 6e 3a 20 3c 62 3e 41 54 4d 5f  osition: <b>ATM_
18e0: 54 72 61 6e 73 6c 61 74 65 28 63 78 2c 20 63 79  Translate(cx, cy
18f0: 2c 20 61 74 6d 2d 62 6c 6f 62 29 3c 2f 62 3e 3c  , atm-blob)</b><
1900: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 61 6e 64 20 66 69  /li>..<li>and fi
1910: 6e 61 6c 6c 79 20 77 65 27 6c 6c 20 61 70 70 6c  nally we'll appl
1920: 79 20 74 68 65 20 54 72 61 6e 73 6c 61 74 69 6f  y the Translatio
1930: 6e 20 69 6e 74 65 6e 64 65 64 20 74 6f 20 72 65  n intended to re
1940: 70 6f 73 69 74 69 6f 6e 20 53 69 63 69 6c 79 20  position Sicily 
1950: 77 65 73 74 77 61 72 64 20 61 6e 64 20 6e 6f 72  westward and nor
1960: 74 68 77 61 72 64 3a 20 3c 62 3e 41 54 4d 5f 54  thward: <b>ATM_T
1970: 72 61 6e 73 6c 61 74 65 28 2d 31 35 30 30 30 30  ranslate(-150000
1980: 2c 20 31 35 30 30 30 30 2c 20 61 74 6d 2d 62 6c  , 150000, atm-bl
1990: 6f 62 29 3c 2f 62 3e 3c 62 72 3e 0d 0a 3c 69 3e  ob)</b><br>..<i>
19a0: 77 65 27 76 65 20 75 73 65 64 20 74 77 6f 20 73  we've used two s
19b0: 65 70 61 72 61 74 65 20 74 72 61 6e 73 6c 61 74  eparate translat
19c0: 69 6f 6e 73 20 73 69 6d 70 6c 79 20 66 6f 72 20  ions simply for 
19d0: 64 69 64 61 63 74 69 63 20 63 6c 61 72 69 74 79  didactic clarity
19e0: 3a 20 77 65 20 63 6f 75 6c 64 20 65 61 73 69 6c  : we could easil
19f0: 79 20 6d 65 72 67 65 20 62 6f 74 68 20 74 68 65  y merge both the
1a00: 6d 20 69 6e 74 6f 20 61 20 73 69 6e 67 6c 65 20  m into a single 
1a10: 74 72 61 6e 73 6c 61 74 69 6f 6e 3a 3c 62 72 3e  translation:<br>
1a20: 20 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 63   ATM_Translate(c
1a30: 78 20 2d 20 31 35 30 30 30 30 2c 20 63 79 20 2b  x - 150000, cy +
1a40: 20 31 35 30 30 30 30 2c 20 61 74 6d 2d 62 6c 6f   150000, atm-blo
1a50: 62 29 3c 2f 69 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  b)</i></li>..<li
1a60: 3e 74 68 69 73 20 77 61 79 20 3c 62 3e 41 54 4d  >this way <b>ATM
1a70: 5f 54 72 61 6e 73 66 6f 72 6d 28 29 3c 2f 62 3e  _Transform()</b>
1a80: 20 77 69 6c 6c 20 72 65 63 65 69 76 65 20 74 68   will receive th
1a90: 65 20 66 69 6e 61 6c 20 3c 62 3e 42 4c 4f 42 2d  e final <b>BLOB-
1aa0: 4d 61 74 72 69 78 3c 2f 62 3e 20 72 65 73 75 6c  Matrix</b> resul
1ab0: 74 69 6e 67 20 62 79 20 63 68 61 69 6e 69 6e 67  ting by chaining
1ac0: 20 61 6c 6c 20 74 68 65 20 61 62 6f 76 65 20 74   all the above t
1ad0: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 73 74  ransformation st
1ae0: 65 70 73 20 69 6e 20 74 68 65 20 63 6f 72 72 65  eps in the corre
1af0: 63 74 20 73 65 71 75 65 6e 63 65 2e 3c 2f 6c 69  ct sequence.</li
1b00: 3e 0d 0a 3c 2f 6f 6c 3e 3c 2f 6c 69 3e 0d 0a 3c  >..</ol></li>..<
1b10: 6c 69 3e 3c 62 3e 3c 75 3e 56 65 72 79 20 69 6d  li><b><u>Very im
1b20: 70 6f 72 74 61 6e 74 20 6e 6f 74 69 63 65 3c 2f  portant notice</
1b30: 75 3e 3c 2f 62 3e 3a 20 41 66 66 69 6e 65 20 54  u></b>: Affine T
1b40: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 73 20 3c  ransformations <
1b50: 75 3e 61 72 65 20 6e 6f 74 20 63 6f 6d 6d 75 74  u>are not commut
1b60: 61 74 69 76 65 3c 2f 75 3e 3a 20 74 68 65 20 72  ative</u>: the r
1b70: 65 6c 61 74 69 76 65 20 6f 72 64 65 72 20 6f 66  elative order of
1b80: 20 73 75 62 73 65 71 75 65 6e 74 20 6f 70 65 72   subsequent oper
1b90: 61 74 69 6f 6e 73 20 69 6e 20 61 20 63 6f 6d 70  ations in a comp
1ba0: 6c 65 78 20 74 72 61 6e 73 66 6f 72 6d 61 74 69  lex transformati
1bb0: 6f 6e 20 63 68 61 69 6e 20 73 68 6f 75 6c 64 20  on chain should 
1bc0: 61 6c 77 61 79 73 20 62 65 20 76 65 72 79 20 63  always be very c
1bd0: 61 72 65 66 75 6c 6c 79 20 63 6f 6e 73 69 64 65  arefully conside
1be0: 72 65 64 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 61  red.</li>..<li>a
1bf0: 6c 6c 20 74 68 65 20 3c 62 3e 46 52 4f 4d 20 28  ll the <b>FROM (
1c00: 53 45 4c 45 43 54 20 2e 2e 2e 20 46 52 4f 4d 20  SELECT ... FROM 
1c10: 28 53 45 4c 45 43 54 20 2e 2e 2e 29 20 41 53 20  (SELECT ...) AS 
1c20: 67 31 29 20 41 53 20 67 32 3c 2f 62 3e 20 73 74  g1) AS g2</b> st
1c30: 75 66 66 20 73 69 6d 70 6c 79 20 69 73 20 61 20  uff simply is a 
1c40: 72 61 74 68 65 72 20 74 72 69 76 69 61 6c 20 53  rather trivial S
1c50: 51 4c 20 74 72 69 63 6b 20 62 61 73 65 64 20 6f  QL trick based o
1c60: 6e 20 74 77 6f 20 6e 65 73 74 65 64 20 73 75 62  n two nested sub
1c70: 2d 71 75 65 72 69 65 73 2e 3c 62 72 3e 0d 0a 69  -queries.<br>..i
1c80: 74 27 73 20 69 6e 64 65 6e 74 65 64 20 73 63 6f  t's indented sco
1c90: 70 65 20 73 69 6d 70 6c 79 20 69 73 20 61 76 6f  pe simply is avo
1ca0: 69 64 69 6e 67 20 74 6f 20 63 61 6c 6c 20 74 6f  iding to call to
1cb0: 6f 20 6d 61 6e 79 20 74 69 6d 65 73 20 53 54 5f  o many times ST_
1cc0: 43 65 6e 74 72 6f 69 64 28 29 2c 20 53 54 5f 58  Centroid(), ST_X
1cd0: 28 29 20 61 6e 64 20 53 54 5f 59 28 29 20 69 6e  () and ST_Y() in
1ce0: 20 6f 72 64 65 72 20 74 6f 20 67 65 74 20 74 68   order to get th
1cf0: 65 20 63 65 6e 74 72 6f 69 64 20 63 6f 6f 72 64  e centroid coord
1d00: 69 6e 61 74 65 73 2e 3c 2f 6c 69 3e 0d 0a 3c 2f  inates.</li>..</
1d10: 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e 0d 0a  ul>..</td><td>..
1d20: 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70 73 3a  <img src="https:
1d30: 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73 2e 69  //www.gaia-gis.i
1d40: 74 2f 67 61 69 61 2d 73 69 6e 73 2f 61 66 66 69  t/gaia-sins/affi
1d50: 6e 65 2d 70 69 63 73 2f 73 69 63 69 6c 79 5f 32  ne-pics/sicily_2
1d60: 2e 70 6e 67 22 20 61 6c 74 3d 22 73 69 63 69 6c  .png" alt="sicil
1d70: 69 61 2d 32 22 20 62 6f 72 64 65 72 3d 22 31 22  ia-2" border="1"
1d80: 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  >..</td></tr>..<
1d90: 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 53 74 65  tr><td>..<h3>Ste
1da0: 70 20 23 33 3a 20 69 6e 66 6c 61 74 69 6e 67 20  p #3: inflating 
1db0: 61 6e 64 20 72 65 73 68 61 70 69 6e 67 20 53 69  and reshaping Si
1dc0: 63 69 6c 79 3c 2f 68 33 3e 0d 0a 41 6e 20 69 6e  cily</h3>..An in
1dd0: 63 72 65 61 73 65 64 20 73 75 72 66 61 63 65 20  creased surface 
1de0: 69 73 20 73 75 72 65 6c 79 20 77 65 6c 63 6f 6d  is surely welcom
1df0: 65 2c 20 62 65 63 61 75 73 65 20 69 74 20 61 75  e, because it au
1e00: 74 6f 6d 61 74 69 63 61 6c 6c 79 20 69 6d 70 6c  tomatically impl
1e10: 69 65 73 20 6d 6f 72 65 20 61 67 72 69 63 75 6c  ies more agricul
1e20: 74 75 72 61 6c 20 6c 61 6e 64 73 3a 20 6f 6e 20  tural lands: on 
1e30: 74 68 65 20 6f 74 68 65 72 20 68 61 6e 64 20 73  the other hand s
1e40: 68 6f 72 74 65 6e 69 6e 67 20 61 20 6c 69 74 74  hortening a litt
1e50: 6c 65 20 62 69 74 20 74 68 65 20 6c 65 6e 67 74  le bit the lengt
1e60: 68 20 6f 66 20 74 68 65 20 73 6f 75 74 68 65 72  h of the souther
1e70: 6e 20 63 6f 61 73 74 6c 69 6e 65 20 77 69 6c 6c  n coastline will
1e80: 20 73 75 72 65 6c 79 20 66 61 63 69 6c 69 74 61   surely facilita
1e90: 74 65 20 6d 6f 62 69 6c 69 74 79 20 61 6e 64 20  te mobility and 
1ea0: 63 6f 6d 6d 75 6e 69 63 61 74 69 6f 6e 73 2e 3c  communications.<
1eb0: 62 72 3e 0d 0a 53 6f 20 77 65 27 6c 6c 20 6e 6f  br>..So we'll no
1ec0: 77 20 61 70 70 6c 79 20 61 20 3c 61 20 68 72 65  w apply a <a hre
1ed0: 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69 6b  f="http://en.wik
1ee0: 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69 2f  ipedia.org/wiki/
1ef0: 53 63 61 6c 69 6e 67 5f 25 32 38 67 65 6f 6d 65  Scaling_%28geome
1f00: 74 72 79 25 32 39 22 3e 73 63 61 6c 69 6e 67 3c  try%29">scaling<
1f10: 2f 61 3e 20 74 72 61 6e 73 66 6f 72 6d 61 74 69  /a> transformati
1f20: 6f 6e 20 75 73 69 6e 67 20 74 77 6f 20 64 69 66  on using two dif
1f30: 66 65 72 65 6e 74 20 76 61 6c 75 65 73 3a 20 3c  ferent values: <
1f40: 62 3e 73 78 3d 30 2e 39 3c 2f 62 3e 20 61 6e 64  b>sx=0.9</b> and
1f50: 20 3c 62 3e 73 79 3d 31 2e 33 3c 2f 62 3e 2e 3c   <b>sy=1.3</b>.<
1f60: 62 72 3e 0d 0a 4f 6e 63 65 20 61 67 61 69 6e 2c  br>..Once again,
1f70: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72   Affine Transfor
1f80: 6d 61 74 69 6f 6e 73 20 65 6e 61 62 6c 65 20 75  mations enable u
1f90: 73 20 74 6f 20 63 6f 6d 62 69 6e 65 20 61 6c 74  s to combine alt
1fa0: 6f 67 65 74 68 65 72 20 62 6f 74 68 20 74 72 61  ogether both tra
1fb0: 6e 73 6c 61 74 65 2c 20 72 6f 74 61 74 65 20 61  nslate, rotate a
1fc0: 6e 64 20 73 63 61 6c 65 20 69 6e 74 6f 20 61 20  nd scale into a 
1fd0: 73 69 6e 67 6c 65 20 74 72 61 6e 73 66 6f 72 6d  single transform
1fe0: 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 54 68 69 73  ation.<br>..This
1ff0: 20 69 73 20 74 68 65 20 63 6f 72 72 65 73 70 6f   is the correspo
2000: 6e 64 69 6e 67 20 53 51 4c 20 73 74 61 74 65 6d  nding SQL statem
2010: 65 6e 74 3a 0d 0a 3c 76 65 72 62 61 74 69 6d 3e  ent:..<verbatim>
2020: 0d 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 73  ..CREATE TABLE s
2030: 69 63 69 6c 69 61 5f 33 20 41 53 0d 0a 53 45 4c  icilia_3 AS..SEL
2040: 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 0d 0a 20  ECT cod_reg, .. 
2050: 20 20 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28    ATM_Transform(
2060: 67 65 6f 6d 65 74 72 79 2c 0d 0a 20 20 20 20 20  geometry,..     
2070: 20 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 2d   ATM_Translate(-
2080: 31 35 30 30 30 30 2c 20 31 35 30 30 30 30 2c 0d  150000, 150000,.
2090: 0a 20 20 20 20 20 20 20 20 20 41 54 4d 5f 54 72  .         ATM_Tr
20a0: 61 6e 73 6c 61 74 65 28 63 78 2c 20 63 79 2c 0d  anslate(cx, cy,.
20b0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 54 4d  .            ATM
20c0: 5f 53 63 61 6c 65 28 30 2e 39 2c 20 31 2e 33 2c  _Scale(0.9, 1.3,
20d0: 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20  ..              
20e0: 20 41 54 4d 5f 52 6f 74 61 74 65 28 32 35 2c 0d   ATM_Rotate(25,.
20f0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
2100: 20 20 20 41 54 4d 5f 43 72 65 61 74 65 54 72 61     ATM_CreateTra
2110: 6e 73 6c 61 74 65 28 2d 63 78 2c 20 2d 63 79 29  nslate(-cx, -cy)
2120: 29 29 29 29 29 20 41 53 20 67 65 6f 6d 0d 0a 46  ))))) AS geom..F
2130: 52 4f 4d 20 28 53 45 4c 45 43 54 20 63 6f 64 5f  ROM (SELECT cod_
2140: 72 65 67 2c 20 53 54 5f 58 28 63 65 6e 74 72 6f  reg, ST_X(centro
2150: 69 64 29 20 41 53 20 63 78 2c 20 53 54 5f 59 28  id) AS cx, ST_Y(
2160: 63 65 6e 74 72 6f 69 64 29 20 41 53 20 63 79 2c  centroid) AS cy,
2170: 20 67 65 6f 6d 65 74 72 79 0d 0a 20 20 20 20 20   geometry..     
2180: 20 46 52 4f 4d 20 28 53 45 4c 45 43 54 20 63 6f   FROM (SELECT co
2190: 64 5f 72 65 67 2c 20 53 54 5f 43 65 6e 74 72 6f  d_reg, ST_Centro
21a0: 69 64 28 67 65 6f 6d 65 74 72 79 29 20 41 53 20  id(geometry) AS 
21b0: 63 65 6e 74 72 6f 69 64 2c 20 67 65 6f 6d 65 74  centroid, geomet
21c0: 72 79 20 0d 0a 20 20 20 20 20 20 20 20 20 20 20  ry ..           
21d0: 20 46 52 4f 4d 20 73 69 63 69 6c 69 61 5f 30 29   FROM sicilia_0)
21e0: 20 41 53 20 67 31 0d 0a 29 20 41 53 20 67 32 3b   AS g1..) AS g2;
21f0: 0d 0a 53 45 4c 45 43 54 20 52 65 63 6f 76 65 72  ..SELECT Recover
2200: 47 65 6f 6d 65 74 72 79 43 6f 6c 75 6d 6e 28 27  GeometryColumn('
2210: 73 69 63 69 6c 69 61 5f 33 27 2c 20 27 67 65 6f  sicilia_3', 'geo
2220: 6d 27 2c 20 33 32 36 33 32 2c 20 27 4d 55 4c 54  m', 32632, 'MULT
2230: 49 50 4f 4c 59 47 4f 4e 27 2c 20 27 58 59 27 29  IPOLYGON', 'XY')
2240: 3b 0d 0a 3c 2f 76 65 72 62 61 74 69 6d 3e 20 0d  ;..</verbatim> .
2250: 0a 3c 62 3e 52 65 6d 61 72 6b 73 3c 2f 62 3e 3a  .<b>Remarks</b>:
2260: 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 74 68 65 72  ..<ul>..<li>ther
2270: 65 20 69 73 20 6e 6f 74 68 69 6e 67 20 72 65 61  e is nothing rea
2280: 6c 6c 79 20 6e 65 77 20 69 6e 20 74 68 69 73 3a  lly new in this:
2290: 20 77 65 27 6c 6c 20 73 69 6d 70 6c 79 20 63 68   we'll simply ch
22a0: 61 69 6e 20 79 65 74 20 61 6e 6f 74 68 65 72 20  ain yet another 
22b0: 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 69  transformation i
22c0: 6e 20 74 68 65 20 61 70 70 72 6f 70 72 69 61 74  n the appropriat
22d0: 65 20 73 65 71 75 65 6e 63 65 20 6f 72 64 65 72  e sequence order
22e0: 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 41  .</li>..<li><b>A
22f0: 54 4d 5f 53 63 61 6c 65 28 73 78 2c 20 73 79 29  TM_Scale(sx, sy)
2300: 3c 2f 62 3e 20 69 73 20 69 6e 74 65 6e 64 65 64  </b> is intended
2310: 20 66 6f 72 20 74 68 65 20 73 69 6d 70 6c 65 72   for the simpler
2320: 20 3c 62 3e 32 44 3c 2f 62 3e 20 63 61 73 65 2e   <b>2D</b> case.
2330: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 69 6e 20 74 68  </li>..<li>in th
2340: 65 20 6d 6f 72 65 20 67 65 6e 65 72 61 6c 20 3c  e more general <
2350: 62 3e 33 44 3c 2f 62 3e 20 63 61 73 65 20 79 6f  b>3D</b> case yo
2360: 75 20 63 61 6e 20 69 6e 76 6f 6b 65 20 3c 62 3e  u can invoke <b>
2370: 41 54 4d 5f 53 63 61 6c 65 28 73 78 2c 20 73 79  ATM_Scale(sx, sy
2380: 2c 20 73 7a 29 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a  , sz)</b></li>..
2390: 3c 2f 75 6c 3e 0d 0a 3c 2f 74 64 3e 3c 74 64 3e  </ul>..</td><td>
23a0: 0d 0a 3c 69 6d 67 20 73 72 63 3d 22 68 74 74 70  ..<img src="http
23b0: 73 3a 2f 2f 77 77 77 2e 67 61 69 61 2d 67 69 73  s://www.gaia-gis
23c0: 2e 69 74 2f 67 61 69 61 2d 73 69 6e 73 2f 61 66  .it/gaia-sins/af
23d0: 66 69 6e 65 2d 70 69 63 73 2f 73 69 63 69 6c 79  fine-pics/sicily
23e0: 5f 33 2e 70 6e 67 22 20 61 6c 74 3d 22 73 69 63  _3.png" alt="sic
23f0: 69 6c 69 61 2d 33 22 20 62 6f 72 64 65 72 3d 22  ilia-3" border="
2400: 31 22 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  1">..</td></tr>.
2410: 0a 3c 74 72 3e 3c 74 64 3e 0d 0a 3c 68 33 3e 53  .<tr><td>..<h3>S
2420: 74 65 70 20 23 34 3a 20 66 69 6e 61 6c 20 74 6f  tep #4: final to
2430: 75 63 68 3a 20 72 65 66 6c 65 63 74 69 6e 67 20  uch: reflecting 
2440: 53 69 63 69 6c 79 3c 2f 68 33 3e 0d 0a 41 20 72  Sicily</h3>..A r
2450: 65 66 6c 65 63 74 65 64 20 53 69 63 69 6c 79 20  eflected Sicily 
2460: 70 72 65 73 65 6e 74 73 20 6d 61 6e 79 20 69 6e  presents many in
2470: 74 65 72 65 73 74 69 6e 67 20 61 64 76 61 6e 74  teresting advant
2480: 61 67 65 73 3a 20 77 65 27 6c 6c 20 65 78 61 6d  ages: we'll exam
2490: 69 6e 65 20 61 6c 6c 20 74 68 65 6d 20 69 6e 20  ine all them in 
24a0: 66 75 6c 6c 20 64 65 74 61 69 6c 20 69 6e 20 74  full detail in t
24b0: 68 65 20 66 69 6e 61 6c 20 63 6f 6e 63 6c 75 73  he final conclus
24c0: 69 6f 6e 73 20 6f 66 20 74 68 65 20 70 72 65 73  ions of the pres
24d0: 65 6e 74 20 73 74 75 64 79 2e 3c 62 72 3e 0d 0a  ent study.<br>..
24e0: 53 6f 20 77 65 27 6c 6c 20 6e 6f 77 20 61 70 70  So we'll now app
24f0: 6c 79 20 61 20 66 69 6e 61 6c 20 3c 61 20 68 72  ly a final <a hr
2500: 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e 2e 77 69  ef="http://en.wi
2510: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69  kipedia.org/wiki
2520: 2f 52 65 66 6c 65 63 74 69 6f 6e 5f 25 32 38 6d  /Reflection_%28m
2530: 61 74 68 65 6d 61 74 69 63 73 25 32 39 22 3e 72  athematics%29">r
2540: 65 66 6c 65 63 74 69 6f 6e 3c 2f 61 3e 20 74 72  eflection</a> tr
2550: 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3b 20 74 68  ansformation; th
2560: 69 73 20 73 69 6d 70 6c 79 20 63 6f 72 72 65 73  is simply corres
2570: 70 6f 6e 64 73 20 74 6f 20 61 20 3c 62 3e 31 38  ponds to a <b>18
2580: 30 20 64 65 67 72 65 65 73 3c 2f 62 3e 20 72 6f  0 degrees</b> ro
2590: 74 61 74 69 6f 6e 20 61 72 6f 75 6e 64 20 74 68  tation around th
25a0: 65 20 3c 62 3e 59 20 61 78 69 73 3c 2f 62 3e 2e  e <b>Y axis</b>.
25b0: 3c 62 72 3e 0d 0a 41 6e 64 20 74 68 65 20 66 6f  <br>..And the fo
25c0: 6c 6c 6f 77 69 6e 67 20 69 73 20 74 68 65 20 66  llowing is the f
25d0: 69 6e 61 6c 20 53 51 4c 20 73 74 61 74 65 6d 65  inal SQL stateme
25e0: 6e 74 20 61 70 70 6c 79 69 6e 67 20 61 6c 6c 20  nt applying all 
25f0: 74 68 65 20 61 62 6f 76 65 20 74 72 61 6e 73 66  the above transf
2600: 6f 72 6d 61 74 69 6f 6e 73 20 69 6e 20 61 20 73  ormations in a s
2610: 69 6e 67 6c 65 20 73 68 6f 74 3a 0d 0a 3c 76 65  ingle shot:..<ve
2620: 72 62 61 74 69 6d 3e 43 52 45 41 54 45 20 54 41  rbatim>CREATE TA
2630: 42 4c 45 20 73 69 63 69 6c 69 61 5f 32 20 41 53  BLE sicilia_2 AS
2640: 0d 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 73  ..CREATE TABLE s
2650: 69 63 69 6c 69 61 5f 34 20 41 53 0d 0a 53 45 4c  icilia_4 AS..SEL
2660: 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 0d 0a 20  ECT cod_reg, .. 
2670: 20 20 41 54 4d 5f 54 72 61 6e 73 66 6f 72 6d 28    ATM_Transform(
2680: 67 65 6f 6d 65 74 72 79 2c 0d 0a 20 20 20 20 20  geometry,..     
2690: 20 41 54 4d 5f 54 72 61 6e 73 6c 61 74 65 28 2d   ATM_Translate(-
26a0: 31 35 30 30 30 30 2c 20 31 35 30 30 30 30 2c 0d  150000, 150000,.
26b0: 0a 20 20 20 20 20 20 20 20 20 41 54 4d 5f 54 72  .         ATM_Tr
26c0: 61 6e 73 6c 61 74 65 28 63 78 2c 20 63 79 2c 0d  anslate(cx, cy,.
26d0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 41 54 4d  .            ATM
26e0: 5f 59 52 6f 6c 6c 28 31 38 30 2c 0d 0a 20 20 20  _YRoll(180,..   
26f0: 20 20 20 20 20 20 20 20 20 20 20 20 41 54 4d 5f              ATM_
2700: 53 63 61 6c 65 28 30 2e 39 2c 20 31 2e 33 2c 0d  Scale(0.9, 1.3,.
2710: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  .               
2720: 20 20 20 41 54 4d 5f 52 6f 74 61 74 65 28 32 35     ATM_Rotate(25
2730: 2c 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20  ,..             
2740: 20 20 20 20 20 20 20 20 41 54 4d 5f 43 72 65 61          ATM_Crea
2750: 74 65 54 72 61 6e 73 6c 61 74 65 28 2d 63 78 2c  teTranslate(-cx,
2760: 20 2d 63 79 29 29 29 29 29 29 29 20 41 53 20 67   -cy))))))) AS g
2770: 65 6f 6d 0d 0a 46 52 4f 4d 20 28 53 45 4c 45 43  eom..FROM (SELEC
2780: 54 20 63 6f 64 5f 72 65 67 2c 20 53 54 5f 58 28  T cod_reg, ST_X(
2790: 63 65 6e 74 72 6f 69 64 29 20 41 53 20 63 78 2c  centroid) AS cx,
27a0: 20 53 54 5f 59 28 63 65 6e 74 72 6f 69 64 29 20   ST_Y(centroid) 
27b0: 41 53 20 63 79 2c 20 67 65 6f 6d 65 74 72 79 0d  AS cy, geometry.
27c0: 0a 20 20 20 20 20 20 46 52 4f 4d 20 28 53 45 4c  .      FROM (SEL
27d0: 45 43 54 20 63 6f 64 5f 72 65 67 2c 20 53 54 5f  ECT cod_reg, ST_
27e0: 43 65 6e 74 72 6f 69 64 28 67 65 6f 6d 65 74 72  Centroid(geometr
27f0: 79 29 20 41 53 20 63 65 6e 74 72 6f 69 64 2c 20  y) AS centroid, 
2800: 67 65 6f 6d 65 74 72 79 20 0d 0a 20 20 20 20 20  geometry ..     
2810: 20 20 20 20 20 20 20 46 52 4f 4d 20 73 69 63 69         FROM sici
2820: 6c 69 61 5f 30 29 20 41 53 20 67 31 0d 0a 29 20  lia_0) AS g1..) 
2830: 41 53 20 67 32 3b 0d 0a 53 45 4c 45 43 54 20 52  AS g2;..SELECT R
2840: 65 63 6f 76 65 72 47 65 6f 6d 65 74 72 79 43 6f  ecoverGeometryCo
2850: 6c 75 6d 6e 28 27 73 69 63 69 6c 69 61 5f 34 27  lumn('sicilia_4'
2860: 2c 20 27 67 65 6f 6d 27 2c 20 33 32 36 33 32 2c  , 'geom', 32632,
2870: 20 27 4d 55 4c 54 49 50 4f 4c 59 47 4f 4e 27 2c   'MULTIPOLYGON',
2880: 20 27 58 59 27 29 3b 0d 0a 3c 2f 76 65 72 62 61   'XY');..</verba
2890: 74 69 6d 3e 20 0d 0a 3c 62 3e 52 65 6d 61 72 6b  tim> ..<b>Remark
28a0: 73 3c 2f 62 3e 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c  s</b>:..<ul>..<l
28b0: 69 3e 74 68 65 72 65 20 61 72 65 20 73 65 76 65  i>there are seve
28c0: 72 61 6c 20 70 6f 73 73 69 62 6c 65 20 72 6f 74  ral possible rot
28d0: 61 74 69 6f 6e 73 20 73 75 70 70 6f 72 74 65 64  ations supported
28e0: 20 62 79 20 41 66 66 69 6e 65 20 54 72 61 6e 73   by Affine Trans
28f0: 66 6f 72 6d 61 74 69 6f 6e 3a 0d 0a 3c 6f 6c 3e  formation:..<ol>
2900: 0d 0a 3c 6c 69 3e 3c 62 3e 41 54 4d 5f 52 6f 74  ..<li><b>ATM_Rot
2910: 61 74 65 28 29 3c 2f 62 3e 20 61 6c 77 61 79 73  ate()</b> always
2920: 20 69 6e 74 65 6e 64 73 20 61 20 3c 62 3e 32 44   intends a <b>2D
2930: 3c 2f 62 3e 20 72 6f 74 61 74 69 6f 6e 2c 20 69  </b> rotation, i
2940: 2e 65 2e 20 61 20 72 6f 74 61 74 69 6f 6e 20 63  .e. a rotation c
2950: 65 6e 74 65 72 65 64 20 61 72 6f 75 6e 64 20 74  entered around t
2960: 68 65 20 3c 62 3e 5a 20 61 78 69 73 3c 2f 62 3e  he <b>Z axis</b>
2970: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 49 6e 20 74 68  </li>..<li>In th
2980: 65 20 6d 6f 72 65 20 67 65 6e 65 72 61 6c 20 3c  e more general <
2990: 62 3e 33 44 3c 2f 62 3e 20 63 61 73 65 20 74 68  b>3D</b> case th
29a0: 65 72 65 20 61 72 65 20 74 68 72 65 65 20 70 6f  ere are three po
29b0: 73 73 69 62 6c 65 20 72 6f 74 61 74 69 6f 6e 73  ssible rotations
29c0: 2c 20 6f 6e 65 20 66 6f 72 20 65 61 63 68 20 61  , one for each a
29d0: 78 69 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 74  xis.</li>..<li>t
29e0: 68 65 20 63 6f 72 72 65 73 70 6f 6e 64 69 6e 67  he corresponding
29f0: 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e 73 20 61   SQL functions a
2a00: 72 65 3a 20 3c 62 3e 41 54 4d 5f 58 52 6f 6c 6c  re: <b>ATM_XRoll
2a10: 28 61 6e 67 6c 65 29 3c 2f 62 3e 2c 20 3c 62 3e  (angle)</b>, <b>
2a20: 41 54 4d 5f 59 52 6f 6c 6c 28 61 6e 67 6c 65 29  ATM_YRoll(angle)
2a30: 3c 2f 62 3e 20 61 6e 64 20 3c 62 3e 41 54 4d 5f  </b> and <b>ATM_
2a40: 5a 52 6f 6c 6c 28 61 6e 67 6c 65 29 3c 2f 62 3e  ZRoll(angle)</b>
2a50: 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 69 3e 3c 75  </li>..<li><i><u
2a60: 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 41 54 4d 5f 5a  >Note</u>: ATM_Z
2a70: 52 6f 6c 6c 28 29 20 61 6e 64 20 41 54 4d 5f 52  Roll() and ATM_R
2a80: 6f 74 61 74 65 28 29 20 73 69 6d 70 6c 79 20 61  otate() simply a
2a90: 72 65 20 74 77 6f 20 64 69 66 66 65 72 65 6e 74  re two different
2aa0: 20 61 6c 69 61 73 2d 6e 61 6d 65 73 20 66 6f 72   alias-names for
2ab0: 20 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74 69   the same identi
2ac0: 63 61 6c 20 53 51 4c 20 66 75 6e 63 74 69 6f 6e  cal SQL function
2ad0: 3c 2f 69 3e 2e 3c 2f 6c 69 3e 0d 0a 3c 2f 6f 6c  </i>.</li>..</ol
2ae0: 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 0d 0a 3c  ></li>..</ul>..<
2af0: 2f 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73  /td><td>..<img s
2b00: 72 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e  rc="https://www.
2b10: 67 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61  gaia-gis.it/gaia
2b20: 2d 73 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 63  -sins/affine-pic
2b30: 73 2f 73 69 63 69 6c 79 5f 34 2e 70 6e 67 22 20  s/sicily_4.png" 
2b40: 61 6c 74 3d 22 73 69 63 69 6c 69 61 2d 34 22 20  alt="sicilia-4" 
2b50: 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74  border="1">..</t
2b60: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
2b70: 3e 0d 0a 3c 68 33 3e 46 69 6e 61 6c 20 63 6f 6e  >..<h3>Final con
2b80: 73 69 64 65 72 61 74 69 6f 6e 73 20 61 6e 64 20  siderations and 
2b90: 63 6f 6e 63 6c 75 73 69 6f 6e 73 3c 2f 68 33 3e  conclusions</h3>
2ba0: 0d 0a 3c 6f 6c 3e 0d 0a 3c 6c 69 3e 3c 62 3e 41  ..<ol>..<li><b>A
2bb0: 67 72 69 63 75 6c 74 75 72 65 3c 2f 62 3e 3a 20  griculture</b>: 
2bc0: 61 66 74 65 72 20 69 74 73 20 72 65 6c 6f 63 61  after its reloca
2bd0: 74 69 6f 6e 20 53 69 63 69 6c 79 20 77 69 6c 6c  tion Sicily will
2be0: 20 67 61 69 6e 20 6d 75 63 68 20 6d 6f 72 65 20   gain much more 
2bf0: 61 67 72 69 63 75 6c 74 75 72 61 6c 20 6c 61 6e  agricultural lan
2c00: 64 20 61 6e 64 20 77 69 6c 6c 20 65 6e 6a 6f 79  d and will enjoy
2c10: 20 61 20 6d 6f 72 65 20 66 61 76 6f 75 72 61 62   a more favourab
2c20: 6c 65 20 63 6c 69 6d 61 74 65 3a 20 73 74 69 6c  le climate: stil
2c30: 6c 20 73 75 6e 6e 79 20 61 6e 64 20 77 61 72 6d  l sunny and warm
2c40: 20 62 75 74 20 6d 75 63 68 20 6c 65 73 73 20 61   but much less a
2c50: 72 69 64 2e 3c 62 72 3e 0d 0a 54 68 69 73 20 77  rid.<br>..This w
2c60: 69 6c 6c 20 63 65 72 74 61 69 6e 6c 79 20 73 75  ill certainly su
2c70: 73 74 61 69 6e 20 61 20 6e 6f 74 69 63 65 61 62  stain a noticeab
2c80: 6c 65 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 6f  le development o
2c90: 66 20 6d 61 6e 79 20 65 63 6f 6e 6f 6d 69 63 20  f many economic 
2ca0: 61 63 74 69 76 69 74 69 65 73 2e 3c 2f 6c 69 3e  activities.</li>
2cb0: 0d 0a 3c 6c 69 3e 3c 62 3e 54 72 61 6e 73 70 6f  ..<li><b>Transpo
2cc0: 72 74 61 74 69 6f 6e 20 73 79 73 74 65 6d 73 3c  rtation systems<
2cd0: 2f 62 3e 3a 20 74 68 65 20 73 75 67 67 65 73 74  /b>: the suggest
2ce0: 65 64 20 6e 65 77 20 6c 61 79 6f 75 74 20 66 6f  ed new layout fo
2cf0: 72 20 74 68 65 20 4c 6f 77 65 72 20 54 79 72 72  r the Lower Tyrr
2d00: 68 65 6e 69 61 6e 20 53 65 61 20 73 74 72 6f 6e  henian Sea stron
2d10: 67 6c 79 20 66 61 63 69 6c 69 74 61 74 65 73 20  gly facilitates 
2d20: 74 68 65 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20  the development 
2d30: 6f 66 20 6d 61 72 69 74 69 6d 65 20 74 72 61 6e  of maritime tran
2d40: 73 70 6f 72 74 73 2e 20 53 69 63 69 6c 79 20 63  sports. Sicily c
2d50: 6f 75 6c 64 20 6e 6f 77 20 62 65 63 6f 6d 65 20  ould now become 
2d60: 74 68 65 20 63 65 6e 74 72 61 6c 20 68 75 62 20  the central hub 
2d70: 6f 66 20 61 20 68 69 67 68 6c 79 20 65 66 66 69  of a highly effi
2d80: 63 69 65 6e 74 20 6e 65 74 77 6f 72 6b 20 6f 66  cient network of
2d90: 20 68 69 67 68 2d 73 70 65 65 64 20 61 6e 64 20   high-speed and 
2da0: 68 69 67 68 2d 66 72 65 71 75 65 6e 63 79 20 66  high-frequency f
2db0: 65 72 72 79 20 63 6f 6e 6e 65 63 74 69 6f 6e 73  erry connections
2dc0: 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69 3e 50 61 6c  :..<ul>..<li>Pal
2dd0: 65 72 6d 6f 20 77 69 6c 6c 20 6e 6f 77 20 64 69  ermo will now di
2de0: 72 65 63 74 6c 79 20 66 61 63 65 20 4e 61 70 6c  rectly face Napl
2df0: 65 73 3b 20 43 69 76 69 74 61 76 65 63 63 68 69  es; Civitavecchi
2e00: 61 20 28 52 6f 6d 65 29 20 73 65 65 6d 73 20 74  a (Rome) seems t
2e10: 6f 20 62 65 20 61 20 73 65 63 6f 6e 64 20 6f 62  o be a second ob
2e20: 76 69 6f 75 73 20 74 65 72 6d 69 6e 61 6c 20 66  vious terminal f
2e30: 6f 72 20 64 69 72 65 63 74 20 63 6f 6e 6e 65 63  or direct connec
2e40: 74 69 6f 6e 73 20 6c 65 61 64 69 6e 67 20 74 6f  tions leading to
2e50: 20 43 65 6e 74 72 61 6c 20 49 74 61 6c 79 2e 3c   Central Italy.<
2e60: 2f 6c 69 3e 0d 0a 3c 6c 69 3e 4d 65 73 73 69 6e  /li>..<li>Messin
2e70: 61 20 77 69 6c 6c 20 61 63 71 75 69 72 65 20 61  a will acquire a
2e80: 20 64 65 63 69 73 69 76 65 20 73 74 72 61 74 65   decisive strate
2e90: 67 69 63 20 72 6f 6c 65 2c 20 61 6e 64 20 77 69  gic role, and wi
2ea0: 6c 6c 20 62 65 63 6f 6d 65 20 74 68 65 20 74 65  ll become the te
2eb0: 72 6d 69 6e 61 6c 20 66 6f 72 20 66 65 72 72 79  rminal for ferry
2ec0: 20 63 6f 6e 6e 65 63 74 69 6f 6e 73 20 6c 65 61   connections lea
2ed0: 64 69 6e 67 20 74 6f 20 43 65 6e 74 72 61 6c 20  ding to Central 
2ee0: 61 6e 64 20 4e 6f 72 74 68 65 72 6e 20 49 74 61  and Northern Ita
2ef0: 6c 79 3a 20 43 69 76 69 74 61 76 65 63 63 68 69  ly: Civitavecchi
2f00: 61 2c 20 4c 65 67 68 6f 72 6e 20 61 6e 64 20 47  a, Leghorn and G
2f10: 65 6e 6f 61 20 61 72 65 20 74 68 65 20 6f 62 76  enoa are the obv
2f20: 69 6f 75 73 20 64 65 73 74 69 6e 61 74 69 6f 6e  ious destination
2f30: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 41 20 6c  s.</li>..<li>A l
2f40: 65 73 73 20 72 65 6c 65 76 61 6e 74 20 28 62 75  ess relevant (bu
2f50: 74 20 61 6e 79 77 61 79 20 69 6e 74 65 72 65 73  t anyway interes
2f60: 74 69 6e 67 29 20 66 65 72 72 79 20 6c 69 6e 6b  ting) ferry link
2f70: 20 77 69 6c 6c 20 6a 6f 69 6e 20 54 72 61 70 61   will join Trapa
2f80: 6e 69 20 61 6e 64 20 52 65 67 67 69 6f 20 43 61  ni and Reggio Ca
2f90: 6c 61 62 72 69 61 2e 3c 2f 6c 69 3e 0d 0a 3c 6c  labria.</li>..<l
2fa0: 69 3e 53 61 72 64 69 6e 69 61 20 77 69 6c 6c 20  i>Sardinia will 
2fb0: 73 74 72 6f 6e 67 6c 79 20 62 65 6e 65 66 69 74  strongly benefit
2fc0: 20 66 72 6f 6d 20 74 68 65 20 6e 65 77 20 6c 61   from the new la
2fd0: 79 6f 75 74 3b 20 43 61 67 6c 69 61 72 69 20 77  yout; Cagliari w
2fe0: 69 6c 6c 20 62 65 20 64 69 72 65 63 74 6c 79 20  ill be directly 
2ff0: 63 6f 6e 6e 65 63 74 65 64 20 74 6f 20 53 79 72  connected to Syr
3000: 61 63 75 73 65 20 28 6f 72 20 6d 61 79 20 62 65  acuse (or may be
3010: 20 41 75 67 75 73 74 61 29 2c 20 61 6e 64 20 4f   Augusta), and O
3020: 6c 62 69 61 20 74 6f 20 4d 65 73 73 69 6e 61 2e  lbia to Messina.
3030: 3c 62 72 3e 54 68 69 73 20 6d 65 61 6e 73 20 64  <br>This means d
3040: 65 66 69 6e 69 74 65 6c 79 20 62 72 65 61 6b 69  efinitely breaki
3050: 6e 67 20 74 68 65 20 73 65 63 75 6c 61 72 20 69  ng the secular i
3060: 6e 73 75 6c 61 74 69 6f 6e 20 6f 66 20 53 61 72  nsulation of Sar
3070: 64 69 6e 69 61 2c 20 74 68 61 74 20 77 69 6c 6c  dinia, that will
3080: 20 6e 6f 77 20 73 74 61 72 74 20 65 6e 6a 6f 79   now start enjoy
3090: 69 6e 67 20 61 20 73 74 72 6f 6e 67 65 72 20 61  ing a stronger a
30a0: 6e 64 20 6d 6f 72 65 20 65 66 66 65 63 74 69 76  nd more effectiv
30b0: 65 20 69 6e 74 65 67 72 61 74 69 6f 6e 20 77 69  e integration wi
30c0: 74 68 20 53 6f 75 74 68 65 72 6e 20 49 74 61 6c  th Southern Ital
30d0: 79 2e 3c 2f 6c 69 3e 20 0d 0a 3c 6c 69 3e 4c 61  y.</li> ..<li>La
30e0: 73 74 20 62 75 74 20 6e 6f 74 20 6c 65 61 73 74  st but not least
30f0: 3a 20 61 74 20 61 20 6d 6f 72 65 20 73 74 72 61  : at a more stra
3100: 74 65 67 69 63 20 6c 65 76 65 6c 20 69 74 27 73  tegic level it's
3110: 20 61 62 73 6f 6c 75 74 65 6c 79 20 6f 62 76 69   absolutely obvi
3120: 6f 75 73 20 74 68 61 74 20 6e 6f 77 20 73 75 70  ous that now sup
3130: 65 72 74 61 6e 6b 65 72 73 2c 20 62 69 67 20 63  ertankers, big c
3140: 6f 6e 74 61 69 6e 65 72 20 73 68 69 70 73 20 61  ontainer ships a
3150: 6e 64 20 63 72 75 69 73 65 20 6c 69 6e 65 72 73  nd cruise liners
3160: 20 63 61 6e 20 66 72 65 65 6c 79 20 63 69 72 63   can freely circ
3170: 75 6d 6e 61 76 69 67 61 74 65 20 53 69 63 69 6c  umnavigate Sicil
3180: 79 20 69 6e 20 61 6e 79 20 64 69 72 65 63 74 69  y in any directi
3190: 6f 6e 20 75 6e 64 65 72 20 75 6e 63 6f 6d 70 72  on under uncompr
31a0: 6f 6d 69 73 65 64 20 73 61 66 65 74 79 20 63 6f  omised safety co
31b0: 6e 64 69 74 69 6f 6e 73 2e 3c 62 72 3e 0d 0a 41  nditions.<br>..A
31c0: 6e 64 20 63 6f 6e 73 65 71 75 65 6e 74 6c 79 20  nd consequently 
31d0: 61 6c 6c 20 54 79 72 72 68 65 6e 69 61 6e 20 68  all Tyrrhenian h
31e0: 61 72 62 6f 72 73 20 77 69 6c 6c 20 6e 6f 77 20  arbors will now 
31f0: 62 65 20 64 69 72 65 63 74 6c 79 20 63 6f 6e 6e  be directly conn
3200: 65 63 74 65 64 20 62 6f 74 68 20 74 6f 20 45 61  ected both to Ea
3210: 73 74 65 72 6e 20 61 6e 64 20 57 65 73 74 65 72  stern and Wester
3220: 6e 20 4d 65 64 69 74 65 72 72 61 6e 65 61 6e 3a  n Mediterranean:
3230: 20 74 68 69 73 20 77 69 6c 6c 20 73 75 72 65 6c   this will surel
3240: 79 20 69 6e 64 75 63 65 20 61 20 72 65 6d 61 72  y induce a remar
3250: 6b 61 62 6c 65 20 67 72 6f 77 74 68 20 69 6e 20  kable growth in 
3260: 74 68 65 20 76 6f 6c 75 6d 65 73 20 6f 66 20 69  the volumes of i
3270: 6e 74 65 72 6e 61 74 69 6f 6e 61 6c 20 74 72 61  nternational tra
3280: 66 66 69 63 73 20 74 68 65 79 20 63 6f 75 6c 64  ffics they could
3290: 20 70 6f 74 65 6e 74 69 61 6c 6c 79 20 61 74 74   potentially att
32a0: 72 61 63 74 2e 3c 2f 6c 69 3e 20 0d 0a 3c 2f 75  ract.</li> ..</u
32b0: 6c 3e 3c 2f 6c 69 3e 20 0d 0a 3c 6c 69 3e 3c 62  l></li> ..<li><b
32c0: 3e 48 65 61 76 79 20 69 6e 64 75 73 74 72 79 3c  >Heavy industry<
32d0: 2f 62 3e 3a 20 74 68 65 20 6e 65 77 20 74 72 61  /b>: the new tra
32e0: 6e 73 70 6f 72 74 61 74 69 6f 6e 20 73 79 73 74  nsportation syst
32f0: 65 6d 20 73 74 72 6f 6e 67 6c 79 20 63 65 6e 74  em strongly cent
3300: 65 72 65 64 20 61 72 6f 75 6e 64 20 6d 61 72 69  ered around mari
3310: 74 69 6d 65 20 63 6f 6d 6d 75 6e 69 63 61 74 69  time communicati
3320: 6f 6e 73 20 77 69 6c 6c 20 73 75 72 65 6c 79 20  ons will surely 
3330: 69 6e 64 75 63 65 20 61 6e 20 61 63 74 69 76 65  induce an active
3340: 20 72 65 62 69 72 74 68 20 6f 66 20 73 68 69 70   rebirth of ship
3350: 79 61 72 64 73 2c 20 61 20 66 6c 6f 75 72 69 73  yards, a flouris
3360: 68 69 6e 67 20 74 72 61 64 69 74 69 6f 6e 61 6c  hing traditional
3370: 20 65 78 63 65 6c 6c 65 6e 63 65 20 6f 66 20 6d   excellence of m
3380: 61 6e 79 20 73 6f 75 74 68 65 72 6e 20 72 65 67  any southern reg
3390: 69 6f 6e 73 20 69 6e 20 70 61 73 74 20 74 69 6d  ions in past tim
33a0: 65 73 20 62 75 74 20 6e 6f 77 61 64 61 79 73 20  es but nowadays 
33b0: 61 20 64 65 63 6c 69 6e 69 6e 67 20 61 63 74 69  a declining acti
33c0: 76 69 74 79 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e  vity.</li>..<li>
33d0: 3c 62 3e 54 6f 75 72 69 73 6d 3c 2f 62 3e 3a 20  <b>Tourism</b>: 
33e0: 61 20 72 65 61 72 72 61 6e 67 65 64 20 4c 6f 77  a rearranged Low
33f0: 65 72 20 54 79 72 72 68 65 6e 69 61 6e 20 53 65  er Tyrrhenian Se
3400: 61 20 77 69 6c 6c 20 63 65 72 74 61 69 6e 6c 79  a will certainly
3410: 20 70 72 6f 6d 6f 74 65 20 61 20 73 74 72 6f 6e   promote a stron
3420: 67 20 64 65 76 65 6c 6f 70 6d 65 6e 74 20 6f 66  g development of
3430: 20 69 6e 74 65 72 6e 61 74 69 6f 6e 61 6c 20 74   international t
3440: 6f 75 72 69 73 6d 2e 3c 62 72 3e 0d 0a 49 74 27  ourism.<br>..It'
3450: 73 20 77 6f 72 74 68 20 6e 6f 74 69 6e 67 20 74  s worth noting t
3460: 68 61 74 20 74 68 65 20 70 72 6f 70 6f 73 65 64  hat the proposed
3470: 20 6c 61 79 6f 75 74 20 77 69 6c 6c 20 67 69 76   layout will giv
3480: 65 20 62 69 72 74 68 20 74 6f 20 61 20 77 6f 6e  e birth to a won
3490: 64 65 72 66 75 6c 20 69 73 6c 61 6e 64 20 67 72  derful island gr
34a0: 6f 75 70 20 65 78 74 65 6e 64 69 6e 67 20 62 65  oup extending be
34b0: 74 77 65 65 6e 20 53 69 63 69 6c 79 20 61 6e 64  tween Sicily and
34c0: 20 73 6f 75 74 68 65 72 6e 20 4c 61 7a 69 6f 20   southern Lazio 
34d0: 2d 20 43 61 6d 70 61 6e 69 61 3b 20 74 68 65 20  - Campania; the 
34e0: 50 6f 6e 74 69 6e 65 2c 20 41 65 6f 6c 69 61 6e  Pontine, Aeolian
34f0: 20 61 6e 64 20 47 75 6c 66 20 6f 66 20 4e 61 70   and Gulf of Nap
3500: 6c 65 73 20 69 73 6c 61 6e 64 73 20 77 69 6c 6c  les islands will
3510: 20 62 65 20 70 72 61 63 74 69 63 61 6c 6c 79 20   be practically 
3520: 6d 65 72 67 65 64 20 69 6e 74 6f 20 61 20 73 69  merged into a si
3530: 6e 67 6c 65 20 61 72 63 68 69 70 65 6c 61 67 6f  ngle archipelago
3540: 2e 3c 62 72 3e 0d 0a 53 65 76 65 72 61 6c 20 6f  .<br>..Several o
3550: 66 20 74 68 65 73 65 20 69 73 6c 61 6e 64 73 20  f these islands 
3560: 61 63 74 75 61 6c 6c 79 20 61 72 65 20 61 63 74  actually are act
3570: 69 76 65 20 76 6f 6c 63 61 6e 6f 65 73 2c 20 61  ive volcanoes, a
3580: 6e 64 20 74 68 65 20 6e 65 77 20 69 73 6c 61 6e  nd the new islan
3590: 64 20 63 68 61 69 6e 20 77 69 6c 6c 20 64 69 72  d chain will dir
35a0: 65 63 74 6c 79 20 6a 6f 69 6e 20 4d 6f 75 6e 74  ectly join Mount
35b0: 20 45 74 6e 61 20 61 6e 64 20 4d 6f 75 6e 74 20   Etna and Mount 
35c0: 56 65 73 75 76 69 75 73 2e 3c 62 72 3e 0d 0a 53  Vesuvius.<br>..S
35d0: 6f 20 74 68 69 73 20 61 72 65 61 20 77 69 6c 6c  o this area will
35e0: 20 72 65 70 72 65 73 65 6e 74 20 74 68 65 20 6d   represent the m
35f0: 6f 73 74 20 69 6d 70 72 65 73 73 69 76 65 20 76  ost impressive v
3600: 6f 6c 63 61 6e 69 63 20 66 69 65 6c 64 20 6f 66  olcanic field of
3610: 20 45 75 72 6f 70 65 20 61 6e 64 20 77 69 6c 6c   Europe and will
3620: 20 63 65 72 74 61 69 6e 6c 79 20 62 65 63 6f 6d   certainly becom
3630: 65 20 61 20 73 74 72 6f 6e 67 20 74 6f 75 72 69  e a strong touri
3640: 73 74 69 63 20 61 74 74 72 61 63 74 69 6f 6e 20  stic attraction 
3650: 74 68 61 6e 6b 73 20 74 6f 20 69 74 73 20 6e 69  thanks to its ni
3660: 63 65 6c 79 20 73 75 6e 6e 79 20 77 65 61 74 68  cely sunny weath
3670: 65 72 20 61 6e 64 20 70 6c 65 61 73 61 6e 74 20  er and pleasant 
3680: 63 6c 69 6d 61 74 65 2e 0d 0a 3c 2f 6c 69 3e 0d  climate...</li>.
3690: 0a 3c 6c 69 3e 3c 62 3e 49 6e 74 65 72 6e 61 6c  .<li><b>Internal
36a0: 20 63 6f 6d 6d 65 72 63 65 3c 2f 62 3e 3a 20 77   commerce</b>: w
36b0: 65 20 63 61 6e 20 65 61 73 69 6c 79 20 66 6f 72  e can easily for
36c0: 65 63 61 73 74 20 61 20 73 74 72 6f 6e 67 20 67  ecast a strong g
36d0: 72 6f 77 74 68 20 69 6e 20 76 6f 6c 75 6d 65 20  rowth in volume 
36e0: 6f 66 20 69 6e 74 65 72 6e 61 6c 20 65 78 63 68  of internal exch
36f0: 61 6e 67 65 73 20 74 68 61 6e 6b 73 20 74 6f 20  anges thanks to 
3700: 74 68 65 20 62 65 74 74 65 72 20 63 6f 6e 6e 65  the better conne
3710: 63 74 69 76 69 74 79 20 62 61 73 65 64 20 6f 6e  ctivity based on
3720: 20 6d 61 72 69 74 69 6d 65 20 74 72 61 6e 73 70   maritime transp
3730: 6f 72 74 73 2e 3c 62 72 3e 20 0d 0a 4a 75 73 74  orts.<br> ..Just
3740: 20 61 20 73 69 6e 67 6c 65 20 65 78 61 6d 70 6c   a single exampl
3750: 65 3a 20 53 61 72 64 69 6e 69 61 20 73 68 6f 75  e: Sardinia shou
3760: 6c 64 20 6e 6f 77 20 62 65 20 61 62 6c 65 20 74  ld now be able t
3770: 6f 20 65 78 70 6f 72 74 20 69 74 73 20 66 69 6e  o export its fin
3780: 65 73 74 20 73 68 65 65 70 20 63 68 65 65 73 65  est sheep cheese
3790: 20 6f 6e 20 43 61 6c 61 62 72 69 61 6e 20 6d 61   on Calabrian ma
37a0: 72 6b 65 74 73 20 77 68 69 6c 73 74 20 43 61 6c  rkets whilst Cal
37b0: 61 62 72 69 61 20 63 6f 75 6c 64 20 66 72 65 65  abria could free
37c0: 6c 79 20 65 78 70 6f 72 74 20 69 74 73 20 72 65  ly export its re
37d0: 6e 6f 77 6e 20 72 65 64 20 68 6f 74 20 63 68 69  nown red hot chi
37e0: 6c 6c 79 20 70 65 70 70 65 72 73 20 74 6f 20 53  lly peppers to S
37f0: 61 72 64 69 6e 69 61 3b 20 6e 6f 74 20 6f 6e 6c  ardinia; not onl
3800: 79 20 62 6f 74 68 20 72 65 67 69 6f 6e 73 20 77  y both regions w
3810: 69 6c 6c 20 77 69 64 65 6c 79 20 62 65 66 69 74  ill widely befit
3820: 20 66 72 6f 6d 20 69 6e 63 72 65 61 73 65 64 20   from increased 
3830: 65 78 63 68 61 6e 67 65 20 76 6f 6c 75 6d 65 73  exchange volumes
3840: 2c 20 62 75 74 20 53 69 63 69 6c 79 20 61 73 20  , but Sicily as 
3850: 77 65 6c 6c 20 77 69 6c 6c 20 74 61 6b 65 20 70  well will take p
3860: 72 6f 66 69 74 20 66 72 6f 6d 20 66 6c 6f 75 72  rofit from flour
3870: 69 73 68 69 6e 67 20 6c 6f 67 69 73 74 69 63 20  ishing logistic 
3880: 61 6e 64 20 62 79 20 6f 74 68 65 72 20 63 6f 6d  and by other com
3890: 6d 65 72 63 69 61 6c 20 69 6e 74 65 72 6d 65 64  mercial intermed
38a0: 69 61 74 69 6f 6e 20 61 63 74 69 76 69 74 69 65  iation activitie
38b0: 73 2e 3c 2f 6c 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e  s.</li>..<li><b>
38c0: 50 72 61 63 74 69 63 61 6c 20 72 65 61 6c 69 7a  Practical realiz
38d0: 61 74 69 6f 6e 3c 2f 62 3e 3a 20 74 68 65 20 70  ation</b>: the p
38e0: 72 65 73 65 6e 74 20 73 74 75 64 79 20 63 6c 65  resent study cle
38f0: 61 72 6c 79 20 64 65 6d 6f 6e 73 74 72 61 74 65  arly demonstrate
3900: 73 20 74 68 61 74 20 74 68 65 72 65 20 61 72 65  s that there are
3910: 20 69 73 20 6e 6f 74 68 69 6e 67 20 69 6e 20 4d   is nothing in M
3920: 61 74 68 65 6d 61 74 69 63 73 2c 20 47 65 6f 6d  athematics, Geom
3930: 65 74 72 79 20 6f 72 20 47 65 6f 67 72 61 70 68  etry or Geograph
3940: 79 20 66 6f 72 62 69 64 64 69 6e 67 20 74 68 65  y forbidding the
3950: 20 70 72 61 63 74 69 63 61 6c 20 72 65 61 6c 69   practical reali
3960: 7a 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 73 75  zation of the su
3970: 67 67 65 73 74 65 64 20 69 64 65 61 2e 3c 62 72  ggested idea.<br
3980: 3e 0d 0a 55 6e 68 61 70 70 69 6c 79 20 74 68 65  >..Unhappily the
3990: 20 63 75 72 72 65 6e 74 20 73 74 61 74 65 20 6f   current state o
39a0: 66 20 74 68 65 20 61 72 74 20 69 6e 20 47 65 6f  f the art in Geo
39b0: 6c 6f 67 79 20 73 74 69 6c 6c 20 70 6f 73 65 73  logy still poses
39c0: 20 6d 61 6e 79 20 70 75 7a 7a 6c 69 6e 67 20 71   many puzzling q
39d0: 75 65 73 74 69 6f 6e 73 20 6e 6f 74 20 79 65 74  uestions not yet
39e0: 20 66 75 6c 6c 79 20 72 65 73 6f 6c 76 65 64 2e   fully resolved.
39f0: 3c 62 72 3e 0d 0a 41 6e 79 77 61 79 20 77 65 20  <br>..Anyway we 
3a00: 61 72 65 20 68 6f 70 65 66 75 6c 6c 79 20 65 78  are hopefully ex
3a10: 70 65 63 74 69 6e 67 20 74 68 61 74 20 66 75 74  pecting that fut
3a20: 75 72 65 20 61 64 76 61 6e 63 65 6d 65 6e 74 73  ure advancements
3a30: 20 69 6e 20 54 65 63 74 6f 6e 69 63 73 20 77 69   in Tectonics wi
3a40: 6c 6c 20 70 6f 73 73 69 62 6c 79 20 61 6c 6c 6f  ll possibly allo
3a50: 77 20 74 6f 20 6f 76 65 72 63 6f 6d 65 20 61 6e  w to overcome an
3a60: 79 20 72 65 6d 61 69 6e 69 6e 67 20 69 73 73 75  y remaining issu
3a70: 65 2e 20 4d 6f 72 65 20 73 70 65 63 69 66 69 63  e. More specific
3a80: 61 6c 6c 79 20 61 20 62 65 74 74 65 72 20 6b 6e  ally a better kn
3a90: 6f 77 6c 65 64 67 65 20 6f 66 20 69 6e 74 65 72  owledge of inter
3aa0: 61 63 74 69 6f 6e 73 20 62 65 74 77 65 65 6e 20  actions between 
3ab0: 74 68 65 20 63 72 75 73 74 20 61 6e 64 20 74 68  the crust and th
3ac0: 65 20 75 70 70 65 72 20 6d 61 6e 74 6c 65 20 61  e upper mantle a
3ad0: 6c 6f 6e 67 20 74 68 65 20 4d 6f 68 6f 20 61 6e  long the Moho an
3ae0: 64 20 61 20 64 65 65 70 65 72 20 63 6f 6d 70 72  d a deeper compr
3af0: 65 68 65 6e 73 69 6f 6e 20 6f 66 20 74 68 65 20  ehension of the 
3b00: 6d 69 63 72 6f 2d 70 6c 61 71 75 65 73 20 6d 65  micro-plaques me
3b10: 63 68 61 6e 69 63 73 20 77 69 6c 6c 20 63 65 72  chanics will cer
3b20: 74 61 69 6e 6c 79 20 68 65 6c 70 3b 20 77 65 20  tainly help; we 
3b30: 61 72 65 20 72 61 74 68 65 72 20 63 6f 6e 66 69  are rather confi
3b40: 64 65 6e 74 20 69 6e 20 66 75 74 75 72 65 20 72  dent in future r
3b50: 65 73 65 61 72 63 68 20 61 63 68 69 65 76 65 6d  esearch achievem
3b60: 65 6e 74 73 20 6f 6e 20 74 68 65 73 65 20 66 69  ents on these fi
3b70: 65 6c 64 73 2e 0d 0a 3c 2f 6f 6c 3e 0d 0a 3c 2f  elds...</ol>..</
3b80: 74 64 3e 3c 74 64 3e 0d 0a 3c 69 6d 67 20 73 72  td><td>..<img sr
3b90: 63 3d 22 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67  c="https://www.g
3ba0: 61 69 61 2d 67 69 73 2e 69 74 2f 67 61 69 61 2d  aia-gis.it/gaia-
3bb0: 73 69 6e 73 2f 61 66 66 69 6e 65 2d 70 69 63 73  sins/affine-pics
3bc0: 2f 69 74 61 6c 79 2d 32 2e 30 2e 70 6e 67 22 20  /italy-2.0.png" 
3bd0: 61 6c 74 3d 22 69 74 61 6c 79 2d 32 2e 30 22 20  alt="italy-2.0" 
3be0: 62 6f 72 64 65 72 3d 22 31 22 3e 0d 0a 3c 2f 74  border="1">..</t
3bf0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65  d></tr>..</table
3c00: 3e 3c 62 72 3e 3c 68 72 3e 0d 0a 3c 68 32 3e 42  ><br><hr>..<h2>B
3c10: 6f 72 69 6e 67 20 4d 61 74 68 3a 20 61 20 6d 6f  oring Math: a mo
3c20: 72 65 20 66 6f 72 6d 61 6c 20 70 72 65 73 65 6e  re formal presen
3c30: 74 61 74 69 6f 6e 3c 2f 68 32 3e 0d 0a 50 6c 61  tation</h2>..Pla
3c40: 79 74 69 6d 65 27 73 20 6f 76 65 72 3a 20 77 65  ytime's over: we
3c50: 27 6c 6c 20 6e 6f 77 20 73 74 61 72 74 20 61 20  'll now start a 
3c60: 6d 6f 73 74 20 73 65 72 69 6f 75 73 20 65 78 70  most serious exp
3c70: 6c 61 6e 61 74 69 6f 6e 2e 3c 62 72 3e 3c 62 72  lanation.<br><br
3c80: 3e 0d 0a 41 6e 20 41 66 66 69 6e 65 20 54 72 61  >..An Affine Tra
3c90: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 63 61 6e 20  nsformation can 
3ca0: 62 65 20 72 65 70 72 65 73 65 6e 74 65 64 20 69  be represented i
3cb0: 6e 20 74 68 65 20 66 6f 72 6d 20 6f 66 20 61 20  n the form of a 
3cc0: 73 71 75 61 72 65 20 6d 61 74 72 69 78 3b 20 74  square matrix; t
3cd0: 68 65 20 73 69 6d 70 6c 65 72 20 3c 62 3e 32 44  he simpler <b>2D
3ce0: 3c 2f 62 3e 20 63 61 73 65 20 72 65 71 75 69 72  </b> case requir
3cf0: 65 73 20 61 20 3c 62 3e 33 20 78 20 33 3c 2f 62  es a <b>3 x 3</b
3d00: 3e 20 6d 61 74 72 69 78 2c 20 61 6e 64 20 74 68  > matrix, and th
3d10: 65 20 66 6f 6c 6c 6f 77 69 6e 67 73 20 61 72 65  e followings are
3d20: 20 74 68 65 20 70 6f 73 73 69 62 6c 65 20 61 72   the possible ar
3d30: 72 61 6e 67 65 6d 65 6e 74 73 20 63 6f 72 72 65  rangements corre
3d40: 73 70 6f 6e 64 69 6e 67 20 74 6f 20 65 61 63 68  sponding to each
3d50: 20 65 6c 65 6d 65 6e 74 61 72 79 20 74 72 61 6e   elementary tran
3d60: 73 66 6f 72 6d 61 74 69 6f 6e 3a 3c 62 72 3e 3c  sformation:<br><
3d70: 62 72 3e 0d 0a 3c 74 61 62 6c 65 3e 0d 0a 3c 74  br>..<table>..<t
3d80: 72 3e 3c 74 64 20 72 6f 77 73 70 61 6e 3d 22 34  r><td rowspan="4
3d90: 22 20 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65  " valign="middle
3da0: 22 3e 47 65 6e 65 72 61 6c 20 6c 61 79 6f 75 74  ">General layout
3db0: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64  </td>..<td>/</td
3dc0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
3dd0: 65 72 22 3e 3c 62 3e 61 3c 2f 62 3e 3c 2f 74 64  er"><b>a</b></td
3de0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
3df0: 65 72 22 3e 3c 62 3e 62 3c 2f 62 3e 3c 2f 74 64  er"><b>b</b></td
3e00: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
3e10: 65 72 22 3e 3c 62 3e 78 6f 66 66 3c 2f 62 3e 3c  er"><b>xoff</b><
3e20: 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f  /td><td>\</td></
3e30: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f  tr>..<tr><td>|</
3e40: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
3e50: 6e 74 65 72 22 3e 3c 62 3e 64 3c 2f 62 3e 3c 2f  nter"><b>d</b></
3e60: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
3e70: 6e 74 65 72 22 3e 3c 62 3e 65 3c 2f 62 3e 3c 2f  nter"><b>e</b></
3e80: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
3e90: 6e 74 65 72 22 3e 3c 62 3e 79 6f 66 66 3c 2f 62  nter"><b>yoff</b
3ea0: 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e  ></td><td>|</td>
3eb0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c  </tr>..<tr><td>\
3ec0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
3ed0: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
3ee0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
3ef0: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >0</td><td align
3f00: 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e  ="center">1</td>
3f10: 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  <td>/</td></tr>.
3f20: 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e  .<tr><td colspan
3f30: 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f  ="5"><hr></td></
3f40: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77  tr>..<tr><td row
3f50: 73 70 61 6e 3d 22 34 22 20 76 61 6c 69 67 6e 3d  span="4" valign=
3f60: 22 6d 69 64 64 6c 65 22 3e 49 64 65 6e 74 69 74  "middle">Identit
3f70: 79 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74  y</td>..<td>/</t
3f80: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
3f90: 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 20 61  ter">1</td><td a
3fa0: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
3fb0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
3fc0: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
3fd0: 3e 5c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74  >\</td></tr>..<t
3fe0: 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20  r><td>|</td><td 
3ff0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
4000: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4010: 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74  center">1</td><t
4020: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
4030: 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64  >0</td><td>|</td
4040: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  ></tr>..<tr><td>
4050: 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  \</td><td align=
4060: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
4070: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
4080: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ">0</td><td alig
4090: 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64  n="center">1</td
40a0: 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e  ><td>/</td></tr>
40b0: 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61  ..<tr><td colspa
40c0: 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c  n="5"><hr></td><
40d0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f  /tr>..<tr><td ro
40e0: 77 73 70 61 6e 3d 22 34 22 20 76 61 6c 69 67 6e  wspan="4" valign
40f0: 3d 22 6d 69 64 64 6c 65 22 3e 54 72 61 6e 73 6c  ="middle">Transl
4100: 61 74 65 28 3c 62 3e 74 78 3c 2f 62 3e 2c 20 3c  ate(<b>tx</b>, <
4110: 62 3e 74 79 3c 2f 62 3e 29 26 6e 62 73 70 3b 26  b>ty</b>)&nbsp;&
4120: 6e 62 73 70 3b 26 6e 62 73 70 3b 3c 2f 74 64 3e  nbsp;&nbsp;</td>
4130: 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20  ..<td>/</td><td 
4140: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31  align="center">1
4150: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4160: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
4170: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
4180: 3e 3c 62 3e 74 78 3c 2f 62 3e 3c 2f 74 64 3e 3c  ><b>tx</b></td><
4190: 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>\</td></tr>..
41a0: 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74  <tr><td>|</td><t
41b0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
41c0: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >0</td><td align
41d0: 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e  ="center">1</td>
41e0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
41f0: 72 22 3e 3c 62 3e 74 79 3c 2f 62 3e 3c 2f 74 64  r"><b>ty</b></td
4200: 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e  ><td>|</td></tr>
4210: 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e  ..<tr><td>\</td>
4220: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
4230: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
4240: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
4250: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
4260: 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 3e 2f  ter">1</td><td>/
4270: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
4280: 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 22 35 22 3e  <td colspan="5">
4290: 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  <hr></td></tr>..
42a0: 3c 74 72 3e 3c 74 64 20 72 6f 77 73 70 61 6e 3d  <tr><td rowspan=
42b0: 22 34 22 20 76 61 6c 69 67 6e 3d 22 6d 69 64 64  "4" valign="midd
42c0: 6c 65 22 3e 53 63 61 6c 65 28 3c 62 3e 73 78 3c  le">Scale(<b>sx<
42d0: 2f 62 3e 2c 20 3c 62 3e 73 79 3c 2f 62 3e 29 3c  /b>, <b>sy</b>)<
42e0: 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e  /td>..<td>/</td>
42f0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
4300: 72 22 3e 3c 62 3e 73 78 3c 2f 62 3e 3c 2f 74 64  r"><b>sx</b></td
4310: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
4320: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c  er">0</td><td al
4330: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f  ign="center">0</
4340: 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74  td><td>\</td></t
4350: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74  r>..<tr><td>|</t
4360: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
4370: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
4380: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62  lign="center"><b
4390: 3e 73 79 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20  >sy</b></td><td 
43a0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
43b0: 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c  </td><td>|</td><
43c0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c  /tr>..<tr><td>\<
43d0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
43e0: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
43f0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
4400: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  0</td><td align=
4410: 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c  "center">1</td><
4420: 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>/</td></tr>..
4430: 3c 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d  <tr><td colspan=
4440: 22 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74  "5"><hr></td></t
4450: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73  r>..<tr><td rows
4460: 70 61 6e 3d 22 34 22 20 76 61 6c 69 67 6e 3d 22  pan="4" valign="
4470: 6d 69 64 64 6c 65 22 3e 52 6f 74 61 74 65 28 3c  middle">Rotate(<
4480: 62 3e 26 74 68 65 74 61 3b 3c 2f 62 3e 29 3c 2f  b>&theta;</b>)</
4490: 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e 3c  td>..<td>/</td><
44a0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
44b0: 22 3e 3c 62 3e 63 6f 73 28 26 74 68 65 74 61 3b  "><b>cos(&theta;
44c0: 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c  )</b></td><td al
44d0: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e  ign="center"><b>
44e0: 2d 73 69 6e 28 26 74 68 65 74 61 3b 29 3c 2f 62  -sin(&theta;)</b
44f0: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  ></td><td align=
4500: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
4510: 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>\</td></tr>..
4520: 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74  <tr><td>|</td><t
4530: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
4540: 3e 3c 62 3e 73 69 6e 28 26 74 68 65 74 61 3b 29  ><b>sin(&theta;)
4550: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  </b></td><td ali
4560: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 63  gn="center"><b>c
4570: 6f 73 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c  os(&theta;)</b><
4580: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
4590: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
45a0: 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74  >|</td></tr>..<t
45b0: 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20  r><td>\</td><td 
45c0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
45d0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
45e0: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
45f0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
4600: 3e 31 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64  >1</td><td>/</td
4610: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  ></tr>..<tr><td>
4620: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61  </td></tr>..</ta
4630: 62 6c 65 3e 3c 62 72 3e 0d 0a 41 20 3c 62 3e 33  ble><br>..A <b>3
4640: 44 3c 2f 62 3e 20 61 66 66 69 6e 65 20 74 72 61  D</b> affine tra
4650: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 72 65 71 75  nsformation requ
4660: 69 72 65 73 20 61 20 3c 62 3e 34 20 78 20 34 3c  ires a <b>4 x 4<
4670: 2f 62 3e 20 6d 61 74 72 69 78 2e 3c 62 72 3e 0d  /b> matrix.<br>.
4680: 0a 41 73 20 79 6f 75 20 63 61 6e 20 65 61 73 69  .As you can easi
4690: 6c 79 20 6e 6f 74 69 63 65 20 74 68 65 72 65 20  ly notice there 
46a0: 69 73 20 61 6e 20 6f 62 76 69 6f 75 73 20 64 69  is an obvious di
46b0: 72 65 63 74 20 72 65 6c 61 74 69 6f 6e 20 62 65  rect relation be
46c0: 74 77 65 65 6e 20 61 20 33 44 20 6d 61 74 72 69  tween a 3D matri
46d0: 78 20 61 6e 64 20 61 20 32 44 20 6d 61 74 72 69  x and a 2D matri
46e0: 78 3b 20 6e 6f 74 69 63 65 20 74 68 65 20 63 65  x; notice the ce
46f0: 6c 6c 73 20 73 68 6f 77 69 6e 67 20 61 20 67 72  lls showing a gr
4700: 61 79 20 62 61 63 6b 67 72 6f 75 6e 64 2e 3c 62  ay background.<b
4710: 72 3e 3c 62 72 3e 0d 0a 3c 74 61 62 6c 65 3e 0d  r><br>..<table>.
4720: 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73 70 61 6e  .<tr><td rowspan
4730: 3d 22 35 22 20 76 61 6c 69 67 6e 3d 22 6d 69 64  ="5" valign="mid
4740: 64 6c 65 22 3e 47 65 6e 65 72 61 6c 20 6c 61 79  dle">General lay
4750: 6f 75 74 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26  out&nbsp;&nbsp;&
4760: 6e 62 73 70 3b 3c 2f 74 64 3e 0d 0a 3c 74 64 3e  nbsp;</td>..<td>
4770: 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  /</td><td align=
4780: 22 63 65 6e 74 65 72 22 3e 3c 62 3e 61 3c 2f 62  "center"><b>a</b
4790: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  ></td><td align=
47a0: 22 63 65 6e 74 65 72 22 3e 3c 62 3e 62 3c 2f 62  "center"><b>b</b
47b0: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  ></td><td align=
47c0: 22 63 65 6e 74 65 72 22 20 62 67 63 6f 6c 6f 72  "center" bgcolor
47d0: 3d 22 23 64 30 64 30 64 30 22 3e 3c 62 3e 63 3c  ="#d0d0d0"><b>c<
47e0: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  /b></td><td alig
47f0: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 78 6f  n="center"><b>xo
4800: 66 66 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 5c  ff</b></td><td>\
4810: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
4820: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c  <td>|</td><td al
4830: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e  ign="center"><b>
4840: 64 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c  d</b></td><td al
4850: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e  ign="center"><b>
4860: 65 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c  e</b></td><td al
4870: 69 67 6e 3d 22 63 65 6e 74 65 72 22 20 62 67 63  ign="center" bgc
4880: 6f 6c 6f 72 3d 22 23 64 30 64 30 64 30 22 3e 3c  olor="#d0d0d0"><
4890: 62 3e 66 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20  b>f</b></td><td 
48a0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c  align="center"><
48b0: 62 3e 79 6f 66 66 3c 2f 62 3e 3c 2f 74 64 3e 3c  b>yoff</b></td><
48c0: 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>|</td></tr>..
48d0: 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74  <tr><td>|</td><t
48e0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
48f0: 20 62 67 63 6f 6c 6f 72 3d 22 23 64 30 64 30 64   bgcolor="#d0d0d
4900: 30 22 3e 3c 62 3e 67 3c 2f 62 3e 3c 2f 74 64 3e  0"><b>g</b></td>
4910: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
4920: 72 22 20 62 67 63 6f 6c 6f 72 3d 22 23 64 30 64  r" bgcolor="#d0d
4930: 30 64 30 22 3e 3c 62 3e 68 3c 2f 62 3e 3c 2f 74  0d0"><b>h</b></t
4940: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
4950: 74 65 72 22 20 62 67 63 6f 6c 6f 72 3d 22 23 64  ter" bgcolor="#d
4960: 30 64 30 64 30 22 3e 3c 62 3e 69 3c 2f 62 3e 3c  0d0d0"><b>i</b><
4970: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
4980: 65 6e 74 65 72 22 20 62 67 63 6f 6c 6f 72 3d 22  enter" bgcolor="
4990: 23 64 30 64 30 64 30 22 3e 3c 62 3e 7a 6f 66 66  #d0d0d0"><b>zoff
49a0: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f  </b></td><td>|</
49b0: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
49c0: 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  d>\</td><td alig
49d0: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
49e0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
49f0: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c  er">0</td><td al
4a00: 69 67 6e 3d 22 63 65 6e 74 65 72 22 20 62 67 63  ign="center" bgc
4a10: 6f 6c 6f 72 3d 22 23 64 30 64 30 64 30 22 3e 30  olor="#d0d0d0">0
4a20: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4a30: 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74  center">1</td><t
4a40: 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  d>/</td></tr>..<
4a50: 74 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 22  tr><td colspan="
4a60: 35 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74 72  5"><hr></td></tr
4a70: 3e 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73 70  >..<tr><td rowsp
4a80: 61 6e 3d 22 35 22 20 76 61 6c 69 67 6e 3d 22 6d  an="5" valign="m
4a90: 69 64 64 6c 65 22 3e 49 64 65 6e 74 69 74 79 3c  iddle">Identity<
4aa0: 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e  /td>..<td>/</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 31 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">1</td><td ali
4ad0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
4ae0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
4af0: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
4b00: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
4b10: 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f  /td><td>\</td></
4b20: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f  tr>..<tr><td>|</
4b30: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
4b40: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20  nter">0</td><td 
4b50: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31  align="center">1
4b60: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4b70: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
4b80: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
4b90: 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64  >0</td><td>|</td
4ba0: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  ></tr>..<tr><td>
4bb0: 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  \</td><td align=
4bc0: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
4bd0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
4be0: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ">0</td><td alig
4bf0: 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64  n="center">1</td
4c00: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
4c10: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 2f 3c  er">0</td><td>/<
4c20: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
4c30: 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  td>\</td><td ali
4c40: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
4c50: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
4c60: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
4c70: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
4c80: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
4c90: 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64  enter">1</td><td
4ca0: 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74  >/</td></tr>..<t
4cb0: 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 22 35  r><td colspan="5
4cc0: 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74 72 3e  "><hr></td></tr>
4cd0: 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73 70 61  ..<tr><td rowspa
4ce0: 6e 3d 22 35 22 20 76 61 6c 69 67 6e 3d 22 6d 69  n="5" valign="mi
4cf0: 64 64 6c 65 22 3e 54 72 61 6e 73 6c 61 74 65 28  ddle">Translate(
4d00: 3c 62 3e 74 78 3c 2f 62 3e 2c 20 3c 62 3e 74 79  <b>tx</b>, <b>ty
4d10: 3c 2f 62 3e 2c 20 3c 62 3e 74 7a 3c 2f 62 3e 29  </b>, <b>tz</b>)
4d20: 26 6e 62 73 70 3b 26 6e 62 73 70 3b 26 6e 62 73  &nbsp;&nbsp;&nbs
4d30: 70 3b 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f  p;</td>..<td>/</
4d40: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
4d50: 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 20  nter">1</td><td 
4d60: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
4d70: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
4d80: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
4d90: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
4da0: 3e 3c 62 3e 74 78 3c 2f 62 3e 3c 2f 74 64 3e 3c  ><b>tx</b></td><
4db0: 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>\</td></tr>..
4dc0: 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74  <tr><td>|</td><t
4dd0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
4de0: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >0</td><td align
4df0: 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e  ="center">1</td>
4e00: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
4e10: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
4e20: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 74  gn="center"><b>t
4e30: 79 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c  y</b></td><td>|<
4e40: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
4e50: 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  td>|</td><td ali
4e60: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
4e70: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
4e80: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
4e90: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c  lign="center">1<
4ea0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
4eb0: 65 6e 74 65 72 22 3e 3c 62 3e 74 7a 3c 2f 62 3e  enter"><b>tz</b>
4ec0: 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c  </td><td>|</td><
4ed0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c  /tr>..<tr><td>\<
4ee0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
4ef0: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
4f00: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
4f10: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  0</td><td align=
4f20: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
4f30: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
4f40: 22 3e 31 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74  ">1</td><td>/</t
4f50: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
4f60: 20 63 6f 6c 73 70 61 6e 3d 22 35 22 3e 3c 68 72   colspan="5"><hr
4f70: 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  ></td></tr>..<tr
4f80: 3e 3c 74 64 20 72 6f 77 73 70 61 6e 3d 22 35 22  ><td rowspan="5"
4f90: 20 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65 22   valign="middle"
4fa0: 3e 53 63 61 6c 65 28 3c 62 3e 73 78 3c 2f 62 3e  >Scale(<b>sx</b>
4fb0: 2c 20 3c 62 3e 73 79 3c 2f 62 3e 2c 20 3c 62 3e  , <b>sy</b>, <b>
4fc0: 73 7a 3c 2f 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74  sz</b>)</td>..<t
4fd0: 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  d>/</td><td alig
4fe0: 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 73 78  n="center"><b>sx
4ff0: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  </b></td><td ali
5000: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
5010: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
5020: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
5030: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
5040: 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f  /td><td>\</td></
5050: 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f  tr>..<tr><td>|</
5060: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
5070: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20  nter">0</td><td 
5080: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c  align="center"><
5090: 62 3e 73 79 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64  b>sy</b></td><td
50a0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
50b0: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  0</td><td align=
50c0: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
50d0: 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>|</td></tr>..
50e0: 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74  <tr><td>|</td><t
50f0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5100: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >0</td><td align
5110: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
5120: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5130: 72 22 3e 3c 62 3e 73 7a 3c 2f 62 3e 3c 2f 74 64  r"><b>sz</b></td
5140: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
5150: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c  er">0</td><td>|<
5160: 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /td></tr>..<tr><
5170: 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  td>\</td><td ali
5180: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
5190: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
51a0: 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61  ter">0</td><td a
51b0: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
51c0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
51d0: 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c 74 64  enter">1</td><td
51e0: 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74  >/</td></tr>..<t
51f0: 72 3e 3c 74 64 20 63 6f 6c 73 70 61 6e 3d 22 35  r><td colspan="5
5200: 22 3e 3c 68 72 3e 3c 2f 74 64 3e 3c 2f 74 72 3e  "><hr></td></tr>
5210: 0d 0a 3c 74 72 3e 3c 74 64 20 72 6f 77 73 70 61  ..<tr><td rowspa
5220: 6e 3d 22 35 22 20 76 61 6c 69 67 6e 3d 22 6d 69  n="5" valign="mi
5230: 64 64 6c 65 22 3e 58 20 52 6f 6c 6c 28 3c 62 3e  ddle">X Roll(<b>
5240: 26 74 68 65 74 61 3b 3c 2f 62 3e 29 3c 2f 74 64  &theta;</b>)</td
5250: 3e 0d 0a 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64  >..<td>/</td><td
5260: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
5270: 31 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  1</td><td align=
5280: 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c  "center">0</td><
5290: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
52a0: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ">0</td><td alig
52b0: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
52c0: 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72 3e  ><td>\</td></tr>
52d0: 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e  ..<tr><td>|</td>
52e0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
52f0: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
5300: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 63  gn="center"><b>c
5310: 6f 73 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c  os(&theta;)</b><
5320: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
5330: 65 6e 74 65 72 22 3e 3c 62 3e 2d 73 69 6e 28 26  enter"><b>-sin(&
5340: 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e  theta;)</b></td>
5350: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5360: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f  r">0</td><td>|</
5370: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
5380: 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  d>|</td><td alig
5390: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
53a0: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
53b0: 65 72 22 3e 3c 62 3e 73 69 6e 28 26 74 68 65 74  er"><b>sin(&thet
53c0: 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20  a;)</b></td><td 
53d0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c  align="center"><
53e0: 62 3e 63 6f 73 28 26 74 68 65 74 61 3b 29 3c 2f  b>cos(&theta;)</
53f0: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  b></td><td align
5400: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
5410: 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d  <td>|</td></tr>.
5420: 0a 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c  .<tr><td>\</td><
5430: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
5440: 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ">0</td><td alig
5450: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
5460: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
5470: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c  er">0</td><td al
5480: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f  ign="center">1</
5490: 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74  td><td>/</td></t
54a0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20 63 6f 6c 73  r>..<tr><td cols
54b0: 70 61 6e 3d 22 35 22 3e 3c 68 72 3e 3c 2f 74 64  pan="5"><hr></td
54c0: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 20  ></tr>..<tr><td 
54d0: 72 6f 77 73 70 61 6e 3d 22 35 22 20 76 61 6c 69  rowspan="5" vali
54e0: 67 6e 3d 22 6d 69 64 64 6c 65 22 3e 59 20 52 6f  gn="middle">Y Ro
54f0: 6c 6c 28 3c 62 3e 26 74 68 65 74 61 3b 3c 2f 62  ll(<b>&theta;</b
5500: 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 2f 3c 2f  >)</td>..<td>/</
5510: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
5520: 6e 74 65 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68  nter"><b>cos(&th
5530: 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74  eta;)</b></td><t
5540: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5550: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >0</td><td align
5560: 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 73 69 6e  ="center"><b>sin
5570: 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74  (&theta;)</b></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 31 3c 2f 74 64 3e 3c 74 64 20  nter">1</td><td 
55f0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30  align="center">0
5600: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
5610: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
5620: 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  d>|</td></tr>..<
5630: 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64  tr><td>|</td><td
5640: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
5650: 3c 62 3e 2d 73 69 6e 28 26 74 68 65 74 61 3b 29  <b>-sin(&theta;)
5660: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  </b></td><td ali
5670: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
5680: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
5690: 74 65 72 22 3e 3c 62 3e 63 6f 73 28 26 74 68 65  ter"><b>cos(&the
56a0: 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64  ta;)</b></td><td
56b0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
56c0: 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e  0</td><td>|</td>
56d0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c  </tr>..<tr><td>\
56e0: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
56f0: 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74  center">0</td><t
5700: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
5710: 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >0</td><td align
5720: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
5730: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5740: 72 22 3e 31 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f  r">1</td><td>/</
5750: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
5760: 64 20 63 6f 6c 73 70 61 6e 3d 22 35 22 3e 3c 68  d colspan="5"><h
5770: 72 3e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74  r></td></tr>..<t
5780: 72 3e 3c 74 64 20 72 6f 77 73 70 61 6e 3d 22 35  r><td rowspan="5
5790: 22 20 76 61 6c 69 67 6e 3d 22 6d 69 64 64 6c 65  " valign="middle
57a0: 22 3e 5a 20 52 6f 6c 6c 28 3c 62 3e 26 74 68 65  ">Z Roll(<b>&the
57b0: 74 61 3b 3c 2f 62 3e 29 3c 2f 74 64 3e 0d 0a 3c  ta;</b>)</td>..<
57c0: 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  td>/</td><td ali
57d0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c 62 3e 63  gn="center"><b>c
57e0: 6f 73 28 26 74 68 65 74 61 3b 29 3c 2f 62 3e 3c  os(&theta;)</b><
57f0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
5800: 65 6e 74 65 72 22 3e 3c 62 3e 2d 73 69 6e 28 26  enter"><b>-sin(&
5810: 74 68 65 74 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e  theta;)</b></td>
5820: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
5830: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  r">0</td><td ali
5840: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74  gn="center">0</t
5850: 64 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72  d><td>\</td></tr
5860: 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64  >..<tr><td>|</td
5870: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
5880: 65 72 22 3e 3c 62 3e 73 69 6e 28 26 74 68 65 74  er"><b>sin(&thet
5890: 61 3b 29 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 20  a;)</b></td><td 
58a0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 3c  align="center"><
58b0: 62 3e 63 6f 73 28 26 74 68 65 74 61 3b 29 3c 2f  b>cos(&theta;)</
58c0: 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  b></td><td align
58d0: 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e  ="center">0</td>
58e0: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
58f0: 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f  r">0</td><td>|</
5900: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
5910: 64 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  d>|</td><td alig
5920: 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c 2f 74 64  n="center">0</td
5930: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
5940: 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 20 61 6c  er">0</td><td al
5950: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 31 3c 2f  ign="center">1</
5960: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
5970: 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64 3e  nter">0</td><td>
5980: 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  |</td></tr>..<tr
5990: 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64 20 61  ><td>\</td><td a
59a0: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 30 3c  lign="center">0<
59b0: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
59c0: 65 6e 74 65 72 22 3e 30 3c 2f 74 64 3e 3c 74 64  enter">0</td><td
59d0: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
59e0: 30 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  0</td><td align=
59f0: 22 63 65 6e 74 65 72 22 3e 31 3c 2f 74 64 3e 3c  "center">1</td><
5a00: 74 64 3e 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>/</td></tr>..
5a10: 3c 74 72 3e 3c 74 64 3e 3c 2f 74 64 3e 3c 2f 74  <tr><td></td></t
5a20: 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 62  r>..</table>..<b
5a30: 72 3e 3c 68 72 3e 0d 0a 3c 68 33 3e 61 70 70 6c  r><hr>..<h3>appl
5a40: 79 69 6e 67 20 61 6e 20 41 66 66 69 6e 65 20 54  ying an Affine T
5a50: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 3c 2f 68  ransformation</h
5a60: 33 3e 0d 0a 49 6e 20 6f 72 64 65 72 20 74 6f 20  3>..In order to 
5a70: 6d 61 74 65 72 69 61 6c 69 7a 65 20 61 6e 20 61  materialize an a
5a80: 66 66 69 6e 65 20 74 72 61 6e 73 66 6f 72 6d 61  ffine transforma
5a90: 74 69 6f 6e 20 77 65 20 73 69 6d 70 6c 79 20 68  tion we simply h
5aa0: 61 76 65 20 74 6f 20 63 6f 6d 70 75 74 65 20 20  ave to compute  
5ab0: 3c 62 3e 28 78 27 2c 20 79 27 2c 20 7a 27 29 3c  <b>(x', y', z')<
5ac0: 2f 62 3e 20 63 6f 6f 72 64 69 6e 61 74 65 73 20  /b> coordinates 
5ad0: 73 74 61 72 74 69 6e 67 20 66 72 6f 6d 20 3c 62  starting from <b
5ae0: 3e 28 78 2c 20 79 2c 20 7a 29 3c 2f 62 3e 20 66  >(x, y, z)</b> f
5af0: 6f 72 20 65 76 65 72 79 20 70 6f 69 6e 74 20 6f  or every point o
5b00: 72 20 76 65 72 74 65 78 20 66 6f 75 6e 64 20 69  r vertex found i
5b10: 6e 20 74 68 65 20 69 6e 70 75 74 20 47 65 6f 6d  n the input Geom
5b20: 65 74 72 79 20 61 63 63 6f 72 64 69 6e 67 6c 79  etry accordingly
5b30: 20 74 6f 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e   to the followin
5b40: 67 20 66 6f 72 6d 75 6c 61 65 3a 0d 0a 3c 75 6c  g formulae:..<ul
5b50: 3e 0d 0a 3c 6c 69 3e 3c 62 3e 78 27 20 3d 20 61  >..<li><b>x' = a
5b60: 2a 78 20 2b 20 62 2a 79 20 2b 20 63 2a 7a 20 2b  *x + b*y + c*z +
5b70: 20 78 6f 66 66 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a   xoff</b></li>..
5b80: 3c 6c 69 3e 3c 62 3e 79 27 20 3d 20 64 2a 78 20  <li><b>y' = d*x 
5b90: 2b 20 65 2a 79 20 2b 20 66 2a 7a 20 2b 20 79 6f  + e*y + f*z + yo
5ba0: 66 66 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 6c 69  ff</b></li>..<li
5bb0: 3e 3c 62 3e 7a 27 20 3d 20 67 2a 78 20 2b 20 68  ><b>z' = g*x + h
5bc0: 2a 79 20 2b 20 69 2a 7a 20 2b 20 7a 6f 66 66 3c  *y + i*z + zoff<
5bd0: 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e 3c  /b></li>..</ul><
5be0: 62 72 3e 0d 0a 69 6e 20 74 68 65 20 73 69 6d 70  br>..in the simp
5bf0: 6c 65 72 20 3c 62 3e 32 44 3c 2f 62 3e 20 63 61  ler <b>2D</b> ca
5c00: 73 65 20 74 68 69 73 20 77 69 6c 6c 20 61 73 73  se this will ass
5c10: 75 6d 65 20 74 68 65 20 72 65 64 75 63 65 64 20  ume the reduced 
5c20: 66 6f 72 6d 3a 0d 0a 3c 75 6c 3e 0d 0a 3c 6c 69  form:..<ul>..<li
5c30: 3e 3c 62 3e 78 27 20 3d 20 61 2a 78 20 2b 20 62  ><b>x' = a*x + b
5c40: 2a 79 20 2b 20 78 6f 66 66 3c 2f 62 3e 3c 2f 6c  *y + xoff</b></l
5c50: 69 3e 0d 0a 3c 6c 69 3e 3c 62 3e 79 27 20 3d 20  i>..<li><b>y' = 
5c60: 64 2a 78 20 2b 20 65 2a 79 20 2b 20 79 6f 66 66  d*x + e*y + yoff
5c70: 3c 2f 62 3e 3c 2f 6c 69 3e 0d 0a 3c 2f 75 6c 3e  </b></li>..</ul>
5c80: 3c 62 72 3e 0d 0a 41 73 20 79 6f 75 20 63 61 6e  <br>..As you can
5c90: 20 6e 6f 74 69 63 65 2c 20 61 70 70 6c 79 69 6e   notice, applyin
5ca0: 67 20 61 6e 20 41 66 66 69 6e 65 20 54 72 61 6e  g an Affine Tran
5cb0: 73 66 6f 72 6d 61 74 69 6f 6e 20 64 6f 65 73 20  sformation does 
5cc0: 6e 6f 74 20 72 65 71 75 69 72 65 73 20 63 6f 6d  not requires com
5cd0: 70 75 74 69 6e 67 20 61 6e 79 20 74 72 69 67 6f  puting any trigo
5ce0: 6e 6f 6d 65 74 72 69 63 20 66 75 6e 63 74 69 6f  nometric functio
5cf0: 6e 2e 3c 62 72 3e 0d 0a 54 72 69 67 6f 6e 6f 6d  n.<br>..Trigonom
5d00: 65 74 72 69 63 20 66 75 6e 63 74 69 6f 6e 73 20  etric functions 
5d10: 61 72 65 20 76 65 72 79 20 63 6f 73 74 6c 79 20  are very costly 
5d20: 69 6e 20 63 6f 6d 70 75 74 61 74 69 6f 6e 61 6c  in computational
5d30: 20 74 65 72 6d 73 2c 20 73 6f 20 61 70 70 6c 79   terms, so apply
5d40: 69 6e 67 20 61 6e 20 41 66 66 69 6e 65 20 54 72  ing an Affine Tr
5d50: 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 69 73 20  ansformation is 
5d60: 61 6e 20 69 6e 74 72 69 6e 73 69 63 61 6c 6c 79  an intrinsically
5d70: 20 65 66 66 69 63 69 65 6e 74 20 6d 65 63 68 61   efficient mecha
5d80: 6e 69 73 6d 20 62 65 63 61 75 73 65 20 73 69 6d  nism because sim
5d90: 70 6c 79 20 64 65 70 65 6e 64 73 20 6f 6e 20 6d  ply depends on m
5da0: 75 6c 74 69 70 6c 69 63 61 74 69 6f 6e 73 20 61  ultiplications a
5db0: 6e 64 20 61 64 64 69 74 69 6f 6e 73 2e 3c 62 72  nd additions.<br
5dc0: 3e 0d 0a 3c 62 72 3e 3c 68 72 3e 0d 0a 3c 68 33  >..<br><hr>..<h3
5dd0: 3e 63 68 61 69 6e 69 6e 67 20 74 77 6f 20 28 6f  >chaining two (o
5de0: 72 20 65 76 65 6e 20 6d 6f 72 65 29 20 41 66 66  r even more) Aff
5df0: 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69  ine Transformati
5e00: 6f 6e 73 20 69 6e 20 61 20 73 69 6e 67 6c 65 20  ons in a single 
5e10: 6f 70 65 72 61 74 69 6f 6e 3c 2f 68 33 3e 0d 0a  operation</h3>..
5e20: 41 66 66 69 6e 65 20 74 72 61 6e 73 66 6f 72 6d  Affine transform
5e30: 61 74 69 6f 6e 20 6d 61 74 72 69 63 65 73 20 68  ation matrices h
5e40: 61 76 65 20 61 6e 6f 74 68 65 72 20 61 73 74 6f  ave another asto
5e50: 6e 69 73 68 69 6e 67 20 70 72 6f 70 65 72 74 79  nishing property
5e60: 2e 3c 62 72 3e 0d 0a 57 65 20 63 61 6e 20 3c 61  .<br>..We can <a
5e70: 20 68 72 65 66 3d 22 68 74 74 70 3a 2f 2f 65 6e   href="http://en
5e80: 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77  .wikipedia.org/w
5e90: 69 6b 69 2f 4d 61 74 72 69 78 5f 6d 75 6c 74 69  iki/Matrix_multi
5ea0: 70 6c 69 63 61 74 69 6f 6e 22 3e 6d 75 6c 74 69  plication">multi
5eb0: 70 6c 79 3c 2f 61 3e 20 74 77 6f 20 64 69 66 66  ply</a> two diff
5ec0: 65 72 65 6e 74 20 61 66 66 69 6e 65 20 74 72 61  erent affine tra
5ed0: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 6d 61 74 72  nsformation matr
5ee0: 69 63 65 73 20 74 68 75 73 20 6f 62 74 61 69 6e  ices thus obtain
5ef0: 69 6e 67 20 61 20 74 68 69 72 64 20 6d 61 74 72  ing a third matr
5f00: 69 78 2c 20 61 6e 64 20 74 68 69 73 20 6c 61 74  ix, and this lat
5f10: 65 73 74 20 6f 6e 63 65 20 61 70 70 6c 69 65 64  est once applied
5f20: 20 77 69 6c 6c 20 63 6f 6e 74 61 69 6e 20 62 6f   will contain bo
5f30: 74 68 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f  th transformatio
5f40: 6e 73 20 61 6e 64 20 69 6e 20 74 68 65 20 72 69  ns and in the ri
5f50: 67 68 74 20 73 65 71 75 65 6e 63 65 2e 3c 62 72  ght sequence.<br
5f60: 3e 0d 0a 54 68 65 72 65 20 69 73 20 6e 6f 20 6c  >..There is no l
5f70: 69 6d 69 74 3b 20 77 65 20 63 61 6e 20 69 6e 66  imit; we can inf
5f80: 69 6e 69 74 69 76 65 6c 79 20 63 68 61 69 6e 20  initively chain 
5f90: 61 73 20 6d 61 6e 79 20 74 72 61 6e 73 66 6f 72  as many transfor
5fa0: 6d 61 74 69 6f 6e 73 20 61 73 20 72 65 71 75 69  mations as requi
5fb0: 72 65 64 2c 20 77 65 27 6c 6c 20 73 69 6d 70 6c  red, we'll simpl
5fc0: 79 20 68 61 76 65 20 74 6f 20 63 6f 6e 74 69 6e  y have to contin
5fd0: 75 65 20 6d 75 6c 74 69 70 6c 79 69 6e 67 20 61  ue multiplying a
5fe0: 6c 6c 20 6d 61 74 72 69 63 65 73 20 6f 6e 65 20  ll matrices one 
5ff0: 61 66 74 65 72 20 74 68 65 20 6f 74 68 65 72 20  after the other 
6000: 63 61 72 65 66 75 6c 6c 79 20 72 65 73 70 65 63  carefully respec
6010: 74 69 6e 67 20 74 68 65 20 61 70 70 72 6f 70 72  ting the appropr
6020: 69 61 74 65 20 73 65 71 75 65 6e 63 65 2e 3c 62  iate sequence.<b
6030: 72 3e 0d 0a 41 74 20 74 68 65 20 65 6e 64 20 6f  r>..At the end o
6040: 66 20 74 68 65 20 70 72 6f 63 65 73 73 20 77 65  f the process we
6050: 27 6c 6c 20 61 6c 77 61 79 73 20 67 65 74 20 6a  'll always get j
6060: 75 73 74 20 61 20 73 69 6e 67 6c 65 20 61 66 66  ust a single aff
6070: 69 6e 65 20 74 72 61 6e 73 66 6f 72 6d 61 74 69  ine transformati
6080: 6f 6e 20 6d 61 74 72 69 78 20 66 61 69 74 68 66  on matrix faithf
6090: 75 6c 6c 79 20 72 65 70 72 65 73 65 6e 74 69 6e  ully representin
60a0: 67 20 61 6e 79 20 69 6e 64 69 76 69 64 75 61 6c  g any individual
60b0: 20 74 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20   transformation 
60c0: 69 6e 20 74 68 65 20 63 68 61 69 6e 2e 0d 0a 3c  in the chain...<
60d0: 74 61 62 6c 65 20 62 67 63 6f 6c 6f 72 3d 22 23  table bgcolor="#
60e0: 66 66 63 30 30 30 22 20 63 65 6c 6c 70 61 64 64  ffc000" cellpadd
60f0: 69 6e 67 3d 22 31 30 22 3e 3c 74 72 3e 3c 74 64  ing="10"><tr><td
6100: 3e 0d 0a 54 68 65 20 6d 75 6c 74 69 70 6c 69 63  >..The multiplic
6110: 61 74 69 6f 6e 20 62 65 74 77 65 65 6e 20 74 77  ation between tw
6120: 6f 20 6d 61 74 72 69 63 65 73 20 3c 75 3e 69 73  o matrices <u>is
6130: 20 6e 6f 74 20 61 20 63 6f 6d 6d 75 74 61 74 69   not a commutati
6140: 76 65 20 6f 70 65 72 61 74 69 6f 6e 3c 2f 75 3e  ve operation</u>
6150: 3a 20 74 68 65 20 72 65 6c 61 74 69 76 65 20 6f  : the relative o
6160: 72 64 65 72 20 6f 66 20 6f 70 65 72 61 6e 64 73  rder of operands
6170: 20 69 73 20 61 62 73 6f 6c 75 74 65 6c 79 20 72   is absolutely r
6180: 65 6c 65 76 61 6e 74 2e 3c 2f 74 64 3e 3c 2f 74  elevant.</td></t
6190: 72 3e 3c 2f 74 61 62 6c 65 3e 0d 0a 3c 68 33 3e  r></table>..<h3>
61a0: 6d 75 6c 74 69 70 6c 79 69 6e 67 20 74 77 6f 20  multiplying two 
61b0: 6d 61 74 72 69 63 65 73 3c 2f 68 33 3e 0d 0a 4d  matrices</h3>..M
61c0: 75 6c 74 69 70 6c 69 63 61 74 69 6f 6e 20 69 73  ultiplication is
61d0: 20 6e 6f 74 20 72 65 61 6c 6c 79 20 61 20 73 69   not really a si
61e0: 6d 70 6c 65 20 6f 70 65 72 61 74 69 6f 6e 20 77  mple operation w
61f0: 68 65 6e 20 6d 61 74 72 69 63 65 73 20 61 72 65  hen matrices are
6200: 20 69 6e 76 6f 6c 76 65 64 20 61 6e 64 20 72 65   involved and re
6210: 71 75 69 72 65 73 20 61 20 72 61 74 68 65 72 20  quires a rather 
6220: 63 6f 6d 70 6c 65 78 20 70 72 6f 63 65 64 75 72  complex procedur
6230: 65 3b 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  e; the following
6240: 20 65 78 61 6d 70 6c 65 20 73 68 6f 77 73 20 68   example shows h
6250: 6f 77 20 74 6f 20 6d 75 6c 74 69 70 6c 79 20 74  ow to multiply t
6260: 77 6f 20 3c 62 3e 34 20 78 20 34 3c 2f 62 3e 20  wo <b>4 x 4</b> 
6270: 6d 61 74 72 69 63 65 73 2e 3c 62 72 3e 0d 0a 3c  matrices.<br>..<
6280: 74 61 62 6c 65 20 63 65 6c 6c 73 70 61 63 69 6e  table cellspacin
6290: 67 3d 22 34 22 20 63 65 6c 6c 70 61 64 64 69 6e  g="4" cellpaddin
62a0: 67 3d 22 34 22 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  g="4">..<tr><td>
62b0: 0d 0a 3c 74 61 62 6c 65 3e 0d 0a 3c 74 72 3e 3c  ..<table>..<tr><
62c0: 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  td>/</td><td ali
62d0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73 75  gn="center">a<su
62e0: 62 3e 31 31 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c  b>11</sub></td><
62f0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
6300: 22 3e 61 3c 73 75 62 3e 31 32 3c 2f 73 75 62 3e  ">a<sub>12</sub>
6310: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
6320: 63 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e 31 33  center">a<sub>13
6330: 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61  </sub></td><td a
6340: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c  lign="center">a<
6350: 73 75 62 3e 31 34 3c 2f 73 75 62 3e 3c 2f 74 64  sub>14</sub></td
6360: 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 2f 74 72 3e  ><td>\</td></tr>
6370: 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e  ..<tr><td>|</td>
6380: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
6390: 72 22 3e 61 3c 73 75 62 3e 32 31 3c 2f 73 75 62  r">a<sub>21</sub
63a0: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  ></td><td align=
63b0: 22 63 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e 32  "center">a<sub>2
63c0: 32 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20  2</sub></td><td 
63d0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61  align="center">a
63e0: 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e 3c 2f 74  <sub>23</sub></t
63f0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
6400: 74 65 72 22 3e 61 3c 73 75 62 3e 32 34 3c 2f 73  ter">a<sub>24</s
6410: 75 62 3e 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74  ub></td><td>|</t
6420: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
6430: 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >|</td><td align
6440: 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e  ="center">a<sub>
6450: 33 31 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64  31</sub></td><td
6460: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
6470: 61 3c 73 75 62 3e 33 32 3c 2f 73 75 62 3e 3c 2f  a<sub>32</sub></
6480: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
6490: 6e 74 65 72 22 3e 61 3c 73 75 62 3e 33 33 3c 2f  nter">a<sub>33</
64a0: 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  sub></td><td ali
64b0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73 75  gn="center">a<su
64c0: 62 3e 33 34 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c  b>34</sub></td><
64d0: 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  td>|</td></tr>..
64e0: 3c 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74  <tr><td>\</td><t
64f0: 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22  d align="center"
6500: 3e 61 3c 73 75 62 3e 34 31 3c 2f 73 75 62 3e 3c  >a<sub>41</sub><
6510: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
6520: 65 6e 74 65 72 22 3e 61 3c 73 75 62 3e 34 32 3c  enter">a<sub>42<
6530: 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c  /sub></td><td al
6540: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 61 3c 73  ign="center">a<s
6550: 75 62 3e 34 33 3c 2f 73 75 62 3e 3c 2f 74 64 3e  ub>43</sub></td>
6560: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
6570: 72 22 3e 61 3c 73 75 62 3e 34 34 3c 2f 73 75 62  r">a<sub>44</sub
6580: 3e 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f 74 64 3e  ></td><td>/</td>
6590: 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c 65 3e 0d  </tr>..</table>.
65a0: 0a 3c 2f 74 64 3e 3c 74 64 20 76 61 6c 69 67 6e  .</td><td valign
65b0: 3d 22 6d 69 64 64 6c 65 22 3e 2a 3c 2f 74 64 3e  ="middle">*</td>
65c0: 0d 0a 3c 74 64 3e 0d 0a 3c 74 61 62 6c 65 3e 0d  ..<td>..<table>.
65d0: 0a 3c 74 72 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c  .<tr><td>/</td><
65e0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
65f0: 22 3e 62 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e  ">b<sub>11</sub>
6600: 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22  </td><td align="
6610: 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 31 32  center">b<sub>12
6620: 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61  </sub></td><td a
6630: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c  lign="center">b<
6640: 73 75 62 3e 31 33 3c 2f 73 75 62 3e 3c 2f 74 64  sub>13</sub></td
6650: 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74  ><td align="cent
6660: 65 72 22 3e 62 3c 73 75 62 3e 31 34 3c 2f 73 75  er">b<sub>14</su
6670: 62 3e 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74 64  b></td><td>\</td
6680: 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e  ></tr>..<tr><td>
6690: 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  |</td><td align=
66a0: 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 32  "center">b<sub>2
66b0: 31 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20  1</sub></td><td 
66c0: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62  align="center">b
66d0: 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e 3c 2f 74  <sub>22</sub></t
66e0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
66f0: 74 65 72 22 3e 62 3c 73 75 62 3e 32 33 3c 2f 73  ter">b<sub>23</s
6700: 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67  ub></td><td alig
6710: 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 62  n="center">b<sub
6720: 3e 32 34 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74  >24</sub></td><t
6730: 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  d>|</td></tr>..<
6740: 74 72 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 74 64  tr><td>|</td><td
6750: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
6760: 62 3c 73 75 62 3e 33 31 3c 2f 73 75 62 3e 3c 2f  b<sub>31</sub></
6770: 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65  td><td align="ce
6780: 6e 74 65 72 22 3e 62 3c 73 75 62 3e 33 32 3c 2f  nter">b<sub>32</
6790: 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69  sub></td><td ali
67a0: 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73 75  gn="center">b<su
67b0: 62 3e 33 33 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c  b>33</sub></td><
67c0: 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72  td align="center
67d0: 22 3e 62 3c 73 75 62 3e 33 34 3c 2f 73 75 62 3e  ">b<sub>34</sub>
67e0: 3c 2f 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c  </td><td>|</td><
67f0: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 5c 3c  /tr>..<tr><td>\<
6800: 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63  /td><td align="c
6810: 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 34 31 3c  enter">b<sub>41<
6820: 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c  /sub></td><td al
6830: 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 62 3c 73  ign="center">b<s
6840: 75 62 3e 34 32 3c 2f 73 75 62 3e 3c 2f 74 64 3e  ub>42</sub></td>
6850: 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65  <td align="cente
6860: 72 22 3e 62 3c 73 75 62 3e 34 33 3c 2f 73 75 62  r">b<sub>43</sub
6870: 3e 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e 3d  ></td><td align=
6880: 22 63 65 6e 74 65 72 22 3e 62 3c 73 75 62 3e 34  "center">b<sub>4
6890: 34 3c 2f 73 75 62 3e 3c 2f 74 64 3e 3c 74 64 3e  4</sub></td><td>
68a0: 2f 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74  /</td></tr>..</t
68b0: 61 62 6c 65 3e 0d 0a 3c 2f 74 64 3e 0d 0a 3c 2f  able>..</td>..</
68c0: 74 64 3e 3c 74 64 20 76 61 6c 69 67 6e 3d 22 6d  td><td valign="m
68d0: 69 64 64 6c 65 22 3e 3d 3c 2f 74 64 3e 0d 0a 3c  iddle">=</td>..<
68e0: 74 64 3e 0d 0a 3c 74 61 62 6c 65 3e 0d 0a 3c 74  td>..<table>..<t
68f0: 72 3e 3c 74 64 3e 2f 3c 2f 74 64 3e 3c 74 64 20  r><td>/</td><td 
6900: 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 0d  align="center">.
6910: 0a 28 61 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e  .(a<sub>11</sub>
6920: 2a 62 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e 20  *b<sub>11</sub> 
6930: 2b 20 0d 0a 61 3c 73 75 62 3e 31 32 3c 2f 73 75  + ..a<sub>12</su
6940: 62 3e 2a 62 3c 73 75 62 3e 32 31 3c 2f 73 75 62  b>*b<sub>21</sub
6950: 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 33 3c 2f  > + ..a<sub>13</
6960: 73 75 62 3e 2a 62 3c 73 75 62 3e 33 31 3c 2f 73  sub>*b<sub>31</s
6970: 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 34  ub> + ..a<sub>14
6980: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 31 3c  </sub>*b<sub>41<
6990: 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64  /sub>)</td>..<td
69a0: 3e 28 61 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e  >(a<sub>11</sub>
69b0: 2a 62 3c 73 75 62 3e 31 32 3c 2f 73 75 62 3e 20  *b<sub>12</sub> 
69c0: 2b 20 0d 0a 61 3c 73 75 62 3e 31 32 3c 2f 73 75  + ..a<sub>12</su
69d0: 62 3e 2a 62 3c 73 75 62 3e 32 32 3c 2f 73 75 62  b>*b<sub>22</sub
69e0: 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 33 3c 2f  > + ..a<sub>13</
69f0: 73 75 62 3e 2a 62 3c 73 75 62 3e 33 32 3c 2f 73  sub>*b<sub>32</s
6a00: 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 31 34 3c  ub> +..a<sub>14<
6a10: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 32 3c 2f  /sub>*b<sub>42</
6a20: 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e  sub>)</td>..<td>
6a30: 28 61 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e 2a  (a<sub>11</sub>*
6a40: 62 3c 73 75 62 3e 31 33 3c 2f 73 75 62 3e 20 2b  b<sub>13</sub> +
6a50: 20 0d 0a 61 3c 73 75 62 3e 31 32 3c 2f 73 75 62   ..a<sub>12</sub
6a60: 3e 2a 62 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e  >*b<sub>23</sub>
6a70: 20 2b 20 0d 0a 61 3c 73 75 62 3e 31 33 3c 2f 73   + ..a<sub>13</s
6a80: 75 62 3e 2a 62 3c 73 75 62 3e 33 33 3c 2f 73 75  ub>*b<sub>33</su
6a90: 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 31 34 3c 2f  b> +..a<sub>14</
6aa0: 73 75 62 3e 2a 62 3c 73 75 62 3e 34 33 3c 2f 73  sub>*b<sub>43</s
6ab0: 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 28  ub>)</td>..<td>(
6ac0: 61 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e 2a 62  a<sub>11</sub>*b
6ad0: 3c 73 75 62 3e 31 34 3c 2f 73 75 62 3e 20 2b 20  <sub>14</sub> + 
6ae0: 0d 0a 61 3c 73 75 62 3e 31 32 3c 2f 73 75 62 3e  ..a<sub>12</sub>
6af0: 2a 62 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e 20  *b<sub>24</sub> 
6b00: 2b 20 0d 0a 61 3c 73 75 62 3e 31 33 3c 2f 73 75  + ..a<sub>13</su
6b10: 62 3e 2a 62 3c 73 75 62 3e 33 34 3c 2f 73 75 62  b>*b<sub>34</sub
6b20: 3e 20 2b 0d 0a 61 3c 73 75 62 3e 31 34 3c 2f 73  > +..a<sub>14</s
6b30: 75 62 3e 2a 62 3c 73 75 62 3e 34 34 3c 2f 73 75  ub>*b<sub>44</su
6b40: 62 3e 29 3c 2f 74 64 3e 3c 74 64 3e 5c 3c 2f 74  b>)</td><td>\</t
6b50: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
6b60: 3e 7c 3c 2f 74 64 3e 3c 74 64 20 61 6c 69 67 6e  >|</td><td align
6b70: 3d 22 63 65 6e 74 65 72 22 3e 0d 0a 28 61 3c 73  ="center">..(a<s
6b80: 75 62 3e 32 31 3c 2f 73 75 62 3e 2a 62 3c 73 75  ub>21</sub>*b<su
6b90: 62 3e 31 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61  b>11</sub> + ..a
6ba0: 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e 2a 62 3c  <sub>22</sub>*b<
6bb0: 73 75 62 3e 32 31 3c 2f 73 75 62 3e 20 2b 20 0d  sub>21</sub> + .
6bc0: 0a 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e 2a  .a<sub>23</sub>*
6bd0: 62 3c 73 75 62 3e 33 31 3c 2f 73 75 62 3e 20 2b  b<sub>31</sub> +
6be0: 20 0d 0a 61 3c 73 75 62 3e 32 34 3c 2f 73 75 62   ..a<sub>24</sub
6bf0: 3e 2a 62 3c 73 75 62 3e 34 31 3c 2f 73 75 62 3e  >*b<sub>41</sub>
6c00: 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 28 61 3c 73  )</td>..<td>(a<s
6c10: 75 62 3e 32 31 3c 2f 73 75 62 3e 2a 62 3c 73 75  ub>21</sub>*b<su
6c20: 62 3e 31 32 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61  b>12</sub> + ..a
6c30: 3c 73 75 62 3e 32 32 3c 2f 73 75 62 3e 2a 62 3c  <sub>22</sub>*b<
6c40: 73 75 62 3e 32 32 3c 2f 73 75 62 3e 20 2b 20 0d  sub>22</sub> + .
6c50: 0a 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e 2a  .a<sub>23</sub>*
6c60: 62 3c 73 75 62 3e 33 32 3c 2f 73 75 62 3e 20 2b  b<sub>32</sub> +
6c70: 0d 0a 61 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e  ..a<sub>24</sub>
6c80: 2a 62 3c 73 75 62 3e 34 32 3c 2f 73 75 62 3e 29  *b<sub>42</sub>)
6c90: 3c 2f 74 64 3e 0d 0a 3c 74 64 3e 28 61 3c 73 75  </td>..<td>(a<su
6ca0: 62 3e 32 31 3c 2f 73 75 62 3e 2a 62 3c 73 75 62  b>21</sub>*b<sub
6cb0: 3e 31 33 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c  >13</sub> + ..a<
6cc0: 73 75 62 3e 32 32 3c 2f 73 75 62 3e 2a 62 3c 73  sub>22</sub>*b<s
6cd0: 75 62 3e 32 33 3c 2f 73 75 62 3e 20 2b 20 0d 0a  ub>23</sub> + ..
6ce0: 61 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e 2a 62  a<sub>23</sub>*b
6cf0: 3c 73 75 62 3e 33 33 3c 2f 73 75 62 3e 20 2b 0d  <sub>33</sub> +.
6d00: 0a 61 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e 2a  .a<sub>24</sub>*
6d10: 62 3c 73 75 62 3e 34 33 3c 2f 73 75 62 3e 29 3c  b<sub>43</sub>)<
6d20: 2f 74 64 3e 0d 0a 3c 74 64 3e 28 61 3c 73 75 62  /td>..<td>(a<sub
6d30: 3e 32 31 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e  >21</sub>*b<sub>
6d40: 31 34 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73  14</sub> + ..a<s
6d50: 75 62 3e 32 32 3c 2f 73 75 62 3e 2a 62 3c 73 75  ub>22</sub>*b<su
6d60: 62 3e 32 34 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61  b>24</sub> + ..a
6d70: 3c 73 75 62 3e 32 33 3c 2f 73 75 62 3e 2a 62 3c  <sub>23</sub>*b<
6d80: 73 75 62 3e 33 34 3c 2f 73 75 62 3e 20 2b 0d 0a  sub>34</sub> +..
6d90: 61 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e 2a 62  a<sub>24</sub>*b
6da0: 3c 73 75 62 3e 34 34 3c 2f 73 75 62 3e 29 3c 2f  <sub>44</sub>)</
6db0: 74 64 3e 3c 74 64 3e 7c 3c 2f 74 64 3e 3c 2f 74  td><td>|</td></t
6dc0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 7c 3c 2f 74  r>..<tr><td>|</t
6dd0: 64 3e 3c 74 64 20 61 6c 69 67 6e 3d 22 63 65 6e  d><td align="cen
6de0: 74 65 72 22 3e 0d 0a 28 61 3c 73 75 62 3e 33 31  ter">..(a<sub>31
6df0: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 31 3c  </sub>*b<sub>11<
6e00: 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e  /sub> + ..a<sub>
6e10: 33 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32  32</sub>*b<sub>2
6e20: 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75  1</sub> + ..a<su
6e30: 62 3e 33 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62  b>33</sub>*b<sub
6e40: 3e 33 31 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c  >31</sub> + ..a<
6e50: 73 75 62 3e 33 34 3c 2f 73 75 62 3e 2a 62 3c 73  sub>34</sub>*b<s
6e60: 75 62 3e 34 31 3c 2f 73 75 62 3e 29 3c 2f 74 64  ub>41</sub>)</td
6e70: 3e 0d 0a 3c 74 64 3e 28 61 3c 73 75 62 3e 33 31  >..<td>(a<sub>31
6e80: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 32 3c  </sub>*b<sub>12<
6e90: 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e  /sub> + ..a<sub>
6ea0: 33 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32  32</sub>*b<sub>2
6eb0: 32 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75  2</sub> + ..a<su
6ec0: 62 3e 33 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62  b>33</sub>*b<sub
6ed0: 3e 33 32 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73  >32</sub> +..a<s
6ee0: 75 62 3e 33 34 3c 2f 73 75 62 3e 2a 62 3c 73 75  ub>34</sub>*b<su
6ef0: 62 3e 34 32 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e  b>42</sub>)</td>
6f00: 0d 0a 3c 74 64 3e 28 61 3c 73 75 62 3e 33 31 3c  ..<td>(a<sub>31<
6f10: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 31 33 3c 2f  /sub>*b<sub>13</
6f20: 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 33  sub> + ..a<sub>3
6f30: 32 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 33  2</sub>*b<sub>23
6f40: 3c 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62  </sub> + ..a<sub
6f50: 3e 33 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e  >33</sub>*b<sub>
6f60: 33 33 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75  33</sub> +..a<su
6f70: 62 3e 33 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62  b>34</sub>*b<sub
6f80: 3e 34 33 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d  >43</sub>)</td>.
6f90: 0a 3c 74 64 3e 28 61 3c 73 75 62 3e 33 31 3c 2f  .<td>(a<sub>31</
6fa0: 73 75 62 3e 2a 62 3c 73 75 62 3e 31 34 3c 2f 73  sub>*b<sub>14</s
6fb0: 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 33 32  ub> + ..a<sub>32
6fc0: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 32 34 3c  </sub>*b<sub>24<
6fd0: 2f 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e  /sub> + ..a<sub>
6fe0: 33 33 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33  33</sub>*b<sub>3
6ff0: 34 3c 2f 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62  4</sub> +..a<sub
7000: 3e 33 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e  >34</sub>*b<sub>
7010: 34 34 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 3c 74  44</sub>)</td><t
7020: 64 3e 7c 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  d>|</td></tr>..<
7030: 74 72 3e 3c 74 64 3e 5c 3c 2f 74 64 3e 3c 74 64  tr><td>\</td><td
7040: 20 61 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e   align="center">
7050: 0d 0a 28 61 3c 73 75 62 3e 34 31 3c 2f 73 75 62  ..(a<sub>41</sub
7060: 3e 2a 62 3c 73 75 62 3e 31 31 3c 2f 73 75 62 3e  >*b<sub>11</sub>
7070: 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 32 3c 2f 73   + ..a<sub>42</s
7080: 75 62 3e 2a 62 3c 73 75 62 3e 32 31 3c 2f 73 75  ub>*b<sub>21</su
7090: 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 33 3c  b> + ..a<sub>43<
70a0: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 31 3c 2f  /sub>*b<sub>31</
70b0: 73 75 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34  sub> + ..a<sub>4
70c0: 34 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 31  4</sub>*b<sub>41
70d0: 3c 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74  </sub>)</td>..<t
70e0: 64 3e 28 61 3c 73 75 62 3e 34 31 3c 2f 73 75 62  d>(a<sub>41</sub
70f0: 3e 2a 62 3c 73 75 62 3e 31 32 3c 2f 73 75 62 3e  >*b<sub>12</sub>
7100: 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 32 3c 2f 73   + ..a<sub>42</s
7110: 75 62 3e 2a 62 3c 73 75 62 3e 32 32 3c 2f 73 75  ub>*b<sub>22</su
7120: 62 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 33 3c  b> + ..a<sub>43<
7130: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 33 32 3c 2f  /sub>*b<sub>32</
7140: 73 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 34 34  sub> +..a<sub>44
7150: 3c 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 32 3c  </sub>*b<sub>42<
7160: 2f 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64  /sub>)</td>..<td
7170: 3e 28 61 3c 73 75 62 3e 34 31 3c 2f 73 75 62 3e  >(a<sub>41</sub>
7180: 2a 62 3c 73 75 62 3e 31 33 3c 2f 73 75 62 3e 20  *b<sub>13</sub> 
7190: 2b 20 0d 0a 61 3c 73 75 62 3e 34 32 3c 2f 73 75  + ..a<sub>42</su
71a0: 62 3e 2a 62 3c 73 75 62 3e 32 33 3c 2f 73 75 62  b>*b<sub>23</sub
71b0: 3e 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 33 3c 2f  > + ..a<sub>43</
71c0: 73 75 62 3e 2a 62 3c 73 75 62 3e 33 33 3c 2f 73  sub>*b<sub>33</s
71d0: 75 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 34 34 3c  ub> +..a<sub>44<
71e0: 2f 73 75 62 3e 2a 62 3c 73 75 62 3e 34 33 3c 2f  /sub>*b<sub>43</
71f0: 73 75 62 3e 29 3c 2f 74 64 3e 0d 0a 3c 74 64 3e  sub>)</td>..<td>
7200: 28 61 3c 73 75 62 3e 34 31 3c 2f 73 75 62 3e 2a  (a<sub>41</sub>*
7210: 62 3c 73 75 62 3e 31 34 3c 2f 73 75 62 3e 20 2b  b<sub>14</sub> +
7220: 20 0d 0a 61 3c 73 75 62 3e 34 32 3c 2f 73 75 62   ..a<sub>42</sub
7230: 3e 2a 62 3c 73 75 62 3e 32 34 3c 2f 73 75 62 3e  >*b<sub>24</sub>
7240: 20 2b 20 0d 0a 61 3c 73 75 62 3e 34 33 3c 2f 73   + ..a<sub>43</s
7250: 75 62 3e 2a 62 3c 73 75 62 3e 33 34 3c 2f 73 75  ub>*b<sub>34</su
7260: 62 3e 20 2b 0d 0a 61 3c 73 75 62 3e 34 34 3c 2f  b> +..a<sub>44</
7270: 73 75 62 3e 2a 62 3c 73 75 62 3e 34 34 3c 2f 73  sub>*b<sub>44</s
7280: 75 62 3e 29 3c 2f 74 64 3e 3c 74 64 3e 2f 3c 2f  ub>)</td><td>/</
7290: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 2f 74 61 62 6c  td></tr>..</tabl
72a0: 65 3e 0d 0a 3c 2f 74 64 3e 3c 2f 74 72 3e 3c 2f  e>..</td></tr></
72b0: 74 61 62 6c 65 3e 0d 0a 3c 68 33 3e 69 64 65 6e  table>..<h3>iden
72c0: 74 69 74 79 20 6d 61 74 72 69 78 3c 2f 68 33 3e  tity matrix</h3>
72d0: 0d 0a 41 6e 20 69 64 65 6e 74 69 74 79 20 6d 61  ..An identity ma
72e0: 74 72 69 78 20 73 69 6d 70 6c 79 20 63 6f 72 72  trix simply corr
72f0: 65 73 70 6f 6e 64 73 20 74 6f 20 61 6e 20 61 66  esponds to an af
7300: 66 69 6e 65 20 74 72 61 6e 73 66 6f 72 6d 61 74  fine transformat
7310: 69 6f 6e 20 6c 61 63 6b 69 6e 67 20 61 6e 79 20  ion lacking any 
7320: 61 63 74 75 61 6c 20 65 66 66 65 63 74 3a 20 61  actual effect: a
7330: 74 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65  t the end of the
7340: 20 70 72 6f 63 65 73 73 20 74 68 65 20 74 72 61   process the tra
7350: 6e 73 66 6f 72 6d 65 64 20 67 65 6f 6d 65 74 72  nsformed geometr
7360: 79 20 77 69 6c 6c 20 62 65 20 65 78 61 63 74 6c  y will be exactl
7370: 79 20 74 68 65 20 73 61 6d 65 20 61 73 20 62 65  y the same as be
7380: 66 6f 72 65 2e 3c 62 72 3e 0d 0a 4d 6f 72 65 6f  fore.<br>..Moreo
7390: 76 65 72 20 61 6e 20 69 64 65 6e 74 69 74 79 20  ver an identity 
73a0: 6d 61 74 72 69 78 20 70 6c 61 79 73 20 61 20 73  matrix plays a s
73b0: 70 65 63 69 61 6c 20 72 6f 6c 65 20 69 6e 20 6d  pecial role in m
73c0: 75 6c 74 69 70 6c 69 63 61 74 69 6f 6e 3a 20 74  ultiplication: t
73d0: 68 65 20 72 65 73 75 6c 74 69 6e 67 20 6d 61 74  he resulting mat
73e0: 72 69 78 20 77 69 6c 6c 20 61 6c 77 61 79 73 20  rix will always 
73f0: 62 65 20 65 78 61 63 74 6c 79 20 74 68 65 20 73  be exactly the s
7400: 61 6d 65 20 6f 66 20 74 68 65 20 6f 74 68 65 72  ame of the other
7410: 20 6d 61 74 72 69 78 2e 3c 62 72 3e 0d 0a 28 3c   matrix.<br>..(<
7420: 69 3e 69 74 27 73 20 6d 6f 72 65 20 6f 72 20 6c  i>it's more or l
7430: 65 73 73 20 74 68 65 20 65 71 75 69 76 61 6c 65  ess the equivale
7440: 6e 74 20 6f 66 20 6d 75 6c 74 69 70 6c 79 69 6e  nt of multiplyin
7450: 67 20 65 2e 67 2e 20 3c 62 3e 38 2a 31 3d 38 3c  g e.g. <b>8*1=8<
7460: 2f 62 3e 20 69 6e 20 61 6e 20 6f 72 64 69 6e 61  /b> in an ordina
7470: 72 79 20 73 63 61 6c 61 72 20 6d 75 6c 74 69 70  ry scalar multip
7480: 6c 69 63 61 74 69 6f 6e 3c 2f 69 3e 29 2e 3c 62  lication</i>).<b
7490: 72 3e 3c 62 72 3e 0d 0a 3c 68 72 3e 0d 0a 3c 68  r><br>..<hr>..<h
74a0: 33 3e 42 6f 72 69 6e 67 20 53 51 4c 20 66 75 6e  3>Boring SQL fun
74b0: 63 74 69 6f 6e 73 3a 20 61 20 66 6f 72 6d 61 6c  ctions: a formal
74c0: 20 65 78 70 6c 61 6e 61 74 69 6f 6e 3c 2f 68 33   explanation</h3
74d0: 3e 0d 0a 3c 74 61 62 6c 65 20 62 6f 72 64 65 72  >..<table border
74e0: 3d 22 31 22 20 63 65 6c 6c 73 70 61 63 69 6e 67  ="1" cellspacing
74f0: 3d 22 34 22 20 63 65 6c 6c 70 61 64 64 69 6e 67  ="4" cellpadding
7500: 3d 22 38 22 20 62 67 63 6f 6c 6f 72 3d 22 23 66  ="8" bgcolor="#f
7510: 66 66 30 64 30 22 3e 0d 0a 3c 74 72 3e 3c 74 68  ff0d0">..<tr><th
7520: 20 62 67 63 6f 6c 6f 72 3d 22 23 43 33 42 30 39   bgcolor="#C3B09
7530: 31 22 3e 53 51 4c 20 46 75 6e 63 74 69 6f 6e 3c  1">SQL Function<
7540: 2f 74 68 3e 3c 74 68 20 62 67 63 6f 6c 6f 72 3d  /th><th bgcolor=
7550: 22 23 43 33 42 30 39 31 22 3e 44 65 73 63 72 69  "#C3B091">Descri
7560: 70 74 69 6f 6e 3c 2f 74 68 3e 3c 2f 74 72 3e 0d  ption</th></tr>.
7570: 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f  .<tr><td><b>ATM_
7580: 54 72 61 6e 73 66 6f 72 6d 20 28 20 42 4c 4f 42  Transform ( BLOB
7590: 20 47 65 6f 6d 65 74 72 79 20 2c 20 42 4c 4f 42   Geometry , BLOB
75a0: 20 41 54 2d 6d 61 74 72 69 78 20 29 20 3a 20 42   AT-matrix ) : B
75b0: 4c 4f 42 20 47 65 6f 6d 65 74 72 79 3c 2f 74 64  LOB Geometry</td
75c0: 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75 72 6e  ><td>Will return
75d0: 20 61 20 6e 65 77 20 47 65 6f 6d 65 74 72 79 20   a new Geometry 
75e0: 62 79 20 61 70 70 6c 79 69 6e 67 20 61 6e 20 41  by applying an A
75f0: 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61  ffine Transforma
7600: 74 69 6f 6e 20 74 6f 20 74 68 65 20 69 6e 70 75  tion to the inpu
7610: 74 20 47 65 6f 6d 65 74 72 79 2e 3c 62 72 3e 0d  t Geometry.<br>.
7620: 0a 54 68 65 20 6f 75 74 70 75 74 20 47 65 6f 6d  .The output Geom
7630: 65 74 72 79 20 77 69 6c 6c 20 70 72 65 73 65 72  etry will preser
7640: 76 65 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20  ve the original 
7650: 53 52 49 44 2c 20 64 69 6d 65 6e 73 69 6f 6e 73  SRID, dimensions
7660: 20 61 6e 64 20 74 79 70 65 2e 3c 62 72 3e 0d 0a   and type.<br>..
7670: 4e 55 4c 4c 20 77 69 6c 6c 20 62 65 20 72 65 74  NULL will be ret
7680: 75 72 6e 65 64 20 6f 6e 20 69 6e 76 61 6c 69 64  urned on invalid
7690: 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e   arguments.</td>
76a0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c  </tr>..<tr><td><
76b0: 62 3e 41 54 4d 5f 49 73 56 61 6c 69 64 20 28 20  b>ATM_IsValid ( 
76c0: 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 29  BLOB AT-matrix )
76d0: 20 3a 20 42 4f 4f 4c 45 41 4e 3c 2f 74 64 3e 3c   : BOOLEAN</td><
76e0: 74 64 3e 57 69 6c 6c 20 63 68 65 63 6b 20 69 66  td>Will check if
76f0: 20 61 20 42 4c 4f 42 20 64 6f 20 72 65 61 6c 6c   a BLOB do reall
7700: 79 20 63 6f 72 72 65 73 70 6f 6e 64 20 74 6f 20  y correspond to 
7710: 61 6e 20 65 6e 63 6f 64 65 64 20 41 66 66 69 6e  an encoded Affin
7720: 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  e Transformation
7730: 20 4d 61 74 72 69 78 20 74 68 65 6e 20 72 65 74   Matrix then ret
7740: 75 72 6e 69 6e 67 20 54 52 55 45 20 6f 72 20 46  urning TRUE or F
7750: 41 4c 53 45 2e 3c 62 72 3e 0d 0a 2d 31 20 77 69  ALSE.<br>..-1 wi
7760: 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64 20 69  ll be returned i
7770: 66 20 74 68 65 20 61 72 67 75 6d 65 6e 74 20 69  f the argument i
7780: 73 6e 27 74 20 6f 66 20 74 68 65 20 42 4c 4f 42  sn't of the BLOB
7790: 20 74 79 70 65 2e 3c 2f 74 64 3e 3c 2f 74 72 3e   type.</td></tr>
77a0: 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d  ..<tr><td><b>ATM
77b0: 5f 41 73 54 65 78 74 20 28 20 42 4c 4f 42 20 41  _AsText ( BLOB A
77c0: 54 2d 6d 61 74 72 69 78 20 29 20 3a 20 54 45 58  T-matrix ) : TEX
77d0: 54 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72  T</td><td>Will r
77e0: 65 74 75 72 6e 20 61 20 74 65 78 74 20 73 65 72  eturn a text ser
77f0: 69 61 6c 69 7a 65 64 20 72 65 70 72 65 73 65 6e  ialized represen
7800: 74 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 4d 61  tation of the Ma
7810: 74 72 69 78 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20  trix.<br>..NULL 
7820: 77 69 6c 6c 20 62 65 20 72 65 74 75 72 6e 65 64  will be returned
7830: 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 67 75   on invalid argu
7840: 6d 65 6e 74 73 2e 3c 2f 74 64 3e 3c 2f 74 72 3e  ments.</td></tr>
7850: 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d  ..<tr><td><b>ATM
7860: 5f 4d 75 6c 74 69 70 6c 79 20 28 20 42 4c 4f 42  _Multiply ( BLOB
7870: 20 41 54 2d 6d 61 74 72 69 78 2d 41 20 2c 20 42   AT-matrix-A , B
7880: 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 2d 42 20  LOB AT-matrix-B 
7890: 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72  ) : BLOB AT-matr
78a0: 69 78 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20  ix</td><td>Will 
78b0: 6d 75 6c 74 69 70 6c 79 20 4d 61 74 72 69 78 2d  multiply Matrix-
78c0: 42 20 62 79 20 4d 61 74 72 69 78 2d 41 20 74 68  B by Matrix-A th
78d0: 65 6e 20 72 65 74 75 72 6e 69 6e 67 20 74 68 65  en returning the
78e0: 20 72 65 73 75 6c 74 69 6e 67 20 4d 61 74 72 69   resulting Matri
78f0: 78 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 77 69 6c  x.<br>..NULL wil
7900: 6c 20 62 65 20 72 65 74 75 72 6e 65 64 20 6f 6e  l be returned on
7910: 20 69 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e   invalid argumen
7920: 74 73 2e 3c 68 72 3e 0d 0a 3c 75 3e 4e 6f 74 65  ts.<hr>..<u>Note
7930: 3c 2f 75 3e 3a 20 74 68 65 20 74 72 61 6e 73 66  </u>: the transf
7940: 6f 72 6d 61 74 69 6f 6e 20 64 65 66 69 6e 65 64  ormation defined
7950: 20 62 79 20 4d 61 74 72 69 78 2d 41 20 28 6c 65   by Matrix-A (le
7960: 66 74 20 6f 70 65 72 61 6e 64 29 20 77 69 6c 6c  ft operand) will
7970: 20 61 6c 77 61 79 73 20 68 61 70 70 65 6e 20 3c   always happen <
7980: 75 3e 61 66 74 65 72 3c 2f 75 3e 20 61 70 70 6c  u>after</u> appl
7990: 79 69 6e 67 20 61 6c 6c 20 74 72 61 6e 73 66 6f  ying all transfo
79a0: 72 6d 61 74 69 6f 6e 73 20 64 65 66 69 6e 65 64  rmations defined
79b0: 20 62 79 20 4d 61 74 72 69 78 2d 42 20 28 72 69   by Matrix-B (ri
79c0: 67 68 74 20 6f 70 65 72 61 6e 64 29 2e 3c 2f 74  ght operand).</t
79d0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 68  d></tr>..<tr><th
79e0: 20 63 6f 6c 73 70 61 6e 3d 22 32 22 20 62 67 63   colspan="2" bgc
79f0: 6f 6c 6f 72 3d 22 23 46 30 45 36 38 43 22 20 61  olor="#F0E68C" a
7a00: 6c 69 67 6e 3d 22 63 65 6e 74 65 72 22 3e 53 51  lign="center">SQ
7a10: 4c 20 66 75 6e 63 74 69 6f 6e 73 20 63 72 65 61  L functions crea
7a20: 74 69 6e 67 20 61 6e 64 20 69 6e 69 74 69 61 6c  ting and initial
7a30: 69 7a 69 6e 67 20 61 20 6e 65 77 20 41 66 66 69  izing a new Affi
7a40: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f  ne Transformatio
7a50: 6e 20 4d 61 74 72 69 78 3c 2f 74 68 3e 3c 2f 74  n Matrix</th></t
7a60: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41  r>..<tr><td><b>A
7a70: 54 4d 5f 43 72 65 61 74 65 20 28 20 76 6f 69 64  TM_Create ( void
7a80: 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74   ) : BLOB AT-mat
7a90: 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e  rix</b></td><td>
7aa0: 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 49  Will return an I
7ab0: 64 65 6e 74 69 74 79 20 41 66 66 69 6e 65 20 54  dentity Affine T
7ac0: 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61  ransformation Ma
7ad0: 74 72 69 78 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20  trix.<br>..NULL 
7ae0: 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63  if any error occ
7af0: 75 72 73 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a  urs.</td></tr>..
7b00: 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 43  <tr><td><b>ATM_C
7b10: 72 65 61 74 65 20 28 20 64 6f 75 62 6c 65 20 61  reate ( double a
7b20: 20 2c 20 64 6f 75 62 6c 65 20 62 20 2c 20 64 6f   , double b , do
7b30: 75 62 6c 65 20 64 20 2c 20 64 6f 75 62 6c 65 20  uble d , double 
7b40: 65 20 2c 20 64 6f 75 62 6c 65 20 78 6f 66 66 20  e , double xoff 
7b50: 2c 20 64 6f 75 62 6c 65 20 79 6f 66 66 20 29 20  , double yoff ) 
7b60: 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78  : BLOB AT-matrix
7b70: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c  </b></td><td>Wil
7b80: 6c 20 72 65 74 75 72 6e 20 61 20 32 44 20 41 66  l return a 2D Af
7b90: 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74  fine Transformat
7ba0: 69 6f 6e 20 4d 61 74 72 69 78 20 69 6e 69 74 69  ion Matrix initi
7bb0: 61 6c 69 7a 65 64 20 77 69 74 68 20 65 78 70 6c  alized with expl
7bc0: 69 63 69 74 20 76 61 6c 75 65 73 2e 3c 62 72 3e  icit values.<br>
7bd0: 0d 0a 4e 55 4c 4c 20 69 66 20 61 6e 79 20 65 72  ..NULL if any er
7be0: 72 6f 72 20 6f 63 63 75 72 73 20 6f 72 20 6f 6e  ror occurs or on
7bf0: 20 69 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e   invalid argumen
7c00: 74 73 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c  ts.</td></tr>..<
7c10: 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 43 72  tr><td><b>ATM_Cr
7c20: 65 61 74 65 20 28 20 64 6f 75 62 6c 65 20 61 20  eate ( double a 
7c30: 2c 20 64 6f 75 62 6c 65 20 62 20 2c 20 64 6f 75  , double b , dou
7c40: 62 6c 65 20 63 20 2c 20 64 6f 75 62 6c 65 20 64  ble c , double d
7c50: 20 2c 20 64 6f 75 62 6c 65 20 65 20 2c 20 64 6f   , double e , do
7c60: 75 62 6c 65 20 66 20 2c 20 64 6f 75 62 6c 65 20  uble f , double 
7c70: 67 20 2c 20 64 6f 75 62 6c 65 20 68 20 2c 20 64  g , double h , d
7c80: 6f 75 62 6c 65 20 69 20 2c 20 64 6f 75 62 6c 65  ouble i , double
7c90: 20 78 6f 66 66 20 2c 20 64 6f 75 62 6c 65 20 79   xoff , double y
7ca0: 6f 66 66 20 2c 20 64 6f 75 62 6c 65 20 64 6f 75  off , double dou
7cb0: 62 6c 65 20 7a 6f 66 66 20 29 20 3a 20 42 4c 4f  ble zoff ) : BLO
7cc0: 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c  B AT-matrix</b><
7cd0: 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74  /td><td>Will ret
7ce0: 75 72 6e 20 61 20 33 44 20 41 66 66 69 6e 65 20  urn a 3D Affine 
7cf0: 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d  Transformation M
7d00: 61 74 72 69 78 20 69 6e 69 74 69 61 6c 69 7a 65  atrix initialize
7d10: 64 20 77 69 74 68 20 65 78 70 6c 69 63 69 74 20  d with explicit 
7d20: 76 61 6c 75 65 73 2e 3c 62 72 3e 0d 0a 4e 55 4c  values.<br>..NUL
7d30: 4c 20 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f  L if any error o
7d40: 63 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61  ccurs or on inva
7d50: 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f  lid arguments.</
7d60: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74  td></tr>..<tr><t
7d70: 64 3e 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 54  d><b>ATM_CreateT
7d80: 72 61 6e 73 6c 61 74 65 20 28 20 64 6f 75 62 6c  ranslate ( doubl
7d90: 65 20 74 78 20 2c 20 64 6f 75 62 6c 65 20 74 79  e tx , double ty
7da0: 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74   ) : BLOB AT-mat
7db0: 72 69 78 3c 2f 62 3e 3c 62 72 3e 0d 0a 3c 62 3e  rix</b><br>..<b>
7dc0: 41 54 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c  ATM_CreateTransl
7dd0: 61 74 65 20 28 20 64 6f 75 62 6c 65 20 74 78 20  ate ( double tx 
7de0: 2c 20 64 6f 75 62 6c 65 20 74 79 20 2c 20 64 6f  , double ty , do
7df0: 75 62 6c 65 20 74 7a 20 29 20 3a 20 42 4c 4f 42  uble tz ) : BLOB
7e00: 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c 2f   AT-matrix</b></
7e10: 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74 75  td><td>Will retu
7e20: 72 6e 20 61 6e 20 41 66 66 69 6e 65 20 54 72 61  rn an Affine Tra
7e30: 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72  nsformation Matr
7e40: 69 78 20 69 6e 69 74 69 61 6c 69 7a 65 64 20 72  ix initialized r
7e50: 65 73 70 65 63 74 69 76 65 6c 79 20 61 73 20 61  espectively as a
7e60: 20 32 44 20 6f 72 20 33 44 20 54 72 61 6e 73 6c   2D or 3D Transl
7e70: 61 74 65 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69  ate.<br>..NULL i
7e80: 66 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63 75  f any error occu
7e90: 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64  rs or on invalid
7ea0: 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e   arguments.</td>
7eb0: 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c  </tr>..<tr><td><
7ec0: 62 3e 41 54 4d 5f 43 72 65 61 74 65 53 63 61 6c  b>ATM_CreateScal
7ed0: 65 20 28 20 64 6f 75 62 6c 65 20 73 78 20 2c 20  e ( double sx , 
7ee0: 64 6f 75 62 6c 65 20 73 79 20 29 20 3a 20 42 4c  double sy ) : BL
7ef0: 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e  OB AT-matrix</b>
7f00: 3c 62 72 3e 0d 0a 3c 62 3e 41 54 4d 5f 43 72 65  <br>..<b>ATM_Cre
7f10: 61 74 65 53 63 61 6c 65 20 28 20 64 6f 75 62 6c  ateScale ( doubl
7f20: 65 20 73 78 20 2c 20 64 6f 75 62 6c 65 20 73 79  e sx , double sy
7f30: 20 2c 20 64 6f 75 62 6c 65 20 73 7a 20 29 20 3a   , double sz ) :
7f40: 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c   BLOB AT-matrix<
7f50: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c  /b></td><td>Will
7f60: 20 72 65 74 75 72 6e 20 61 6e 20 41 66 66 69 6e   return an Affin
7f70: 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  e Transformation
7f80: 20 4d 61 74 72 69 78 20 69 6e 69 74 69 61 6c 69   Matrix initiali
7f90: 7a 65 64 20 72 65 73 70 65 63 74 69 76 65 6c 79  zed respectively
7fa0: 20 61 73 20 61 20 32 44 20 6f 72 20 33 44 20 53   as a 2D or 3D S
7fb0: 63 61 6c 65 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20  cale.<br>..NULL 
7fc0: 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63  if any error occ
7fd0: 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69  urs or on invali
7fe0: 64 20 61 72 67 75 6d 65 6e 74 73 2e 2e 3c 2f 74  d arguments..</t
7ff0: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
8000: 3e 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 52 6f  ><b>ATM_CreateRo
8010: 74 61 74 65 20 28 20 64 6f 75 62 6c 65 20 61 6e  tate ( double an
8020: 67 6c 65 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d  gle ) : BLOB AT-
8030: 6d 61 74 72 69 78 3c 2f 62 3e 3c 62 72 3e 0d 0a  matrix</b><br>..
8040: 3c 62 3e 41 54 4d 5f 43 72 65 61 74 65 5a 52 6f  <b>ATM_CreateZRo
8050: 6c 6c 20 28 20 64 6f 75 62 6c 65 20 61 6e 67 6c  ll ( double angl
8060: 65 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61  e ) : BLOB AT-ma
8070: 74 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64  trix</b></td><td
8080: 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20  >Will return an 
8090: 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d  Affine Transform
80a0: 61 74 69 6f 6e 20 4d 61 74 72 69 78 20 69 6e 69  ation Matrix ini
80b0: 74 69 61 6c 69 7a 65 64 20 61 73 20 52 6f 74 61  tialized as Rota
80c0: 74 69 6f 6e 20 61 72 6f 75 6e 64 20 74 68 65 20  tion around the 
80d0: 5a 20 61 78 69 73 2e 3c 62 72 3e 0d 0a 4e 55 4c  Z axis.<br>..NUL
80e0: 4c 20 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f  L if any error o
80f0: 63 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61  ccurs or on inva
8100: 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 68  lid arguments.<h
8110: 72 3e 0d 0a 54 68 65 20 61 6e 67 6c 65 20 69 73  r>..The angle is
8120: 20 61 6c 77 61 79 73 20 65 78 70 65 63 74 65 64   always expected
8130: 20 74 6f 20 62 65 20 6d 65 61 73 75 72 65 64 20   to be measured 
8140: 69 6e 20 64 65 63 69 6d 61 6c 20 64 65 67 72 65  in decimal degre
8150: 65 73 2e 20 54 68 65 20 64 69 72 65 63 74 69 6f  es. The directio
8160: 6e 20 6f 66 20 72 6f 74 61 74 69 6f 6e 20 69 73  n of rotation is
8170: 20 64 65 66 69 6e 65 64 20 73 75 63 68 20 74 68   defined such th
8180: 61 74 20 70 6f 73 69 74 69 76 65 20 61 6e 67 6c  at positive angl
8190: 65 73 20 72 6f 74 61 74 65 20 69 6e 20 74 68 65  es rotate in the
81a0: 20 64 69 72 65 63 74 69 6f 6e 20 66 72 6f 6d 20   direction from 
81b0: 74 68 65 20 70 6f 73 69 74 69 76 65 20 58 20 61  the positive X a
81c0: 78 69 73 20 74 6f 77 61 72 64 20 74 68 65 20 70  xis toward the p
81d0: 6f 73 69 74 69 76 65 20 59 20 61 78 69 73 2e 20  ositive Y axis. 
81e0: 57 69 74 68 20 74 68 65 20 64 65 66 61 75 6c 74  With the default
81f0: 20 61 78 69 73 20 6f 72 69 65 6e 74 61 74 69 6f   axis orientatio
8200: 6e 20 20 70 6f 73 69 74 69 76 65 20 61 6e 67 6c  n  positive angl
8210: 65 73 20 72 6f 74 61 74 65 20 69 6e 20 61 20 63  es rotate in a c
8220: 6f 75 6e 74 65 72 63 6c 6f 63 6b 77 69 73 65 20  ounterclockwise 
8230: 64 69 72 65 63 74 69 6f 6e 2e 3c 68 72 3e 0d 0a  direction.<hr>..
8240: 3c 75 3e 4e 6f 74 65 3c 2f 75 3e 3a 20 74 68 69  <u>Note</u>: thi
8250: 73 20 69 73 20 74 68 65 20 75 6e 69 71 75 65 20  s is the unique 
8260: 72 6f 74 61 74 69 6f 6e 20 61 6c 6c 6f 77 65 64  rotation allowed
8270: 20 6f 6e 20 61 20 70 75 72 65 6c 79 20 32 44 20   on a purely 2D 
8280: 70 6c 61 6e 65 2e 3c 2f 74 64 3e 3c 2f 74 72 3e  plane.</td></tr>
8290: 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41 54 4d  ..<tr><td><b>ATM
82a0: 5f 43 72 65 61 74 65 58 52 6f 6c 6c 20 28 20 64  _CreateXRoll ( d
82b0: 6f 75 62 6c 65 20 61 6e 67 6c 65 20 29 20 3a 20  ouble angle ) : 
82c0: 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f  BLOB AT-matrix</
82d0: 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20  b></td><td>Will 
82e0: 72 65 74 75 72 6e 20 61 6e 20 41 66 66 69 6e 65  return an Affine
82f0: 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20   Transformation 
8300: 4d 61 74 72 69 78 20 69 6e 69 74 69 61 6c 69 7a  Matrix initializ
8310: 65 64 20 61 73 20 52 6f 74 61 74 69 6f 6e 20 61  ed as Rotation a
8320: 72 6f 75 6e 64 20 74 68 65 20 58 20 61 78 69 73  round the X axis
8330: 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61  .<br>..NULL if a
8340: 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20  ny error occurs 
8350: 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72  or on invalid ar
8360: 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e 3c 2f 74  guments.</td></t
8370: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41  r>..<tr><td><b>A
8380: 54 4d 5f 43 72 65 61 74 65 59 52 6f 6c 6c 20 28  TM_CreateYRoll (
8390: 20 64 6f 75 62 6c 65 20 61 6e 67 6c 65 20 29 20   double angle ) 
83a0: 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78  : BLOB AT-matrix
83b0: 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c  </b></td><td>Wil
83c0: 6c 20 72 65 74 75 72 6e 20 61 6e 20 41 66 66 69  l return an Affi
83d0: 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f  ne Transformatio
83e0: 6e 20 4d 61 74 72 69 78 20 69 6e 69 74 69 61 6c  n Matrix initial
83f0: 69 7a 65 64 20 61 73 20 52 6f 74 61 74 69 6f 6e  ized as Rotation
8400: 20 61 72 6f 75 6e 64 20 74 68 65 20 59 20 61 78   around the Y ax
8410: 69 73 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66  is.<br>..NULL if
8420: 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72   any error occur
8430: 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20  s or on invalid 
8440: 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e 3c  arguments.</td><
8450: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 68 20 63 6f  /tr>..<tr><th co
8460: 6c 73 70 61 6e 3d 22 32 22 20 62 67 63 6f 6c 6f  lspan="2" bgcolo
8470: 72 3d 22 23 46 30 45 36 38 43 22 20 61 6c 69 67  r="#F0E68C" alig
8480: 6e 3d 22 63 65 6e 74 65 72 22 3e 53 51 4c 20 66  n="center">SQL f
8490: 75 6e 63 74 69 6f 6e 73 20 73 75 70 70 6f 72 74  unctions support
84a0: 69 6e 67 20 63 68 61 69 6e 69 6e 67 20 74 77 6f  ing chaining two
84b0: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72   Affine Transfor
84c0: 6d 61 74 69 6f 6e 20 4d 61 74 72 69 63 65 73 3c  mation Matrices<
84d0: 2f 74 68 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c  /th></tr>..<tr><
84e0: 74 64 3e 3c 62 3e 41 54 4d 5f 54 72 61 6e 73 6c  td><b>ATM_Transl
84f0: 61 74 65 20 28 20 64 6f 75 62 6c 65 20 74 78 20  ate ( double tx 
8500: 2c 20 64 6f 75 62 6c 65 20 74 79 20 2c 20 42 4c  , double ty , BL
8510: 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 29 20 3a  OB AT-matrix ) :
8520: 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c   BLOB AT-matrix<
8530: 2f 62 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 54 4d 5f  /b><br>..<b>ATM_
8540: 54 72 61 6e 73 6c 61 74 65 20 28 20 64 6f 75 62  Translate ( doub
8550: 6c 65 20 74 78 20 2c 20 64 6f 75 62 6c 65 20 74  le tx , double t
8560: 79 20 2c 20 64 6f 75 62 6c 65 20 74 7a 20 2c 20  y , double tz , 
8570: 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 20 29  BLOB AT-matrix )
8580: 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69   : BLOB AT-matri
8590: 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69  x</b></td><td>Wi
85a0: 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 41 66 66  ll return an Aff
85b0: 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69  ine Transformati
85c0: 6f 6e 20 4d 61 74 72 69 78 20 62 79 20 63 68 61  on Matrix by cha
85d0: 69 6e 69 6e 67 20 72 65 73 70 65 63 74 69 76 65  ining respective
85e0: 6c 79 20 61 20 32 44 20 6f 72 20 33 44 20 54 72  ly a 2D or 3D Tr
85f0: 61 6e 73 6c 61 74 65 20 61 6e 64 20 61 6e 6f 74  anslate and anot
8600: 68 65 72 20 41 66 66 69 6e 65 20 54 72 61 6e 73  her Affine Trans
8610: 66 6f 72 6d 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a  formation.<br>..
8620: 4e 55 4c 4c 20 69 66 20 61 6e 79 20 65 72 72 6f  NULL if any erro
8630: 72 20 6f 63 63 75 72 73 20 6f 72 20 6f 6e 20 69  r occurs or on i
8640: 6e 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 73  nvalid arguments
8650: 2e 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72  .</td></tr>..<tr
8660: 3e 3c 74 64 3e 3c 62 3e 41 54 4d 5f 53 63 61 6c  ><td><b>ATM_Scal
8670: 65 20 28 20 64 6f 75 62 6c 65 20 73 78 20 2c 20  e ( double sx , 
8680: 64 6f 75 62 6c 65 20 73 79 20 2c 20 42 4c 4f 42  double sy , BLOB
8690: 20 41 54 2d 6d 61 74 72 69 78 20 29 20 3a 20 42   AT-matrix ) : B
86a0: 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62  LOB AT-matrix</b
86b0: 3e 3c 62 72 3e 0d 0a 3c 62 3e 41 54 4d 5f 53 63  ><br>..<b>ATM_Sc
86c0: 61 6c 65 20 28 20 64 6f 75 62 6c 65 20 73 78 20  ale ( double sx 
86d0: 2c 20 64 6f 75 62 6c 65 20 73 79 20 2c 20 64 6f  , double sy , do
86e0: 75 62 6c 65 20 73 7a 20 2c 20 42 4c 4f 42 20 41  uble sz , BLOB A
86f0: 54 2d 6d 61 74 72 69 78 20 29 20 3a 20 42 4c 4f  T-matrix ) : BLO
8700: 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e 3c  B AT-matrix</b><
8710: 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c 20 72 65 74  /td><td>Will ret
8720: 75 72 6e 20 61 6e 20 41 66 66 69 6e 65 20 54 72  urn an Affine Tr
8730: 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 20 4d 61 74  ansformation Mat
8740: 72 69 78 20 62 79 20 63 68 61 69 6e 69 6e 67 20  rix by chaining 
8750: 72 65 73 70 65 63 74 69 76 65 6c 79 20 61 20 32  respectively a 2
8760: 44 20 6f 72 20 33 44 20 53 63 61 6c 65 20 61 6e  D or 3D Scale an
8770: 64 20 61 6e 6f 74 68 65 72 20 41 66 66 69 6e 65  d another Affine
8780: 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e 2e   Transformation.
8790: 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66 20 61 6e  <br>..NULL if an
87a0: 79 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 6f  y error occurs o
87b0: 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20 61 72 67  r on invalid arg
87c0: 75 6d 65 6e 74 73 2e 2e 3c 2f 74 64 3e 3c 2f 74  uments..</td></t
87d0: 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 62 3e 41  r>..<tr><td><b>A
87e0: 54 4d 5f 52 6f 74 61 74 65 20 28 20 64 6f 75 62  TM_Rotate ( doub
87f0: 6c 65 20 61 6e 67 6c 65 20 2c 20 42 4c 4f 42 20  le angle , BLOB 
8800: 41 54 2d 6d 61 74 72 69 78 20 29 20 3a 20 42 4c  AT-matrix ) : BL
8810: 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c 2f 62 3e  OB AT-matrix</b>
8820: 3c 62 72 3e 0d 0a 3c 62 3e 41 54 4d 5f 5a 52 6f  <br>..<b>ATM_ZRo
8830: 6c 6c 20 28 20 64 6f 75 62 6c 65 20 61 6e 67 6c  ll ( double angl
8840: 65 20 2c 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72  e , BLOB AT-matr
8850: 69 78 20 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d  ix ) : BLOB AT-m
8860: 61 74 72 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74  atrix</b></td><t
8870: 64 3e 57 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e  d>Will return an
8880: 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72   Affine Transfor
8890: 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 20 62 79  mation Matrix by
88a0: 20 63 68 61 69 6e 69 6e 67 20 61 20 52 6f 74 61   chaining a Rota
88b0: 74 69 6f 6e 20 61 72 6f 75 6e 64 20 74 68 65 20  tion around the 
88c0: 5a 20 61 78 69 73 20 61 6e 64 20 61 6e 6f 74 68  Z axis and anoth
88d0: 65 72 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66  er Affine Transf
88e0: 6f 72 6d 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 4e  ormation.<br>..N
88f0: 55 4c 4c 20 69 66 20 61 6e 79 20 65 72 72 6f 72  ULL if any error
8900: 20 6f 63 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e   occurs or on in
8910: 76 61 6c 69 64 20 61 72 67 75 6d 65 6e 74 73 2e  valid arguments.
8920: 3c 2f 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e  </td></tr>..<tr>
8930: 3c 74 64 3e 3c 62 3e 41 54 4d 5f 58 52 6f 6c 6c  <td><b>ATM_XRoll
8940: 20 28 20 64 6f 75 62 6c 65 20 61 6e 67 6c 65 20   ( double angle 
8950: 29 20 3a 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72  ) : BLOB AT-matr
8960: 69 78 3c 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57  ix</b></td><td>W
8970: 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 41 66  ill return an Af
8980: 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74  fine Transformat
8990: 69 6f 6e 20 4d 61 74 72 69 78 20 62 79 20 63 68  ion Matrix by ch
89a0: 61 69 6e 69 6e 67 20 61 20 52 6f 74 61 74 69 6f  aining a Rotatio
89b0: 6e 20 61 72 6f 75 6e 64 20 74 68 65 20 58 20 61  n around the X a
89c0: 78 69 73 20 61 6e 64 20 61 6e 6f 74 68 65 72 20  xis and another 
89d0: 41 66 66 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d  Affine Transform
89e0: 61 74 69 6f 6e 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c  ation.<br>..NULL
89f0: 20 69 66 20 61 6e 79 20 65 72 72 6f 72 20 6f 63   if any error oc
8a00: 63 75 72 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c  curs or on inval
8a10: 69 64 20 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74  id arguments.</t
8a20: 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64  d></tr>..<tr><td
8a30: 3e 3c 62 3e 41 54 4d 5f 59 52 6f 6c 6c 20 28 20  ><b>ATM_YRoll ( 
8a40: 64 6f 75 62 6c 65 20 61 6e 67 6c 65 20 29 20 3a  double angle ) :
8a50: 20 42 4c 4f 42 20 41 54 2d 6d 61 74 72 69 78 3c   BLOB AT-matrix<
8a60: 2f 62 3e 3c 2f 74 64 3e 3c 74 64 3e 57 69 6c 6c  /b></td><td>Will
8a70: 20 72 65 74 75 72 6e 20 61 6e 20 41 66 66 69 6e   return an Affin
8a80: 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69 6f 6e  e Transformation
8a90: 20 4d 61 74 72 69 78 20 62 79 20 63 68 61 69 6e   Matrix by chain
8aa0: 69 6e 67 20 61 20 52 6f 74 61 74 69 6f 6e 20 61  ing a Rotation a
8ab0: 72 6f 75 6e 64 20 74 68 65 20 59 20 61 78 69 73  round the Y axis
8ac0: 20 61 6e 64 20 61 6e 6f 74 68 65 72 20 41 66 66   and another Aff
8ad0: 69 6e 65 20 54 72 61 6e 73 66 6f 72 6d 61 74 69  ine Transformati
8ae0: 6f 6e 2e 3c 62 72 3e 0d 0a 4e 55 4c 4c 20 69 66  on.<br>..NULL if
8af0: 20 61 6e 79 20 65 72 72 6f 72 20 6f 63 63 75 72   any error occur
8b00: 73 20 6f 72 20 6f 6e 20 69 6e 76 61 6c 69 64 20  s or on invalid 
8b10: 61 72 67 75 6d 65 6e 74 73 2e 3c 2f 74 64 3e 3c  arguments.</td><
8b20: 2f 74 72 3e 0d 0a 3c 74 72 3e 3c 74 64 3e 3c 2f  /tr>..<tr><td></
8b30: 74 64 3e 3c 74 64 3e 0d 0a 3c 75 3e 4e 6f 74 65  td><td>..<u>Note
8b40: 3c 2f 75 3e 3a 20 61 6c 6c 20 74 68 65 20 61 62  </u>: all the ab
8b50: 6f 76 65 20 66 75 6e 63 74 69 6f 6e 73 20 73 69  ove functions si
8b60: 6d 70 6c 79 20 61 72 65 20 63 6f 6e 76 65 6e 69  mply are conveni
8b70: 65 6e 63 65 20 6d 65 74 68 6f 64 73 20 69 6e 74  ence methods int
8b80: 65 6e 64 65 64 20 74 6f 20 61 76 6f 69 64 20 61  ended to avoid a
8b90: 6e 79 20 6e 65 65 64 20 74 6f 20 72 65 70 65 61  ny need to repea
8ba0: 74 65 64 6c 79 20 63 61 6c 6c 20 3c 62 3e 41 54  tedly call <b>AT
8bb0: 4d 5f 4d 75 6c 74 69 70 6c 79 28 29 3c 2f 62 3e  M_Multiply()</b>
8bc0: 2e 0d 0a 3c 76 65 72 62 61 74 69 6d 3e 0d 0a 53  ...<verbatim>..S
8bd0: 45 4c 45 43 54 20 41 54 4d 5f 4d 75 6c 74 69 70  ELECT ATM_Multip
8be0: 6c 79 28 41 54 4d 5f 43 72 65 61 74 65 52 6f 74  ly(ATM_CreateRot
8bf0: 61 74 65 28 31 35 29 2c 20 0d 0a 20 20 20 20 20  ate(15), ..     
8c00: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41                 A
8c10: 54 4d 5f 4d 75 6c 74 69 70 6c 79 28 41 54 4d 5f  TM_Multiply(ATM_
8c20: 43 72 65 61 74 65 53 63 61 6c 65 28 31 2e 31 2c  CreateScale(1.1,
8c30: 20 31 2e 32 2c 20 31 2e 33 29 2c 20 0d 0a 20 20   1.2, 1.3), ..  
8c40: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
8c50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 41                 A
8c60: 54 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61  TM_CreateTransla
8c70: 74 65 28 31 30 2c 20 32 30 2c 20 33 30 29 29 29  te(10, 20, 30)))
8c80: 3b 0d 0a 0d 0a 53 45 4c 45 43 54 20 41 54 4d 5f  ;....SELECT ATM_
8c90: 52 6f 74 61 74 65 28 31 35 2c 20 0d 0a 20 20 20  Rotate(15, ..   
8ca0: 20 20 20 20 20 20 20 41 54 4d 5f 53 63 61 6c 65         ATM_Scale
8cb0: 28 31 2e 31 2c 20 31 2e 32 2c 20 31 2e 33 2c 0d  (1.1, 1.2, 1.3,.
8cc0: 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 41 54  .             AT
8cd0: 4d 5f 43 72 65 61 74 65 54 72 61 6e 73 6c 61 74  M_CreateTranslat
8ce0: 65 28 31 30 2c 20 32 30 2c 20 33 30 29 29 29 3b  e(10, 20, 30)));
8cf0: 0d 0a 0d 0a 53 45 4c 45 43 54 20 41 54 4d 5f 52  ....SELECT ATM_R
8d00: 6f 74 61 74 65 28 31 35 2c 20 0d 0a 20 20 20 20  otate(15, ..    
8d10: 20 20 20 20 20 20 41 54 4d 5f 53 63 61 6c 65 28        ATM_Scale(
8d20: 31 2e 31 2c 20 31 2e 32 2c 20 31 2e 33 2c 0d 0a  1.1, 1.2, 1.3,..
8d30: 20 20 20 20 20 20 20 20 20 20 20 20 20 41 54 4d               ATM
8d40: 5f 54 72 61 6e 73 6c 61 74 65 28 31 30 2c 20 32  _Translate(10, 2
8d50: 30 2c 20 33 30 2c 0d 0a 20 20 20 20 20 20 20 20  0, 30,..        
8d60: 20 20 20 20 20 20 20 20 41 54 4d 5f 43 72 65 61          ATM_Crea
8d70: 74 65 28 29 29 29 29 3b 0d 0a 3c 2f 76 65 72 62  te())));..</verb
8d80: 61 74 69 6d 3e 0d 0a 41 6c 6c 20 74 68 72 65 65  atim>..All three
8d90: 20 73 74 61 74 65 6d 65 6e 74 73 20 77 69 6c 6c   statements will
8da0: 20 72 65 74 75 72 6e 20 65 78 61 63 74 6c 79 20   return exactly 
8db0: 74 68 65 20 73 61 6d 65 20 69 64 65 6e 74 69 63  the same identic
8dc0: 61 6c 20 41 66 66 69 6e 65 20 54 72 61 6e 73 66  al Affine Transf
8dd0: 6f 72 6d 61 74 69 6f 6e 20 4d 61 74 72 69 78 3b  ormation Matrix;
8de0: 20 61 6e 79 77 61 79 20 74 68 65 20 73 65 63 6f   anyway the seco
8df0: 6e 64 20 6e 6f 74 61 74 69 6f 6e 20 69 73 20 6f  nd notation is o
8e00: 62 76 69 6f 75 73 6c 79 20 6d 6f 73 74 20 63 6f  bviously most co
8e10: 6e 63 69 73 65 20 61 6e 64 20 6d 6f 72 65 20 70  ncise and more p
8e20: 72 61 63 74 69 63 61 6c 20 74 68 61 6e 20 74 68  ractical than th
8e30: 65 20 6f 74 68 65 72 20 74 77 6f 2e 0d 0a 3c 2f  e other two...</
8e40: 74 64 3e 3c 2f 74 72 3e 0d 0a 3c 74 61 62 6c 65  td></tr>..<table
8e50: 3e 3c 62 72 3e 3c 62 72 3e 0d 0a 3c 62 3e 4e 6f  ><br><br>..<b>No
8e60: 74 65 3c 2f 62 3e 3a 20 74 68 65 20 53 51 4c 20  te</b>: the SQL 
8e70: 69 6e 74 65 72 66 61 63 65 20 73 75 70 70 6f 72  interface suppor
8e80: 74 69 6e 67 20 41 66 66 69 6e 65 20 54 72 61 73  ting Affine Tras
8e90: 66 6f 72 6d 61 74 69 6f 6e 73 20 69 73 20 64 65  formations is de
8ea0: 73 69 67 6e 65 64 20 69 6e 20 73 75 63 68 20 61  signed in such a
8eb0: 20 77 61 79 20 74 68 61 74 20 61 6e 79 20 63 6f   way that any co
8ec0: 6d 70 6c 65 78 69 74 79 20 61 6e 64 20 64 69 66  mplexity and dif
8ed0: 66 69 63 75 6c 74 79 20 72 65 71 75 69 72 65 64  ficulty required
8ee0: 20 69 6e 20 6f 72 64 65 72 20 74 6f 20 64 69 72   in order to dir
8ef0: 65 63 74 6c 79 20 68 61 6e 64 6c 65 20 63 6f 6d  ectly handle com
8f00: 70 6c 65 78 20 6d 61 74 72 69 63 69 61 6c 20 6f  plex matricial o
8f10: 70 65 72 61 74 69 6f 6e 73 20 69 73 20 63 6f 6d  perations is com
8f20: 70 6c 65 74 65 6c 79 20 68 69 64 64 65 6e 2e 3c  pletely hidden.<
8f30: 62 72 3e 0d 0a 59 6f 75 20 61 72 65 20 73 69 6d  br>..You are sim
8f40: 70 6c 79 20 72 65 71 75 69 72 65 64 20 74 6f 20  ply required to 
8f50: 63 68 61 69 6e 20 73 65 76 65 72 61 6c 20 65 6c  chain several el
8f60: 65 6d 65 6e 74 61 72 79 20 74 72 61 6e 73 66 6f  ementary transfo
8f70: 72 6d 61 74 69 6f 6e 73 2c 20 65 61 63 68 20 6f  rmations, each o
8f80: 6e 65 20 6f 66 20 74 68 65 6d 20 62 61 73 69 63  ne of them basic
8f90: 61 6c 6c 79 20 73 69 6d 70 6c 65 2c 20 69 6e 20  ally simple, in 
8fa0: 74 68 65 20 63 6f 72 72 65 63 74 20 73 65 71 75  the correct sequ
8fb0: 65 6e 63 65 20 61 6e 64 20 74 68 61 74 27 73 20  ence and that's 
8fc0: 61 62 73 6f 6c 75 74 65 6c 79 20 61 6c 6c 2e 3c  absolutely all.<
8fd0: 62 72 3e 0d 0a 3c 62 3e 41 54 4d 3c 2f 62 3e 20  br>..<b>ATM</b> 
8fe0: 53 51 4c 20 66 75 6e 63 74 69 6f 6e 73 20 77 69  SQL functions wi
8ff0: 6c 6c 20 3c 69 3e 3c 75 3e 6d 61 67 69 63 61 6c  ll <i><u>magical
9000: 6c 79 20 61 6e 64 20 73 69 6c 65 6e 74 6c 79 3c  ly and silently<
9010: 2f 75 3e 3c 2f 69 3e 20 6b 65 65 70 20 63 61 72  /u></i> keep car
9020: 65 20 6f 66 20 61 6e 79 20 6d 61 74 68 65 6d 61  e of any mathema
9030: 74 69 63 61 6c 20 63 6f 6d 70 6c 65 78 69 74 79  tical complexity
9040: 2e 3c 62 72 3e 3c 62 72 3e 20 20 0d 0a 3c 68 72  .<br><br>  ..<hr
9050: 3e 3c 62 72 3e 0d 0a 3c 61 20 68 72 65 66 3d 22  ><br>..<a href="
9060: 68 74 74 70 73 3a 2f 2f 77 77 77 2e 67 61 69 61  https://www.gaia
9070: 2d 67 69 73 2e 69 74 2f 66 6f 73 73 69 6c 2f 6c  -gis.it/fossil/l
9080: 69 62 73 70 61 74 69 61 6c 69 74 65 2f 77 69 6b  ibspatialite/wik
9090: 69 3f 6e 61 6d 65 3d 34 2e 32 2e 30 2d 64 6f 63  i?name=4.2.0-doc
90a0: 22 3e 62 61 63 6b 3c 2f 61 3e 0a 5a 20 62 38 34  ">back</a>.Z b84
90b0: 30 34 36 66 38 63 30 39 38 32 37 65 31 32 30 33  046f8c09827e1203
90c0: 38 61 61 39 33 64 35 39 34 30 64 31 32 0a        8aa93d5940d12.