Assignment One Solutions 1.5 Following the figure, the first part of this problem is straightforward. Using similar triangle, the radius of the blur is r |z 0 − ẑ 0 | z0 where r is the radius of the lens. In the figure, one half of the blur is shown as being produced by the rays: one going through the center of the lens and the other going through the lower end of the lens. Similarly, the other half of the blur can be attributed to the ray passing through the top end of the lens. Therefore, the diameter of the blur is given by d |z 0 − ẑ 0 | z0 where d is the diameter of the lens. Figure 1: The point at z is focused at z 0 where the image plane is located. Moving the image plane to ẑ 0 creates a blur. For the second part, using the thin lens equation, we have 1 1 1 fz 0 + = → z = . z0 z f z−f Let ẑl , ẑr denote the two positions at the right and left of the image plane (Figure 2) that have a blur circle with diameter , and zl , zr the corresponding positions on the right of the lens, we have 1 Figure 2: The points at zl , zr are focused at ẑl , ẑr , respectively. However, the image plane is located at z 0 and the two points will have blurs with diameter . fz ẑl = z 0 + z 0 → ẑl = (1 + ) , d d z−f fz ẑr = z 0 − z 0 → ẑr = (1 − ) . d d z−f And using the thin lens equation again, 1 1 f 1 + = → zl = , ẑl zl f 1 − ẑfl 1 1 1 f + = → zr = . ẑr zr f 1 − ẑfr This gives zl = f 1− and zr = d(z−f ) (d+)z f 1− d(z−f ) (d−)z = (d + )f z , df + z = (d − )f z . df − z The depth of field, zr − zl is zr − zl = 2df z 2 − 2df 2 z ((d − )f z)(df + z) − ((d + )f z)(df − z) = f 2 d2 − 2 z 2 f 2 d2 − 2 z 2 2 which simplifies to 2f z(z − f ) f 2 d2 d . − 2 z 2 Note that this result is different from the book’s result (which gives z+f instead of z − f ). A moment of thought will convince us that the book’s result is impossible since it implies that D > 0 whenever z > −f . That is, D could be positive even when the image plane is placed on the other side of the lens. 2.8 In the un-skewed camera, the two basis vectors on the image plane are e1 = (1, 0), e2 = (0, 1). In the skewed camera, the basis vectors are e01 = (1, 0), e02 = (cos(θ), sin(θ)). Clearly, e01 = e1 and e02 = cos(θ)e1 + sin(θ)e2 . Let v be an arbitrary vector. Suppose in the un-skewed frame, we have v = (vx , vy ) = vx e1 + vy e2 The same vector in the skewed frame is given as v = (vx0 , vy0 )skewed = vx0 e01 + vy0 e02 = (vx0 + vy0 cos(θ))e1 + vy0 sin(θ)e2 Equating the two equations above, we immediately have vy0 = vy , sin(θ) and vx0 = vx − cot(θ)vy . 2.12 Suppose M is the matrix that transforms from frame A to frame B, xB = MxA . Both xB and xA are in homogeneous coordinates. If ΠA is the homogeneous coordinate vector of a plane Π, we have ΠA · xA = 0. 3 In the equations above, we have assumed that xA , xB are column vectors while ΠA , ΠB are row vectors. From this, it is then clear that ΠB must be ΠA M−1 since ΠB · xB = ΠA M−1 MxA = ΠA · xA = 0. 3.1 Using Lagrange multipliers, the new function to minimize is L(x, λ) = |Ux|2 − λ(|Vx|2 − 1) = xt U t Ux − λ(xt V t Vx − 1). Setting zeros to the derivatives of L with respect to x gives U t Ux − λV t Vx = 0, or U t Ux = λV t Vx. (1) That is, the vector x that minimizes |Ux|2 under the constraint |Vx|2 = 1 must be a generalized eigenvector. We note that the generalized eigenvalues are all non-negative for any generalized eigenvector x: since xt U t Ux = λxt V t Vx and both xt U t Ux, xt V t Vx are non-negative, which implies that λ cannot be negative. Now we show that the solution vector x must correspond to the smallest eigenvalue. This is easy to show. Since x must be a generalized eigenvector, Equation 1 must hold and also xt V t Vx = 1. These two immediately imply that |Ux|2 = xt U t Ux = λ. That is, the solution vector must correspond to the smallest eigenvalue. 3.5 The matrix for rotating about the z-axis by an angle α is Mz,α cos(α) − sin(α) 0 = sin(α) cos(α) 0 , 0 0 1 4 and about the y-axis by an angle β is cos(β) 0 sin(β) 0 1 0 My,β = − sin(β) 0 cos(β) Multiplying the three matrices Mz,γ My,β Mz,α yields the desired matrix. 3.6 First, we note that the projection of x onto the u-axis is u · x. Second, the two vectors, v = x − (u · x)u and w = u × x, are orthogonal to each other and also orthogonal to the rotation axis u. Third, the magnitude of v is equal to that of w because |w| = |x| sin(α) and |v| is also |x| sin(α) (α is the angle between x and u). Figure 3: The vector x and three orthogonal basis vectors, e1 , e2 , e3 . The projection of x onto e1 is vector v = x − (u · x)u, and its magnitude is equal to the magnitude of the vector x × u. Now the three vectors u, v, w are mutually orthogonal and we can define a new orthonormal coordinates system using these three vectors (normalized) as shown in Figure 3: e1 = v/|v|, e2 = w/|w|, e3 = u. The point of using this new coordinates system is represented by a very simple matrix cos(θ) − sin(θ) Mθ = sin(θ) cos(θ) 0 0 5 that the given rotation R is 0 0 . 1 The vector x in this new coordinates system is (|x−(u·x)u|, 0, u·x) = (|w|, 0, u· x). Applying R, we have (cos(θ)|w|, sin(θ)|w|, u · x). This vector is cos(θ)|w|e1 + sin(θ)|w|e2 + (u · x)e3 = cos(θ)v + sin(θ)w + (u · x)u. Plug in the vectors w and v, we have R(x) = cos(θ)x + sin(θ)u × x + (1 − cos(θ))(u · x)u. 6
© Copyright 2026 Paperzz