This is a programming assignment. You are encouraged to work in small teams of 2-3 people, provided that each member of the team contributes substantially to the writing of the programs. Ideally, you should split the coding so you each do about equal parts, although you may organize this as you please. However, don't just latch onto a group and try to ride for free. You'll only cheat yourself. Everyone in each team should do at least some of the programming and you should all help with the debugging. All members of a team will receive the same score/grade for the assignment.
One week before the due date, I'll make test data
sets available.
You should hand in:
If you do not have access to a suitable package, please see me ASAP. I heartily recommend the book Numerical Recipes in C, from Cambridge University Press. This book has several ways to solve systems of linear equations, with varying efficiency properties. I will arrange for a copy to be placed on reserve. The following subroutine,
void solve(int n, float** A, float* b) {
int* index = (int*) malloc(n*sizeof(int));
float* d;
ludcmp(A,n,indx,&d);
lubksb(A,n,indx,b);
free indx;}
will solve the n x n system Ax = b and return the answer
in b. It will replace A with the LU decomposition of A.
(You don't need to understand this to do the homework.). The code for lubksb
and ludcmp are in Section 2.3 of my copy of the book. Anyone reading the
book is permitted to make one copy of any code in the book for his or her
own use, and it is also possible to buy a diskette with all the software
on it.
One way (not the best, but adequate) to solve the
least squares problem
where A is an m x n matrix and m > n, is to produce the n x n square system of equations
and solve for x.


and print out these values.
All numbers will be in standard floating point format (e.g., 99.9).
where n = plate number (1 or 2); [px,py,pz] = location of fiducial feature in fixture coordinates. And [u,v] = image coordinates of fiducial feature.
The last line of the file will consist of ``0,0,0,0,0<eol>''.
Write a function that accepts as input an image coordinate pair (u,v) and computes the coordinates of two points through which the ray corresponding to (u,v) passes. In particular, for (u,v) compute two points
and
on the ray passing through the detector at image (not physical) coordinate (u,v). The test data will consist of a file of image coordinates (u,v,<eol>)for which the program is to print out the ray data.