This message was edited by gautam at 2006-8-20 3:15:24
Hi,
Use the simple physics equations of motion in 2D dimensions.
s = ut + 0.5at*t
v = u + at
v*v = u*u + 2as
For projectiles make sure you take time into consideration or else you won't get the right physics results. So every time step like every second or millesecond you will get the distance to move in the next frame. And if you take a = -g(i.e -9.8 or approx -10 if working with integers) then you get the falling down effect.
: : Will anybody help me on doing or atleast giveme an equation of a projectile.
: : all i need to do is show the path of a projectile using graphics in turbo c++.
: : for this i need to have x and y values of the projectile... so i need an equation...
: : help wanted ...
: : i need to submit my project soon....
: : please.....
: :
: :
: :
: This is how I would design the universe

:
:
: while universe still is{
: for each object{
: o.x += o.dx
: o.y += o.dy
: o.z += o.dz
:
: o.dx += all forces that affect the x axis of this object
: o.dy += the same with the y
: o.dz += and z
:
: draw(o) //ok, this wouldn't exist in the universe but it
: //is required in computers
: }
: }
:
:
: If you want motion, init dx,dy,dz to the value you want.
: If you want gravity, add it in the forces section
: You don't need all the dimensions, if you're just going to program
: on the screen then just discard z
:
: Happy coding wishes
: the one and only
:
Niklas Ulvinge aka IDK
:
: