Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
float scalar ivvector operator ivvector vector

Float scalar ivvector operator ivvector vector

44

Chapter 2 Vectors and Points

{
}

return IvVector3( a*vector.x, a*vector.y, a*vector.z );

2.2.5 Vector Length

We have mentioned that a vector is an entity with length and direction but so far haven’t provided any means of measuring or comparing these quantities in two vectors. We’ll see shortly how the dot product provides a way to compare vector directions. First, however, we’ll consider how to measure a vector’s magnitude.

We use the ∥v∥ notation to distinguish a norm from the absolute value function |a|. An example of a norm is the Manhattan distance, also called the 1 norm, which is just the sum of the absolute values of the given vector’s components:

v1 =�|vi|

u∥ = d =

x2+ y2

as shown in Figure 2.9. A similar formula is used for a vector v = (x, y, z), using the standard basis in R3:

v∥ =
(2.3)
v∥ =

v
ˆv =∥v

This sets the length of the vector to ∥v∥ · 1/v∥ or, as we desire, 1.

Figure 2.9 Length of 2D vector.

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Jamie Lewis

PageId: DOCAFCCFE6