{"id":42,"date":"2013-11-08T15:46:23","date_gmt":"2013-11-08T15:46:23","guid":{"rendered":"\/\/3dbym.ru\/2013\/11\/using-and-understanding-vectors\/"},"modified":"2013-11-08T15:46:23","modified_gmt":"2013-11-08T15:46:23","slug":"using-and-understanding-vectors","status":"publish","type":"post","link":"https:\/\/3dbym.ru\/2013\/11\/using-and-understanding-vectors\/","title":{"rendered":"Using and Understanding Vectors"},"content":{"rendered":"

You know all about matrices now, so you can move on to the second concept, vectors. Vectors are one-dimensional arrays of numbers. In 3D graphics and games, most vectors have two, three, or even four compo\u00adnents, one for each axis, but a vector can have as many components as needed. They can be used to represent locations, hold the direction and<\/p>\n

<\/p>\n\n\n\n\n\n
\n

1<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

tx<\/p>\n<\/td>\n

\n<\/td>\n\n

sx<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

o’<\/p>\n<\/td>\n<\/tr>\n

\n

0<\/p>\n<\/td>\n

\n

1<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

ty<\/p>\n<\/td>\n

\n<\/td>\n\n

0<\/p>\n<\/td>\n

\n

sy<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n<\/tr>\n

\n

0<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

1<\/p>\n<\/td>\n

\n

tz<\/p>\n<\/td>\n

\n<\/td>\n\n

0<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

sz<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n<\/tr>\n

\n

0<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

1<\/p>\n<\/td>\n

\n<\/td>\n\n

0<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

0<\/p>\n<\/td>\n

\n

1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n

Translation Scaling<\/a><\/p>\n

Figure 1.14 The translation and scaling matrices. The translation matrix contains an ordered pair for movement along the X, Y, and Z axes; the scaling matrix contains an ordered pair for scaling along the X, Y, and Z axes.<\/p>\n

speed of movement of an object, and are used extensively when working with physics in 3D games.<\/p>\n

A vector has both a magnitude and a direction. On paper, a vector can be drawn as an arrow. The length of the vector is its magnitude, and the arrowhead indicates the direction of the vector. In physics, you can represent the velocity of an object. The arrow points toward the direction the object was heading, and the length of the arrow indicates its speed. Figure 1.15 shows several examples of vectors.<\/p>\n\n\n
\n

\"Using<\/p>\n

Figure 1.15 A few vectors, each having its own magnitude and direction, on a two-dimensional graph. 2D, 3D, and 4D vectors are used extensively through game programming to represent character positions and movements, calculate how an object will react in an environment (physics), even store lighting information.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n

<\/p>\n

<\/p>\n","protected":false},"excerpt":{"rendered":"

You know all about matrices now, so you can move on to the second concept, vectors. Vectors are one-dimensional arrays of numbers. In 3D graphics and games, most vectors have two, three, or even four compo\u00adnents, one for each axis, but a vector can have as many components as needed. They can be used to […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/3dbym.ru\/wp-json\/wp\/v2\/posts\/42"}],"collection":[{"href":"https:\/\/3dbym.ru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/3dbym.ru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/3dbym.ru\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/3dbym.ru\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":0,"href":"https:\/\/3dbym.ru\/wp-json\/wp\/v2\/posts\/42\/revisions"}],"wp:attachment":[{"href":"https:\/\/3dbym.ru\/wp-json\/wp\/v2\/media?parent=42"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/3dbym.ru\/wp-json\/wp\/v2\/categories?post=42"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/3dbym.ru\/wp-json\/wp\/v2\/tags?post=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}