
-----------------------------------
FeZbOy
Fri Jun 03, 2005 10:12 am

Understanding Velocity.
-----------------------------------
I need help understanding velocity. There are alot of programs that use the velocity, and i need help to expand my knowledge and help me create a realistic program that uses a velocity part.

Thanks in advance.

-----------------------------------
StarGateSG-1
Fri Jun 03, 2005 11:12 am


-----------------------------------
Look in tutorial I am sure there is something about it there.

-----------------------------------
Tony
Sat Jun 04, 2005 1:00 pm


-----------------------------------
Velocity is a vector.

a Vector is a quantaty that has a magnitude and direction. Such as force. As in the force of gravity has a magnitude of mg and a direction of vertically down.

Similary velocity has a magnitude of speed (how fast your object is moving) and a direction (which was your object is moving).

-----------------------------------
FeZbOy
Sat Jun 04, 2005 8:12 pm


-----------------------------------
Velocity is a vector.

a Vector is a quantaty that has a magnitude and direction. Such as force. As in the force of gravity has a magnitude of mg and a direction of vertically down.

Similary velocity has a magnitude of speed (how fast your object is moving) and a direction (which was your object is moving).


Ok, i understand that. Now how do i incorparate this into a turing program?

-----------------------------------
lyam_kaskade
Sat Jun 04, 2005 9:16 pm


-----------------------------------
Hmmm...intuition. Heh.
But seriously, just use variables to represent them.


vel_x = 1
vel_y = 1

loop
x+=vel_x
y+=vel_y
drawobject  (x,y)
end loop


If you want to change the direction that the object moves in, just change the velocity. Or if you want to try something really complicated, for example, projectile motion:


vel_y= xcomponent of Power of shot
vel_x= xcomponent of Power of shot
time=0

loop
time+=1
x= vel_x * time
y= vel_y *time - 9.81*time**2
drawdot (x,y)
exit when y