Python Programming for Biology: Bioinformatics and Beyond


Figure 9.2.  Matrix transformations of spatial coordinates, their inverses and



Download 7,75 Mb.
Pdf ko'rish
bet116/514
Sana30.12.2021
Hajmi7,75 Mb.
#91066
1   ...   112   113   114   115   116   117   118   119   ...   514
Bog'liq
[Tim J. Stevens, Wayne Boucher] Python Programming

Figure 9.2.  Matrix transformations of spatial coordinates, their inverses and

combinations. With reference to a triangle of points, various simple linear

transformations of coordinates are illustrated. Each transformation may be specified as a

matrix and applied to coordinates, specified as vectors, using matrix multiplication. For

linear transformations the application of two subsequent transformations can be

represented by a single (combined) transformation. All of these simple transformations

have inverse transformations which will restore the coordinates of the points to their

original values.

The ‘linear’ part of linear algebra refers to the fact that the fundamental characteristic of

a  coordinate  transformation  does  not  change  with  scale  (its  magnitude).  For  example,  if

you break down a transformation into two smaller parts, then it does not matter if you do

the full transformation or instead do the two smaller parts one after the other. If you rotate

a  shape  by  30°  around  some  axis  and  then  again  by  a  further  45°  around  the  same  axis,

you  get  the  same  result  as  if  you  had  instead  just  rotated  the  shape  in  one  step  by  75°

(30+45).


The  ‘algebra’  part  of  linear  algebra  refers  to  the  fact  that  different  types  of

transformation may be melded together to define a single transformation. For example, if

you  rotate  a  shape  about  one  axis  by  some  angle,  and  then  around  another  axis  by  a

different  angle,  then  there  is  a  single  equivalent  rotation  that  could  do  the  whole  job,

potentially  about  a  third  axis.  The  converse  of  combining  transformations  is  also  true

because  a  single  transformation  can  be  described  by  combinations  of  other

transformations.  This  point  leads  to  the  idea  that  transformations  may  be  reversed;  a

forward  and  corresponding  reverse  transformation  results  in  no  change.  For  example,  a

rotation about a given axis of a given angle has an opposite rotation: around the same axis

but in the opposite direction, so that if you combine both rotations it is equivalent to not

doing any rotation at all.



If you imagine a vector to represent a point in space, it is convenient to think of what

are  called  unit  vectors,  vectors  of  length  1,  as  merely  representing  directions.  The  way

linear  transformations  are  normally  described  is  in  terms  of  what  happens  to  the  unit

vectors that point directly along the coordinate axes (in a positive sense). For example, for

3D  space  we  would  consider  the  transformation  of  the  three  vectors  (1,0,0),  (0,1,0)  and

(0,0,1),  which  respectively  represent  the  unit  vectors  along  the  positive  x,  y  and  z  axes.

Because the transformation is linear, once you know how it acts on these unit vectors, you

know how it acts on any vector.

Suppose  for  a  given  transformation  operation  (1,0,0)  gets  mapped  (transformed)  to

(a,b,c),  and  (0,0,1)  gets  mapped  to  (d,e,f),  and  (0,0,1)  gets  mapped  to  (g,h,i).  Then  an

arbitrary input vector (x,y,z) gets mapped to the final vector (x′,y′,z′) via:

This  looks  pretty  horrible,  but  fortunately  computers  usually  do  the  calculations.  A  way

that you might think about what is happening above is that the x component of the input

vector  is  multiplied  by  elements  a,  b  and  c  (which  define  the  transformation),  but  each

product contributes to a different axis of the output vector; xa is added to the new x′, xb is

added to the new y′, and xc the new z′. Similarly, the y and z components have their own

multiplicative  elements  to  define  contributions  to  the  new  vector.  Thus,  overall  the

elements of the transformation (a to i)  say  how  to  combine  (multiply  and  add)  the  input

coordinates to make the output.


Download 7,75 Mb.

Do'stlaringiz bilan baham:
1   ...   112   113   114   115   116   117   118   119   ...   514




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish