There are too many file. I do not know which one to look for.

You can use trace GUI element to add one point at a time for each time step.
However, you can use polygon GUI elements to draw pre-defined number of connected points.
You just need to define x,y as array with n elements in EJS variable page.
then assign  (x[i],y[i]) with a for loop in EJS "fixed relation" page.
Add ploygin GUI element under drawingPanel2D, assign x,y  as "x/y data"  proper,
and EJS will show the polygons when you run it.  


The following code is added at initialize page
[code]
k=2*pi/L; w=2*pi/T;
for(int i=0;i<n;i++){
 x[i]=i*dx;
}
[/code]

And the following code is added at fixed relation page
[code]
for(int i=0;i<n;i++){
cta=(k*x[i]+w*t)%pi2;
if(cta>pi)y[i]=A*(1-(cta-pi)/pi);
else y[i]=cta/pi*A;
}
[/code]