0% found this document useful (0 votes)
6 views2 pages

AOE 5404 Homework 3: Due On Feb. 12, 2025

The document outlines Homework 3 for AOE 5404, due on February 12, 2025, consisting of three problems. Problem 1 involves identifying ill-conditioned matrices and calculating their condition numbers, while Problem 2 focuses on creating a Hilbert matrix and solving perturbed systems. Problem 3 requires developing a program for particle-plane collision detection using the Möller-Trumbore algorithm and includes verification through test cases.

Uploaded by

celin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

AOE 5404 Homework 3: Due On Feb. 12, 2025

The document outlines Homework 3 for AOE 5404, due on February 12, 2025, consisting of three problems. Problem 1 involves identifying ill-conditioned matrices and calculating their condition numbers, while Problem 2 focuses on creating a Hilbert matrix and solving perturbed systems. Problem 3 requires developing a program for particle-plane collision detection using the Möller-Trumbore algorithm and includes verification through test cases.

Uploaded by

celin
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

AOE 5404 Homework 3

Due on Feb. 12, 2025

Problem 1 [1 pt]: (Heath Review Question 2.61, modified) Which one(s) of the following matrices is(are) ill-
conditioned? Why?
10 −10
�10 0 �, �10 0 �, �1010 0 �, �1 2

0 10−10 0 10−10 0 1010 2 4 + 10−10
Calculate the condition number of each matrix in 2-norm either by hand or using a built-in function (e.g., cond(…) in
MATLAB or numpy.linalg.cond(…) in Python).

Problem 2 (Heath Prob 2.6, modified) [3 pts]:


(1) Create the 10 × 10 Hilbert matrix (https://en.wikipedia.org/wiki/Hilbert_matrix). This will be your matrix 𝑨𝑨.
Calculate its condition number in 2-norm. (You may use a build-in function in Matlab or Python.)
(2) Let 𝒙𝒙 = [1, 1, 1, … , 1, 1]𝑇𝑇 , and 𝒃𝒃 = 𝑨𝑨𝑨𝑨. (𝑨𝑨 is still the 10 × 10 Hilbert matrix.) Using either your own program or
a built-in function in MATLAB/Python/C++, solve the following two slightly perturbed systems:
a. (𝑨𝑨 + 𝑬𝑬)𝒙𝒙
� = 𝒃𝒃, where
10−6 0 ⋯ 0 0
⎛ 0 0 0 0⎞
𝑬𝑬 = ⎜ ⋮ ⋱ ⋮ ⎟;
0 0 0 0

⎝ 0 0 0 0⎠
� = 𝒃𝒃 + Δ𝒃𝒃, where Δ𝒃𝒃 = [10−6 , 0, 0, … , 0, 0]𝑇𝑇 .
b. 𝑨𝑨𝒙𝒙
(3) Compare the solution of each perturbed system with the solution of the original system (i.e., 𝑨𝑨𝑨𝑨 = 𝒃𝒃). Describe
and explain your observations.

Problem 3 [6 pts]: Particle-Plane Collision. Many engineering problems


require determining if a moving particle will collide with a planar surface, and if
so, when and where. The motion of a particle traveling at a constant speed along
a straight line is given by
𝑿𝑿(𝑡𝑡) = 𝑶𝑶 + 𝑡𝑡𝑫𝑫,
where 𝑡𝑡 denotes time, 𝑶𝑶 ∈ 𝑅𝑅 3 is the particle’s initial position at 𝑡𝑡 = 0, and 𝑫𝑫 ∈
𝑅𝑅 3 is the velocity vector. A plane in 3D is uniquely determined by any three
non-collinear points on the plane. Let 𝑽𝑽𝟏𝟏 , 𝑽𝑽𝟐𝟐 , 𝑽𝑽𝟑𝟑 ∈ 𝑅𝑅 3 be three points that define
the planar surface in consideration.
A popular method for finding particle-plane collisions is the Möller-Trumbore algorithm [1], which essential just requires
solving a linear system,
𝑡𝑡
[−𝑫𝑫, 𝑽𝑽𝟐𝟐 − 𝑽𝑽𝟏𝟏 , 𝑽𝑽𝟑𝟑 − 𝑽𝑽𝟏𝟏 ] �𝑢𝑢� = 𝑶𝑶 − 𝑽𝑽𝟏𝟏 .
𝑣𝑣
It can be proven that the system is non-singular if and only if the particle’s velocity vector is not parallel to the plane. The
solution 𝑡𝑡 gives the time of collision. If 𝑡𝑡 > 0, collision occurs. 𝑢𝑢, 𝑣𝑣 give the point of collision:
𝑷𝑷 = (1 − 𝑢𝑢 − 𝑣𝑣)𝑽𝑽𝟏𝟏 + 𝑢𝑢𝑽𝑽𝟐𝟐 + 𝑣𝑣𝑽𝑽𝟑𝟑 .
(1) Develop a program that solves the above linear system using Gauss elimination with row pivoting. The program
should take 𝑶𝑶, 𝑫𝑫, 𝑽𝑽𝟏𝟏 , 𝑽𝑽𝟐𝟐 , 𝑽𝑽𝟑𝟑 as input, and output 𝑡𝑡 and 𝑷𝑷. In addition, if the particle travels in parallel to the plane,
the program should print a message (e.g., “no collision”) to the screen. Verify your code with
0 0 0 1 0
𝑶𝑶 = �0� , 𝑫𝑫 = �1� , 𝑽𝑽1 = �2� , 𝑽𝑽2 = �2� , 𝑽𝑽3 = �2�.
0 0 0 0 1
That is, first find the true solution by hand. Then, show that the result of your program matches the true solution.
(2) Design at least two other test cases to verify your code. One of them should have a particle travelling in parallel to
the plane.
(3) Describe the way you detect particles travelling in parallel to the plane.

[1] Tomas Möller and Ben Trumboro, “Fast, minimum storage ray-triangle intersection,” Journal of Graphics Tools, 2(1):21-28, 1997.

You might also like