motion of a particle along arbitrary 3D curved path ???

The motion of a particle should follow physics law, it should not move in motion of a particle along arbitrary 3D curved path.
Provide your physics model for your case: i.e. describe your case in detail.

Normally, you need to provide the initial condition for the particle (x,y,z,vx,vy,vz)
and give evolution equation for the particle. (e.g. dx/dt=vx,dy/dt=vy,dz/dt=vz, dvz/dt=-g)
Then EJS will generate new simulation for your case.

You can check out many examples at this web site, find the one similar to your case, download EJS xml file (or download EJS jar file, run it and select open ejs model when right click).
And you will be able to find out how it was done by EJS.
Please starts with examples if you are a beginner  for EJS.

Try to work on it with EJS and attached your ejs file when you encounter problem. We will try to check out your EJS source and help you!