Write the parametric form of the unit circle

Assignment Help Data Structure & Algorithms
Reference no: EM13801949

1) Write the parametric form of a ray with source p and direction d.

2) Assuming d in the above ray is a unit vector, write an algorithm that, for an arbitrary non-negative integer n, generates n evenly spaced points along the ray at 1 unit intervals.

3) Write the parametric form of the unit circle.

4) Given an arbitrary positive integer n, write an algorithm that generates n evenly spaced points that are sampled along the unit circle.

5) Suppose you have access to the functions scale(sx, sy), translate(tx, ty), and rotate(α) which generate the corresponding 2D homogeneous transformation matrices. Using these functions, write the expression of a transformation T such that if p lies on the unit circle, Tp will lie on an ellipse centered at c, with a major radius r1, minor radius r2 and rotated at an angle of α. You do not have to compute the full matrix. You may leave it expressed using the above functions. Hint: remember that order is important and that operations associate from the "inside out".

6) Write the implicit form of the unit sphere.

7) Given an arbitrary point p, write a test to determine if p is inside the unit sphere.

8) Suppose you are given an affine transformation T that maps the unit sphere to some arbitrarily located and oriented ellipsoid. Give an expression which, given an arbitrary point p, determines if p is inside said ellipsoid. Hint: use the result from the previous exercise.

9) You are given the vertices of a convex polygon in the 2D plane in counter-clockwise order as (p1, ..., pn). The coordinates of vertex pi are (xi, yi).

695_img9..png

9a) Give an expression for the coordinates of the outward-facing normal ni of the edge connecting pi and pi+1.

9b) Let q = (xq, yq) be an arbitrary point on the plane containing the given polygon. Let l be the line containing pi and pi+1, and let ni be the outward-facing normal vector as given in part a). What is a test that determines whether or not q lies on the outward side of l (the side toward which ni points)?

9c)  Provide an algorithm that determines whether a 2D point q is inside, outside, or on the boundary of the given polygon. Hint: Each edge is contained in an infinite line. Each infinite line divides the 2D plane into two half-planes: the "left" half-plane and the "right" half-plane (left and right are defined with respect to a counter-clockwise direction of traversal of the vertices). The key insight you should use is that the interior of a convex polygon is the intersection of the left half-planes of each edge of the polygon.

10) In stereo rendering, two cameras are needed, with slightly different vantage points and view directions; each is used to render an image for the corresponding eye. This can be specified with the following parameters:

• c: The center of interest, a point in world space that lies along the optical axis of both cameras.

• em: The midpoint between the eye positions of each camera.

• t: An "up" vector that allows us to specify a tilt rotation about the axis passing through c and em. The z axis is a special case.

• s: The distance between the two eyes.

All answers should be given in terms of the above stereo parameters, as well as any intermediate quantities you specify.

2132_img10.png

10a) Given an expression for the unit vector d that is perpendicular to both t and c - em such that (c - em, t, d) is a right-handed coordinate frame.

10b) Give expressions for eL and eR, the eye positions of each camera.

10c) Give expressions for the basis vectors that make up the two cameras' coordinate frames: (uL, vL, wL) and (uR, vR, wR)

10d) Give a test that determines whether or not a polygon face with normal n is a back face that can be culled when rendering from both cameras.

11) This illustration shows a top-down view of a 3D scene where each blue edge corresponds to a planar square perpendicular to the image plane (i.e. coming out of the page) and the eye e of a possible viewpoint lies in the image plane. The short vectors are normal vectors.

1502_img11.png


11a) Assuming the particular scene and camera placement shown above, is it possible to exclude any polygons from rendering? Explain your answer.

11b) Draw the BSP tree for the above scene that would result from adding the polygons to the tree in the order (S1, S2, S3, S4, S5, S6).

11c) Describe how your tree will be traversed when rendering the scene from the eye location specified.

Reference no: EM13801949

Questions Cloud

Indicate whether the f is statistically significant : 14. For each of the following F values, indicate whether the F is statistically significant at the specified alpha level: a. F = 4.80, df = 4, 40 α = 0.01 b. F = 5.02, df = 3, 60, α = 0.001 c. F = 3.45, df = 3, 27, α = 0.05 d. F = 4.99, df = 2, 150, ..
Suppose an investment analyst takes a random sample of us : a) Suppose an investment analyst takes a random sample of U.S equity mutual funds and calculates Sharp Ratio. The sample size is 100, and the average sharp ratio is 0.45. The sample has a standard deviation of 0.30. Calculate and interpret the 90 per..
Analyze the government''s role in protection of environment : Analyze the government's role in the protection of the environment. Be sure that your analysis includes a look at one of the following: conservation, environmentalism, protection, global warming, and energy concerns. How has the regulation of one ..
The federal government : A new motorcycle is being developed to meet new gas mileage standards recently passed by the federal government. An engineer tested three model designs by randomly assigning the motorcycles in a blind study (the riders recorded the mileage but did no..
Write the parametric form of the unit circle : Write the parametric form of the unit circle. Given an arbitrary positive integer n, write an algorithm that generates n evenly spaced points that are sampled along the unit circle
Intervention promotes efficiency and equity in the economy : Discuss how government intervention promotes efficiency and equity in the economy. Be sure that you include restraint of trade, indirect costs, deregulation, and overregulation within your analysis.
What are the implications associated with abuse and neglect : What are the implications associated with abuse and neglect.
Calculate the correlation matrix for this problem carry out : a) Kahn and Rudd (1995) examined whether historical performance predicts future performance for a sample of mutual funds that included 300 actively managed U.S. domestic equity funds. One approach they used involved calculating each funds' exposure t..
Social insurance programs and public assistance programs : Discuss the differences that exist between social insurance programs and public assistance programs. What is your opinion regarding how far the government should go in providing assistance to those who need these programs

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Ford-fulkerson algorithm on capacities

Write code that finds a maximum flow in a directed graph, using the Ford-Fulkerson algorithm on capacities given as matrix void maximum flow(

  Describe a dynamic programming algorithm

Let Fi(x) = i * (1+log x). Describe a dynamic programming algorithm to input 2 integers x and m and determine how to break x into m integers x1, x2, ..., Xm such that f1(x1) + f2(x2)+----+fm(Xm) is the largest among all possible ways of breaking x..

  Describe and analyze an algorithm

Describe and analyze an algorithm to determine, given the initial sequence of cards, the maximum number of points that you can collect playing against a perfect opponent.

  Portfolio planning using optimization

Set this problem up as a linear programming model in Excel, and use Solver to determine how the $10 million should be invested. What is the overall return (in dollars terms)

  Create an algorithm to produce list of customers

Create an algorithm to produce list of customers from Glad Rags Clothing Company's customer master file. Each record on customer master file contains the customer's number

  Algorithm-find schedule to obtain maximum amount of profit

Give an algorithm to find schedule which obtains maximum amount of profit, assuming that all processing times are integers between 1 and n.

  Designing an algorithm for task-array of person numbers

You have been allotted task of designing an algorithm for following task. Someone has built the array of person numbers of all n students enrolled in 331 this fall.

  Compare the array-based and link-based implementations

Compare the array-based and link-based implementations of the ADT bag operation

  Create algorithm to read arbitrary number of data record

Create the algorithm to read arbitrary number of data records, each containing name, age, and code. Code of 1 will indicate female, a code of 2 will indicate male.

  Define a structure type

Define a structure type to represent a single CD. The year must be stored as an integer, all other fields should be strings. Because memory space will be an issue you may not assume a length for the string fields, but must dynamically allocate app..

  Quality building supply qbs has proposed a project to

quality building supply qbs has proposed a project to develop a business system. the project team has gathered the

  Efficient algorithm for computing single-source

Give an efficient algorithm for computing single-source shortest paths in an undirected graph G for which edge weights are 1 or 2. Describe all data structures needed to support your algorithm. What is the runtime of your algorithm?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd