Solar System Orbit

Hello, I have to create a Solar System, with planets and moons. I calculate the orbit with a function like year=(year+1)%360…
But this way it’s too fast. Is there some kind of function (i.e. sin&cos) to slow down the orbit? Thanks.

take in account the real time elapsed between frames.

double year
year = year + 0.01;
for(;year >= 360;)
year -= 360;


MSN : lookus.cn@gmail.com

Many thanks, now it works.