Question: Raytracing is an algorithm that involves finding the point at which a ray (a line with a direction and an origin) intersects a curve

Raytracing is an algorithm that involves finding the point at which a ray (a line with a direction and an  

Raytracing is an algorithm that involves finding the point at which a ray (a line with a direction and an origin) intersects a curve or surface. We will consider a ray intersecting with an ellipse. The general equation for an ellipse is () + ( ) -1=0 and the equation for a ray starting from the point Po= [ro, yo] in the direction Vo = [uo, vo]. is R(t) = [ro + tuo, Yo + tvo] where t = [0, ) parameterizes the ray. In this problem we will take a = 4, b = 2, Po = [0,6], Vo = [1,-0.3]. Using your favorite root finding algorithm write a code which computes the intersection of the given ray and the ellipse and plot your results.. (a) Plug the equation for the ray, R(t), into the equation for the ellipse and analytically (with pen and paper) solve for the value of t which gives the point of intersection, call it t. (b) Perform the same calculation numerically using your favorite root finder. Report your answer to within an error of 10-6 and justify how you found the minimum number of iterations required to achieve this tolerance. Also report the point of intersection P = R(t)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image contains a problem statement that involves mathematical calculations and programming to solve a ray tracing problem Ray tracing is an algori... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!