i have assignment to submit on this monday.
i don't understand what the question is,can anyone help me?

Projectile Motion
You will recall the tutorial problem in which you computed the height of a projectile
that was launched "straight up". In this case the height after t seconds is given by:
2
2
Where uo is the launch velocity in m/s and the gravitational constant g is 9.8 m/s2.
In the simulation of the motion of the projectile the movement is monitored in very
short time intervals .t. In a short time interval the velocity v is almost constant and
the distance the projectile moves can be computed as .s = v .t. The position can then
be updated by s = s + v * .t ;
The velocity changes constantly, it is reduced by the gravitational force. In a short
time interval, .v = -g .t, and the velocity must be updated as v = v – g * .t ;
In the new iteration the new velocity is used to update the distance.
However, most projectiles are not shot upright but at an angle to the horizontal. If the
starting velocity has magnitude v and the starting angle of á, then the velocity is a
vector with components vx = v cos á, vy = v sin á.
In the x-direction the velocity does not change. In the y-direction the gravitational
force has an effect. These equations presume there is no air resistance.
Write a program that will perform the simulation of a projectile that has been
launched with an initial velocity and angle. The user is to enter the initial velocity,
launch angle and the time interval.
The program will present the results in two formats. The user should be able to choose
which format to view.
1. Print the results in a table format on the screen, showing the height (y position)
and range (x position) at each time interval. Use the time interval to update the
position, but print out the position only every full second. Repeat until the
projectile has reached the ground level.
2. Plot the position of the projectile on the screen.
- Use a character display, similar to the sine wave example given earlier.
- The display should plot the x axis of the projectile on the horizontal
plane of the screen and y axis on the vertical plane of the screen.
- Hint: You could store the projectile position in a 2 dimensional array
that can represent the character positions on the screen. The contents of
the array can then be printed to the screen.


please help me.

Member Avatar for iamthwee

Pretty straight forward. You have the equations so just turn them into code.

http://en.wikipedia.org/wiki/Trajectory_of_a_projectile

Since your question assumes the projectile is launched at the horizontal you can simplify your formula to:-

d = 2\frac{v^2}{g} \sin 2 \theta

The hardest part will be showing the graph. But the clue is the 2d array bit.

Member Avatar for iamthwee

These might be more useful:-
http://en.wikipedia.org/wiki/Range_of_a_projectile?

The only other thing that I can think of that might catch you out, is that if you are using the math library you have to remember the angles are calculated in radians as opposed to degrees.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.