Simulate an orbit with orbital elements I want to simulate the orbits of the planets from our solar system. I want to use orbital elements to calculate the current position(xyz) at a time t. The simulation doesn't have to be too exact, but the initial position of the bodies should be somewhat realistic.

Doing some research on the calculation I stumbled upon the following formula:

R,X,Y,Z-Heliocentric Distances
TA - True Anomaly
N - Longitude of the Ascending Node
w - Argument of the Perihelion

R = a * (1 - e ^ 2) / (1 + e * Cos(TA))
X = R * (Cos(N) * Cos(TA + w) - Sin(N) * Sin(TA+w)*Cos(i)
Y = R * (Sin(N) * Cos(TA+w) + Cos(N) * Sin(TA+w)) * Cos(i))
Z = R * Sin(TA+w) * Sin(i)


Source: https://www.physicsforums.com/threads/calculating-elliptic-orbits-in-cartesian-coordinates.712979/

For testing purposes I calculated the true anomaly with the help of the following calculator: http://www.jgiesen.de/kepler/kepler.html
It needs the mean anomaly and eccentricity which I took from Wikipedia. Doing some more research on the mean anomaly, I now believe that the time at which I want the position will be somehow fed into the calculation of the mean anomaly along with the time of the initial position.

Can somebody clarify for me on how to correctly calculate the position at time t with the above or a different formula. With the above formula I also think I need the initial values at a specific time.

I also want to say that I am not an astronomer and I don't have a clue on how to handle the calculation or which formula to use. The result of the calculations should mimic our solar system as closely as possible.

Thanks,
Rene Hollander
As it happens, I was writing code for the exact same transformation last night using this memo as a reference. I haven't yet tested my implementation but the document is quite clear about what each step is doing, which pleased me greatly.

You'll have to understand the terminology to some degree; "epoch" means a reference time for which you have the orbital elements, and "considered epoch" means the time at which you're evaluating the position, for example. Other points requiring caution: the equations inconsistently drop subscripts; the use of the Newton-Raphson solver isn't particularly clear (i.e. how many times should it run)? Make sure you get the units right also.