I'm working on solar system simulation and I need to implement centripetal acceleration. The problem is I don't know how it looks like in vector form. I mean I have these formulas:
Velocity $$ velocity.x = initialVelocity.x + (acceleration.x * motionTime.x)\\ velocity.y = initialVelocity.y + (acceleration.y * motionTime.y)\\ velocity.z = initialVelocity.z + (acceleration.z * motionTime.z) $$
Position $$ position.x = initialPosition.x + ((initialVelocity.x * motionTime.x) + (acceleration.x * (motionTime.x * motionTime.x) * 0.5f))\\(...) $$
I'm looking for similiar form for centripetal acceleration. Now I have: $$ acceleration.x = ((velocity.x * velocity.x) / distance) * direction.x\\(...) $$ But it doesn't work. Could you help me?