Learning velocity with vector math

Hello all, trying to learn how to use vector math and velocity position while rendering objects. The problem that I am having is that I do not understand the syntex when trying to use Equations of motions.

Vector2D Physics::dX( double dt )
{
Vector2D dX ;
Scalar delta_t = (Scalar) dt ;
Vector2D initial_velocity = velocity ;

//Then

//Update velocity
//(ii)
//Use the updated velocity and initial velocity to find dx
//(ii)
//Use dx to update position.



return dX ;
}

Last edited on
This is what i have so far
Vector2D Physics::dX( double dt )
{
Vector2D dX ;
Scalar delta_t = (Scalar) dt ;
Vector2D initial_velocity = velocity ;

Vector2D update_velocity = initial_velocity+position;

dX = update_velocity + initial_velocity * delta_t;

position = position + dX;

Vector2D final_velocity = initial_velocity + gravity * delta_t;


return dX ;
}
Last edited on
Why is no one answering plz explain??/
heres what i have since this morning still cannot get velocity to work
Vector2D Physics::dX( double dt )
{
Vector2D dX ;
Scalar delta_t = (Scalar) dt ;
Vector2D initial_velocity = velocity ;
Vector2D final_velocity = velocity + ((acceleration + gravity) * delta_t) ;
dX = velocity * delta_t +( .5 *(acceleration + gravity) * (delta_t * delta_t));
dX += position;
initial_velocity = final_velocity + (position * delta_t);

return dX ;
}
closed account (zb0S216C)
Perhaps this webpage will assist you: http://mathworld.wolfram.com/VelocityVector.html

Wazzak
Topic archived. No new replies allowed.