Quaternionlar ve bilgisayarda grafikte kullanımı
Yükleniyor...
Dosyalar
Tarih
item.page.authors
Süreli Yayın başlığı
Süreli Yayın ISSN
Cilt Başlığı
Yayınevi
Fen Bilimleri Enstitüsü
Özet
Son yıllarda bilgisayar teknolojisi çok büyük bir gelişme içine girmiştir. Bunun bir sonucu olarak, gerçek hayatta uygulanması güç, maliyetli ve riskli işlerin bilgisayarlar tarafından simüle edilmesi ve sonuçların hiç bir risk yaratmayacak olan bilgisayar ortamlarında incelenebilmesi fikri kabul görmeye başlamıştır. Bu ise bilgisayarda grafiğin çok büyük önem kazanmasına yol açmıştır. Bu tez çalışmasında amaç, günümüzde kullandığımız bilgisayarda grafik konusuna farklı bir bakış açısı getirerek, 1843 yılında Sir William HAMILTON tarafından ortaya atılan quaternionlar hakkında detaylı bilgi verip, bilgisayarda grafiğin hangi konusunda, ne şekilde kullanılmakta olduğunu ve daha ne şekillerde kullanılabileceğini ve hangi durumlarda ne avantaj ve dezavantajlar getireceğini araştırmaktır. Tez içersinde iki konu bilgisayarda grafiğin iki ayn konusunda quaternionların kullanımına ayrılmıştır. Bu iki konu dışında aydınlatma gibi bilgisayarda grafiğin diğer bir çok önemli konusuda da quaternionları görmek mümkündür. Ancak tez çalışması içersinde bu iki konuya değinilmiş ve ayrıca modelleme konusunda bize sağladığı avantaj ve dezavantajlar incelenmiştir. Tezin ek bölümünde quaternionların keşfini açıklayan orijinal mektuplar ile quaternion konusunda elde edilebilecek önemli kaynakların listesi verilmiştir. vıı
Computer technology has been steadily improving during the past decade. Consequently, the subject of simulizing the costly businesses with high risk factors and the idea of studying results which would not create any risks has been mutualy agreed. Thus, computer graphics has gained the important situation it has deserved in the computer world. The main purpose of this thesis is to bring a different point of view to the subject of computer graphics by giving detailed information about quaternions, and also to examine how, when and in which subject of computer graphics quaternions should be utilized. Quaternions were defined by Sir William Hamilton, while he had been stduying "expansion of complex plane to the three dimesional space" in 1843. A vector can be defined as the representative of transference through a given distance in a given direction, and quaternions as 4 a dimensional vector, which consists of one real, and three imaginary parts. The real part is a scalar, and the three imaginary numbers define a vector in three dimension. If we represent the scalar part of our quaternion q as S<7, and the vectorial part as Vq, then q can be defined as follows: q = [Sq,Vq] = Sq + Vq Quaternions can also be defined as the quotient of two vectors. This means that quaternions can be used to convert one vector to another. Let a = OA and /?' = O'B' be our two vectors lying in different planes. /?' can be moved paralel to itself until O' collides with O. Now they lie in the same plane. (Figure 1) Figure 1 a Now let our quaternion q = -. We can also write this equation as qfi = a. This means that quaternion q converts /? to a. We have defined vectors as the representative of transference through a given distance in a given direction. So q must convert the length of /? to the length of a. And also it must rotate J3 to VIII cause it coincide with a in direction. Here, a quaternion peforms two distinct operations. 1. A streching or shortening of /?, so as to make it of the same length as a. 2. A turning of /?, so as to cause it coincide it with a in direction. We have said that a quaternion has four elements. One is used to strech(or shorten), and other three to rotate it. Two angles are used to fix the plane of rotation and the other to fix the amount of rotation in that plane. The first operation is performed by the tensor of q, and the second is performed by the versor of q. The tensor and the versor parts of quaternion q are represented by lq and Uq respectively. q = TqUq a a An equality between two quaternions q = ~^, q = "^7 c311 De defined from the following considerations. 1. The vector lengths are in the same ratio. 2. The vectors are in the same or parallel planes. 3. The vectors make with each other the same angle. Both angles are the same in magnitude and direction. We have told that quaternions turn the vectors which they operate on, and both magnitude and direction of the angle can be affected. So we must define positive and negative rotations. By positive rotation with reference to an axis is meant left-handed rotation when the direction of the axis is from the plane of rotation towards the eye of a person who stands on the axis facing the plane of rotation. If the direction of the axis is regarded as from the eye towards the plane of rotation, positive rotation is righthanded. Figure 2 If ij, k be three axes at right angles to each other, with directions as indicated in the figure, then positive rotation is from / toy, fromy to k, and from k to /', relatively to axes k, i,j respectively. Let ij, k be unit vectors. The following equations defines the basic rules of geometric division and geometric multiplication. IX With the help of the equations above, we can define : / x/ = -1 J x J : = "I k x k = -1 *_? L = _i J k i k T=j 7=-J i J a Let a and /? be two coinitial vectors, and let q = - then we have H «Tor Here e is a unit vector perpendicular to a and fi. The plane of a quaternion is defined as the plane parallel to vectors. The axis of a quaternion is the vector perpendicular to its plane, and its angle is that included between two coinital vectors parallel to those of the quaternion. If this angle is 90°, the quaternion is called a right quaternion. Any two quaternions having a common plane, or parallel planes are said to be complanar. If their planes intersect they are diplanar. If the planes of several quaternions intersect in, or are parallel to, a common line, they are said to be collinear. Quaternions can be regarded as the sum of two parts, the first of which Ta Ta., - -cos^ is a scalar, and the second - rsın^ e is a vector at right angles to their a plane, whose sign depends upon the direction of rotation of the fraction -. This may be expressed symbolically in the notation a a a Ta Tar q = - = S- + V- = Sq + Yq = ~cos^ +-sm^e Ta Ta The first member is called the scalar part of the quaternion, and the second part is called the vector part of the quaternion. The versor of the vector part is a unit vector perpendicular to their plane. Let a and fi be unit vectors along OA and OB, and e be a unit perpendicular to the plane AOB as in figure 3 a=OD+DA = (cos^-/?) + (sin0-£/?) and also by definition a Therefore the distributive law applies to the multiplication of a vector by the scalar and vector components of a quaternion. We also have /?=(cos^ + sin0-£)a Since a2 = -{Taf and 01 = -(Tfif j3a = TJ3Ta(-cos0 + £sin0) aJ3= TaT7?(-cos^-£rsin^) The product of two vectors is, therefore, a quaternion. Let q be any quaternion. If Sq = 0, the vectors of which q is the quotient or product are perpendicular to each other and if S# = 0, the vectors are parallel to each other. The symbol /"", m being a positive whole number, represents a quadrantal versor used m times as an operator, the exponent denoting the number of times / is used as a quadrantal versor. By the extension of this meaning, iVm would represent a versor which produces the - th part of quadrantal rotation. Since the m angle of rotation is - - - we have m - - and therefore we can write 2 n XI The multiplication of quaternions is a distributive and associative operation. (p + q)(r + s) = pr + ps+qr + qs q{rs) = (qr)s In this thesis besides the basis quaternion concepts, subjects such as:. vector definitions and vectoral operations,. the definitions of points, lines and planes with quaternions,. the utilization of quaternions in the definition of line and plane geometry,. the definiton of plane curves such as parabola, ellipse and hyperbola in cartesian and parametric forms and in quaternion space,. the utilization of quaternions in three dimensional object rotation,. a technical information about noise smoothing for VR equipment in quaternion space,. the advantages and disadvantages of the utilization of quaternions in three dimensional modelling, and. a list of the sources which has been obtained from various papers, books and internet has been given. XIV order of the letters as in the case of vectors. The representation of versors by vector arcs is important in the theorems relating to the multiplication and division of quaternions, and may be made upon a unit sphere. _c /pA ^a \ r^'^^ Figüre 4 The versors of ali complanar quatemions are represented by arcs of the same great circle, vvhile arcs of different great circles represent the versors of diplanar quatemions which are alvvays equal. The sum ör difference of two vectors is a vector and two scalars is a scalar. Therefore the sum ör difference of two quatemions is a quaternion. The associative and commutative principles hold good for addition and subtraction of quatemions. q+r=r+q q + (r + s) = (q+r) + s in quatemion addition and subtraction, S and V and K are distributive symbols. SZ# = ZS? VEq=EVq KI<7 = ZK? Let q = Sq + Vq, q = Sq + Vq be any two quatemions then P = qr = SqSr + SqVr + SrVq + VqVr Therefore, the product of two quaternions is again a quatemion. Multiplication is only commutative if two quatemions are complanar. The tensor of the product (ör quotient) of any two quatemions is the product (ör quotient) of their tensors, and the versor of the product (ör quotient) is the product (ör quotient) of their versors. The conjugate of the product of two quaternions is the product of their conjugates in the inverted order. K(qr) = Kr-Kq viii 2_l J* The reciprocal of a quaternion q, is denoted by Rq. The product of two reciprocal quaternions is equal to positive unity, and each is equal to the quotient of unity by the other. IB R q = - - (cos^ - e sin <> ) If some vector /?' be taken complanar with ft and a, and making with a a a the same angle that ft does, TJ3 being also equal to T ft, then if q = ~z, ~jz is called the conjugate of q and is represented by Kq. Ta and therefore q + Kq = 2Sq q-Kq=2Vq a -a \fforq = -, we write --, the latter is called the opposite of q, and is represented by - q. The sum of two opposite quaternions is zero. And the ratio of two opposite quaternions is negative unity. Ta The sum of two conjugate quaternions is, therefore, always a scalar, n positive or negative as the Z.q is acute or obtuse. If Z.q - - this sum is evidently zero. If q is scalar Kq = q, and conversely if Kq = q, q is a scalar. If a, fi, y are co-initial unit vectors, their extremities will lie on the a a surface of a unit sphere(Figure 3). - being any quaternion U- turns p from the position OB to OA, and this versor may be represented by the arc BA joining the vector extremities. This arc determines the plane of the versor as also the magnitude and direction of its angle, the direction of rotation being indicated by the XII
Computer technology has been steadily improving during the past decade. Consequently, the subject of simulizing the costly businesses with high risk factors and the idea of studying results which would not create any risks has been mutualy agreed. Thus, computer graphics has gained the important situation it has deserved in the computer world. The main purpose of this thesis is to bring a different point of view to the subject of computer graphics by giving detailed information about quaternions, and also to examine how, when and in which subject of computer graphics quaternions should be utilized. Quaternions were defined by Sir William Hamilton, while he had been stduying "expansion of complex plane to the three dimesional space" in 1843. A vector can be defined as the representative of transference through a given distance in a given direction, and quaternions as 4 a dimensional vector, which consists of one real, and three imaginary parts. The real part is a scalar, and the three imaginary numbers define a vector in three dimension. If we represent the scalar part of our quaternion q as S<7, and the vectorial part as Vq, then q can be defined as follows: q = [Sq,Vq] = Sq + Vq Quaternions can also be defined as the quotient of two vectors. This means that quaternions can be used to convert one vector to another. Let a = OA and /?' = O'B' be our two vectors lying in different planes. /?' can be moved paralel to itself until O' collides with O. Now they lie in the same plane. (Figure 1) Figure 1 a Now let our quaternion q = -. We can also write this equation as qfi = a. This means that quaternion q converts /? to a. We have defined vectors as the representative of transference through a given distance in a given direction. So q must convert the length of /? to the length of a. And also it must rotate J3 to VIII cause it coincide with a in direction. Here, a quaternion peforms two distinct operations. 1. A streching or shortening of /?, so as to make it of the same length as a. 2. A turning of /?, so as to cause it coincide it with a in direction. We have said that a quaternion has four elements. One is used to strech(or shorten), and other three to rotate it. Two angles are used to fix the plane of rotation and the other to fix the amount of rotation in that plane. The first operation is performed by the tensor of q, and the second is performed by the versor of q. The tensor and the versor parts of quaternion q are represented by lq and Uq respectively. q = TqUq a a An equality between two quaternions q = ~^, q = "^7 c311 De defined from the following considerations. 1. The vector lengths are in the same ratio. 2. The vectors are in the same or parallel planes. 3. The vectors make with each other the same angle. Both angles are the same in magnitude and direction. We have told that quaternions turn the vectors which they operate on, and both magnitude and direction of the angle can be affected. So we must define positive and negative rotations. By positive rotation with reference to an axis is meant left-handed rotation when the direction of the axis is from the plane of rotation towards the eye of a person who stands on the axis facing the plane of rotation. If the direction of the axis is regarded as from the eye towards the plane of rotation, positive rotation is righthanded. Figure 2 If ij, k be three axes at right angles to each other, with directions as indicated in the figure, then positive rotation is from / toy, fromy to k, and from k to /', relatively to axes k, i,j respectively. Let ij, k be unit vectors. The following equations defines the basic rules of geometric division and geometric multiplication. IX With the help of the equations above, we can define : / x/ = -1 J x J : = "I k x k = -1 *_? L = _i J k i k T=j 7=-J i J a Let a and /? be two coinitial vectors, and let q = - then we have H «Tor Here e is a unit vector perpendicular to a and fi. The plane of a quaternion is defined as the plane parallel to vectors. The axis of a quaternion is the vector perpendicular to its plane, and its angle is that included between two coinital vectors parallel to those of the quaternion. If this angle is 90°, the quaternion is called a right quaternion. Any two quaternions having a common plane, or parallel planes are said to be complanar. If their planes intersect they are diplanar. If the planes of several quaternions intersect in, or are parallel to, a common line, they are said to be collinear. Quaternions can be regarded as the sum of two parts, the first of which Ta Ta., - -cos^ is a scalar, and the second - rsın^ e is a vector at right angles to their a plane, whose sign depends upon the direction of rotation of the fraction -. This may be expressed symbolically in the notation a a a Ta Tar q = - = S- + V- = Sq + Yq = ~cos^ +-sm^e Ta Ta The first member is called the scalar part of the quaternion, and the second part is called the vector part of the quaternion. The versor of the vector part is a unit vector perpendicular to their plane. Let a and fi be unit vectors along OA and OB, and e be a unit perpendicular to the plane AOB as in figure 3 a=OD+DA = (cos^-/?) + (sin0-£/?) and also by definition a Therefore the distributive law applies to the multiplication of a vector by the scalar and vector components of a quaternion. We also have /?=(cos^ + sin0-£)a Since a2 = -{Taf and 01 = -(Tfif j3a = TJ3Ta(-cos0 + £sin0) aJ3= TaT7?(-cos^-£rsin^) The product of two vectors is, therefore, a quaternion. Let q be any quaternion. If Sq = 0, the vectors of which q is the quotient or product are perpendicular to each other and if S# = 0, the vectors are parallel to each other. The symbol /"", m being a positive whole number, represents a quadrantal versor used m times as an operator, the exponent denoting the number of times / is used as a quadrantal versor. By the extension of this meaning, iVm would represent a versor which produces the - th part of quadrantal rotation. Since the m angle of rotation is - - - we have m - - and therefore we can write 2 n XI The multiplication of quaternions is a distributive and associative operation. (p + q)(r + s) = pr + ps+qr + qs q{rs) = (qr)s In this thesis besides the basis quaternion concepts, subjects such as:. vector definitions and vectoral operations,. the definitions of points, lines and planes with quaternions,. the utilization of quaternions in the definition of line and plane geometry,. the definiton of plane curves such as parabola, ellipse and hyperbola in cartesian and parametric forms and in quaternion space,. the utilization of quaternions in three dimensional object rotation,. a technical information about noise smoothing for VR equipment in quaternion space,. the advantages and disadvantages of the utilization of quaternions in three dimensional modelling, and. a list of the sources which has been obtained from various papers, books and internet has been given. XIV order of the letters as in the case of vectors. The representation of versors by vector arcs is important in the theorems relating to the multiplication and division of quaternions, and may be made upon a unit sphere. _c /pA ^a \ r^'^^ Figüre 4 The versors of ali complanar quatemions are represented by arcs of the same great circle, vvhile arcs of different great circles represent the versors of diplanar quatemions which are alvvays equal. The sum ör difference of two vectors is a vector and two scalars is a scalar. Therefore the sum ör difference of two quatemions is a quaternion. The associative and commutative principles hold good for addition and subtraction of quatemions. q+r=r+q q + (r + s) = (q+r) + s in quatemion addition and subtraction, S and V and K are distributive symbols. SZ# = ZS? VEq=EVq KI<7 = ZK? Let q = Sq + Vq, q = Sq + Vq be any two quatemions then P = qr = SqSr + SqVr + SrVq + VqVr Therefore, the product of two quaternions is again a quatemion. Multiplication is only commutative if two quatemions are complanar. The tensor of the product (ör quotient) of any two quatemions is the product (ör quotient) of their tensors, and the versor of the product (ör quotient) is the product (ör quotient) of their versors. The conjugate of the product of two quaternions is the product of their conjugates in the inverted order. K(qr) = Kr-Kq viii 2_l J* The reciprocal of a quaternion q, is denoted by Rq. The product of two reciprocal quaternions is equal to positive unity, and each is equal to the quotient of unity by the other. IB R q = - - (cos^ - e sin <> ) If some vector /?' be taken complanar with ft and a, and making with a a a the same angle that ft does, TJ3 being also equal to T ft, then if q = ~z, ~jz is called the conjugate of q and is represented by Kq. Ta and therefore q + Kq = 2Sq q-Kq=2Vq a -a \fforq = -, we write --, the latter is called the opposite of q, and is represented by - q. The sum of two opposite quaternions is zero. And the ratio of two opposite quaternions is negative unity. Ta The sum of two conjugate quaternions is, therefore, always a scalar, n positive or negative as the Z.q is acute or obtuse. If Z.q - - this sum is evidently zero. If q is scalar Kq = q, and conversely if Kq = q, q is a scalar. If a, fi, y are co-initial unit vectors, their extremities will lie on the a a surface of a unit sphere(Figure 3). - being any quaternion U- turns p from the position OB to OA, and this versor may be represented by the arc BA joining the vector extremities. This arc determines the plane of the versor as also the magnitude and direction of its angle, the direction of rotation being indicated by the XII
Açıklama
Tez (Yüksek Lisans) -- İstanbul Teknik Üniversitesi, Sosyal Bilimler Enstitüsü, 1997
Konusu
Bilgisayar grafikleri, Kuaterniyonlar, Computer graphics, Quaternions
