# Question:Add straight line animation to existing animation

## Question:Add straight line animation to existing animation

Maple 2018

I have this animation that displays a particle's position after reflection from a shock (the blue plane). I want to add a line that shows the particle coming in and reflecting and have them animate sequentially, but I cannot figure out how. The line should travel along the b axis, but offset in the xi axis to end where the helix begins. Here is the code for the helix animation:

restart; with(VectorCalculus); with(Student[LinearAlgebra]); with(plots);
v[i] := 145000; thetabn := (1/8)*Pi; thetavn := (1/6)*Pi; k := 10; omegac := .5;
v[b] := cos(2*thetabn)/cos(thetabn); v[g] := sin(2*thetabn)/cos(thetabn);
n := `<,>`(k*cos(thetabn), k*sin(thetabn), 0);
vr:=
[v[b]*t, v[g]*sin(omegac*t)/omegac, v[g]*cos(omegac*t)/omegac];

lambda := v[i]*cos(thetavn)/cos(thetabn);
shockplot := PlanePlot(n, caption = "", planeoptions = [colour = blue, transparency = .5], normaloptions = [shape = cylindrical_arrow, colour = red]);

t1 := textplot3d([k*cos(thetabn), k*sin(thetabn), 0, 'n'], align = above);

display(plots[animate](plot3d, [[v[b]*t, v[g]*sin(omegac*t)/omegac, v[g]*cos(omegac*t)/omegac], t = 0 .. x], x = 0 .. 6*Pi, axes = normal, colour = red, labels = ["b", zeta, xi], thickness = 2, paraminfo = false), shockplot, t1, scaling = constrained, tickmarks = [0, 0, 0]);

﻿