Theme: 3D to 2D projections.
Objective: The goal of this problem is to get familiar with some methods of projection. You will construct a simple object consisting of some 3D points. You will then write code to project these points onto an image using two methods, perspective and weak perspective projection. You will then judge the accuracy of the weak perspective approximation to true perspective.
Imagine that you have a perspective camera with a focal point at (0,0,0), a focal length of 1, and an image plane equal to the z=1 plane. Let us consider an object O with four 3D co-ordinates (-1, 0, 2), (1, 0, 5), (0, 1, 4), (0, -1, 3).
a. Write a function that will take as input a set of 3D points, and returns as output a set of 2D points (π1 , π2 , π3 , π4 ) that are the projection of the 3D points with the perspective camera.
b. Write the second function to project the points using weak perspective projection (π1 , π2 , π3 , π4 ).
Note that the scale factor should be based on the average distance to all points.
c. Test these functions. Print out the figures showing the 2D projection of O using weak perspective and perspective projection. The functions: figure, plot, fill and text may be useful. Try, for example, plot(5,5,'o','LineWidth', 6), to get an idea of how to display a point in a figure so that it’s easily visible. The function axis may also be helpful. You should show both of the object and its 2D projection in the same 2D plot by using different shapes or colors. Label everything.
d. Write a function to compute the sum of square differences (SSD) between two sets of image points.
That is, for point sets: (π1 , π2 , π3 , π4 ), (π1 , π2 , π3 , π4 ), compute: ∑ |ππ − ππ | 4 2π=1 . Test it on the points generated in parts a and b.
e. Write a function to rotate the object O counter clock wise by 45 degree around the Z-axis. We call the object after rotation as R. Repeat part c and d for object R
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme