In the table below, you are given four points in 3D space, and you are told that they lie on a circular cylinder whose axis passes through the origin. Find a unit vector along the cylinder axis, and the radius of the cylinder, and compute . As your answer, enter
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
If r = ( x , y , z ) is a point on the cylinder, then it satisfies the equation of the cylinder given by,
r T Q r = R 2
The symmetric matrix Q = I − u u T , where u is a unit vector along the axis of the cylinder, and R is the radius of the cylinder.
Vector u can be parameterized using two angles θ and ϕ , as follows:
u = ( sin θ cos ϕ , sin θ sin ϕ , cos θ )
Our parameter vector is therefore 3-dimensional: x = ( θ , ϕ , R 2 )
And for i = 1 , 2 , . . . , 4 , we want
f i = r i T Q r i − R 2 = 0
One possible numerical method to solve these equations is the Newton-Raphson multivariate method that requires the computation of the Jacobian of the function vector f . This can be computed exactly by explicit analytical differentiation of f i , or approximately by numerical differentiation. An initial guess of the parameter vector x 0 is made, and iteratively new approximations of the solution are obtained by the Newton-Raphson multivariate recursive formula
x k + 1 = x k − J k − 1 f k
Note that since the dimension of the unknowns vector is 3 , we have to limit the number of equations to 3 , or otherwise use the Penrose inverse J # of matrix J instead of the regular inverse; the formula for the Penrose (left) inverse is J # = ( J T J ) − 1 J T .
For this particular problem, it might be difficult to come up with a good initial guess, so an external loop to set the initial values for some of the parameters (for example, θ and ϕ is necessary. In my implementation, I used an external double loop to set the initial guess of θ 0 and ϕ 0 , so that I could guarantee the convergence of the Newton-Raphson iteration.
After a few initial guesses, the Newton-Raphson method converged to x ∗ = ( 0 . 6 1 0 8 6 5 2 3 8 , 0 . 9 5 9 9 3 1 0 8 9 , 1 3 . 8 0 1 2 2 5 )
So that the axis of the cylinder is given by
u = ( 0 . 3 2 8 9 8 9 9 2 8 , 0 . 4 6 9 8 4 6 3 1 , 0 . 8 1 9 1 5 2 0 4 4 )
and the radius is
R = 1 3 . 8 0 1 2 2 5 = 3 . 7 1 5 1
Therefore, S = 5 . 3 3 2 9 8 8 2 8 3 , making the answer ⌊ 1 0 0 0 × 5 . 3 3 2 9 8 8 2 8 3 ⌋ = 5 3 3 2