in a world where the sun always shines on the bloody tv!!
Posts
604
hi,
i am in an IT lesson at the moment and i have to create a computer model using excel, this model needs to simulate a cannon firing a cannon ball, but i need some help with the physics, i know that gravity speed is 9.8m/s and the distance the ball travel is to do with it's velocity, but i need a formula to work out the distance traveled, and i will also be changing the angle of the cannon and i want to know what the formula is for this
different angle of cannon effects the distance of the ball traveled, the velocity on this can be anything as long as it is the same.
Thanks for any help, if you don't understand what i have written sorry, mail me and i will try and re-word it
Thanks again
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
You have to apply some logic to the application of the above. In general, you calculate the time at which the vertical distance is zero (Id Est: Figure out when the object hits the ground). Use this time in a horizontal distance formula to calculate how far the object traveled before it hit the ground.
The units must be consistent. You must be careful with the signs: Usually positive for up and negative for down. Sometimes a problem requires that horizontal velocity have a sign opposite to the sign of the initial horizontal distance.
You have to do some trigonometry to deal with a cannon pointed up or down instead of horizontally. The following are applicable.
The angle must be in radians for VB Sin & Cos Functions. I am not sure about the Excel Trig Functions. To get radians, multiply degrees by Pie (3.14159 26535 89793) and divide by 180.
Live long & prosper.
The Dinosaur from prehistoric era prior to computers.
Eschew obfuscation!
If a billion people believe a foolish idea, it is still a foolish idea!
VB.net 2010 Express
64Bit & 32Bit Windows 7 & Windows XP. I run 4 operating systems on a single PC.
Originally posted by zmerlinz , i know that gravity speed is 9.8m/s
Merlin....You got something very wrong..
Gravity does not have speed.
What you mean by gravity is the effect of
Gravitational Force.
When a Body is subjected to a force it is accelerated.
This acceleartion due to gravity on a body above earth
has a average sealevel value of 9.81 m/second square.
The value of g is different at different places on earth.
9.81 is just an average value.
The value of g is different for different planets. moon
for example has a low g value of the order of 1 m/sec^2
in a world where the sun always shines on the bloody tv!!
Posts
604
cheers guys, though i am a little confused, last time i did physics i was 16 aaghhh, thanks again
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
in a world where the sun always shines on the bloody tv!!
Posts
604
Thanks Parksie, you are an absolute star, i will use that in my project, thanks once again
Though i still don't understand the physics that are involved for it, oh well.
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
Basically you have 3 pieces of information in your standard projectiles question - the displacement (which is the position, but expressed as a vector from the origin), the velocity, which is also a vector, and the acceleration, which is (you guessed it) a vector.
Do you know basic calculus? If you integrate the acceleration vector, you get the velocity vector, and if you integrate the velocity vector, you get the displacement vector.
To start off with, your acceleration vector, split into x and y components, will be [0, -0.98]. Assuming you start with the projectile at the origin, your velocity vector will be something like [v_x, v_y - 0.98t] where v_x and v_y are the horizontal and vertical components of the initial velocity, respectively.
Given an initial velocity has a speed v and an angle from the horizontal A:
v_x = v*Cos(A)
v_y = v*Sin(A)
So your velocity vector also looks like [v*Cos(A), v*Sin(A) - 0.98*t] at any time t. Note that I'm assuming t is in seconds for the acceleration due to gravity to be 0.98 m/s²
Your displacement vector gives the position of the projectile at any time t, and looks something like this: [v*Cos(A)*t, v*Sin(A)*t - 0.49*t²]
This is all assuming that the projectile starts at [0, 0].
Having said all that, I've just read what specifically you were after, and I think you only need Kedaman's equation for this
heh, i was typing my formulas when i realized you only need to substitute time so i gave that formula for range, i still like to add for the derived formulas
n
_
> [(X(k)_-X(k)init_)*t^k/k!] =0
_
k=0
as the sum of changes in position, movement, acceleration etc is 0
Use
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
in a world where the sun always shines on the bloody tv!!
Posts
604
Originally posted by parksie It was made for the coursework for Mechanics 1.
I can send the coursework itself if you need.
Yeah that will be great parksie, i may not use all of it but it will be very interesting to read
Cheers
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds
in a world where the sun always shines on the bloody tv!!
Posts
604
thanks mate. thanks a lot
Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen a angry penguin charging at them in excess of 100mph. They'd be a lot more careful about what they say if they had.
-- Linus Torvalds