# Plot the curve into the xz plane with time interval

At time t ≥ 0, a new laser rocket is at the position:

Clear[P, t];
P[t_] = {6 - t + Sin[t], 10 - 2 t, 2 + 0.5 Sin[2 t]}

path = ParametricPlot3D[Evaluate[P[t]], {t, 0, 5}];
h = 6;
xzplane = Graphics3D[Polygon[{{-h, 0, 0}, {-h, 0, h}, {h, 0, h}, {h, 0, 0}}]];
threedims = Axes3D[6, 0.4];
setup = Show[threedims, path, xzplane, ViewPoint -> CMView, Boxed -> False, Axes -> None, PlotRange -> All] A laser beam emanates from the nose cone of your rocket and shoots out in a straight line tangent to the path like this:

time = 3.3;
samplebeam = Vector[P'[time], Tail -> P[time], VectorColor -> Red, ScaleFactor -> 4.5];
Show[setup, samplebeam] Note that the beam pierces the xz-plane. Imagine that the xz-plane is made of cardboard, and plot the curve burned into the xz-plane by your rocket's laser during the time interval 0 ≤ t ≤ 5.

P[t] + s P'[t]
(P[t] + s P'[t])[]
Solve[(P[t] + s P'[t])[] == 0, s]


I know that the code above helps me find what value of s makes y=0, which is when the laser hits the xz-axis and happens when s=5−t.

So your code will look like the code for the plots given in the question, but you want the entire range of time from 0 to 5 and s=5−t.

I am having trouble figuring this out.. Here is what I have tried; I took three equations above, and made t = 0.

P + s P'
lineofpath1[s_] = N[P + s P']


Did the same thing I just did above but for t = 1

P + s P'
lineofpath2[s_] = N[P + s P']


from there, I was able to get the paths.

path1 = ParametricPlot3D[P[t], {t, 0, 5}];
path2 = ParametricPlot3D[{P + s P'}, {s, 0, 4}];
path3 = ParametricPlot3D[{P + s P'}, {s, 0, 5}];
xzplane = Graphics3D[Polygon[{{-h, 0, 0}, {-h, 0, h}, {h, 0, h}, {h, 0, 0}}]];
threedims = Axes3D[6, 0.4];
setup1 = Show[threedims, path1, path2, path3, xzplane, setup, ViewPoint -> CMView, Boxed -> False, Axes -> None, PlotRange -> All] I know in the graph, the paths are tangent lines. I am trying to visualize what the laser will do. What would I do next? Why do we want a tangent line and why are we interested in them?

I tried doing tangent vectors, but I realized that we already have tangent vectors.

target[t_] =
P[t] + s P'[t] /. Solve[(P[t] + s P'[t])[] == 0, s][] //
Simplify


{1 - (-5 + t) Cos[t] + Sin[t], 0, 2 - 1. (-5. + t) Cos[2 t] + 1. Cos[t] Sin[t]}

ListAnimate[ Table[Show[{setup,
ParametricPlot3D[target[t], {t, 0, 5}, PlotStyle -> Red],
Graphics3D[{Arrow[{P[t], target[t]}]}]},
ViewPoint -> {2, 1, 1}], {t, 0, 5, .1}] 