[color=blue]hi lookang,

this is joshi from India.

A very happy and full of physics new year. Hope you are doing well in life.

I am in a calculation phase of a simulation - 'motion of charge in magnetic field'. so you know that in a complex situation, such as injecting a particle into magnetic field at some angle theta, will make the particle to follow helical trajectory.

since u know that it is better to give liberty to user to orient magnetic field along any direction (i.e. not restricting it along x,y,z - axes). The same is true for velocity also.

Now all references i have referred derive equation of helix considering z-axis as its center axis for sake of simplicity and not any arbitrary axis.

So can u derive/give me a general equation of a helix (with center axis being any 3D line)?

take it as a first challenge (from my side) for our brainstorming friendship.............

chintan joshi[/color]

[b][color=red]my reply is

The equations are as above in the first post

This model is created with the following 6 equations., derivation and checked by lookang

dx/dt = vx

dy/dt = vy

dz/dt = vz

dvx/dt = q*(Ex+(vy*Bz-vz*By))/m

dvy/dt = q*(Ey+(vz*Bx-vx*Bz))/m

dvz/dt = q*(Ez+(vx*By-vy*Bx))/m[/color][/b]