Parametric formulas for ray cast question

939 Views Asked by At

I apologize if the question is elementary, I am having problems understanding if what I am doing is correct.

Write parametric formulas $x(u), y(u) $for the ray cast from the point with coordinates $(1, 2)$ through the point with coordinates $(4, 7)$. Define the domain for the parameter u.

My thought process :

Firstly, I'll use a Parametric Representation of a straight line, $P = P1 +u (P2 − P1)$ to begin.

Next, I'll sub in the values into the formula, giving me the following :

$ - x(u) = 4 +u(1−4) = 4 - 3u$

$ - y(u) = 7 +u(7−2) = 7 + 5u$

and the domain of u will be $[-∞ , ∞ ]$

Forgive me if this question seems elementary, I am not very sure if this is the correct way of answer this question, I am assuming the ray cast would be a straight line, or if I should use slope intercepts instead.

1

There are 1 best solutions below

1
On BEST ANSWER

You are incorrect because the ray is cast at $(1,2)$ so at $t=0$, it has to be there.

Find a vector in our direction:

$(4,7)-(1,2)=(3,5)$. Then use our initial point. So

$(1,2) + (3,5)t$ which models our ray.

The domain would start at $t=0$ and go to infinity. Since the ray cannot go backwards.

Note that I assumed that they ray does not stop at $(4,7)$. As the question did not indicate it and only told us that it goes through that point.