Ball collision time with ceiling
up vote
0
down vote
favorite
I know to to do collision time with the ground.
Here's how I calculate that: gravityY = positive 9.81
float timeToGround = (velocity.y + Sqrt(velocity.y*velocity.y + 2f * gravityY * distanceToGround)) / gravityY;
How do I calculate the collision time to the roof/ceiling based on distance and initial velocity?
float timeToRoof = ?
I don't know where to look, thanks so much for your help
math collision gravity
New contributor
add a comment |
up vote
0
down vote
favorite
I know to to do collision time with the ground.
Here's how I calculate that: gravityY = positive 9.81
float timeToGround = (velocity.y + Sqrt(velocity.y*velocity.y + 2f * gravityY * distanceToGround)) / gravityY;
How do I calculate the collision time to the roof/ceiling based on distance and initial velocity?
float timeToRoof = ?
I don't know where to look, thanks so much for your help
math collision gravity
New contributor
Hi there, welcome to SO. I think your question needs a bit of clarification: is gravityY maintained as a vector? (i.e. if it is +9.81 when falling to the ground, will it be -9.81 when rising to the roof?) What isvelocity
? Is it the initial/final velocity?
– John Law
Nov 8 at 8:52
gravity is constant, -9.81, just flipped - for simplicity. velocity is the current velocity
– Sami
Nov 8 at 10:49
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I know to to do collision time with the ground.
Here's how I calculate that: gravityY = positive 9.81
float timeToGround = (velocity.y + Sqrt(velocity.y*velocity.y + 2f * gravityY * distanceToGround)) / gravityY;
How do I calculate the collision time to the roof/ceiling based on distance and initial velocity?
float timeToRoof = ?
I don't know where to look, thanks so much for your help
math collision gravity
New contributor
I know to to do collision time with the ground.
Here's how I calculate that: gravityY = positive 9.81
float timeToGround = (velocity.y + Sqrt(velocity.y*velocity.y + 2f * gravityY * distanceToGround)) / gravityY;
How do I calculate the collision time to the roof/ceiling based on distance and initial velocity?
float timeToRoof = ?
I don't know where to look, thanks so much for your help
math collision gravity
math collision gravity
New contributor
New contributor
edited Nov 8 at 8:50
f_puras
2,18342231
2,18342231
New contributor
asked Nov 8 at 8:31
Sami
32
32
New contributor
New contributor
Hi there, welcome to SO. I think your question needs a bit of clarification: is gravityY maintained as a vector? (i.e. if it is +9.81 when falling to the ground, will it be -9.81 when rising to the roof?) What isvelocity
? Is it the initial/final velocity?
– John Law
Nov 8 at 8:52
gravity is constant, -9.81, just flipped - for simplicity. velocity is the current velocity
– Sami
Nov 8 at 10:49
add a comment |
Hi there, welcome to SO. I think your question needs a bit of clarification: is gravityY maintained as a vector? (i.e. if it is +9.81 when falling to the ground, will it be -9.81 when rising to the roof?) What isvelocity
? Is it the initial/final velocity?
– John Law
Nov 8 at 8:52
gravity is constant, -9.81, just flipped - for simplicity. velocity is the current velocity
– Sami
Nov 8 at 10:49
Hi there, welcome to SO. I think your question needs a bit of clarification: is gravityY maintained as a vector? (i.e. if it is +9.81 when falling to the ground, will it be -9.81 when rising to the roof?) What is
velocity
? Is it the initial/final velocity?– John Law
Nov 8 at 8:52
Hi there, welcome to SO. I think your question needs a bit of clarification: is gravityY maintained as a vector? (i.e. if it is +9.81 when falling to the ground, will it be -9.81 when rising to the roof?) What is
velocity
? Is it the initial/final velocity?– John Law
Nov 8 at 8:52
gravity is constant, -9.81, just flipped - for simplicity. velocity is the current velocity
– Sami
Nov 8 at 10:49
gravity is constant, -9.81, just flipped - for simplicity. velocity is the current velocity
– Sami
Nov 8 at 10:49
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
You need to solve quadratic equation for unknown time t
h = y0 + Vy * t - g*t^2 / 2
or
g*t^2/2 - Vy*t + (h-y0) = 0 // a,b,c coefficient grouped
for known height of starting point y0, roof height h, gravity g, y-component of initial velocity Vy
wait, isn't this the exact same equation that i provided? am i missing something?
– Sami
Nov 8 at 11:22
Yes, your formula represents solution of this equation for caseh=0, y0 = distanceToGround
. You can slightly correct it for you current task (that has not been properly formulated yet)
– MBo
Nov 8 at 11:37
It's the same suvat formula, the same general principle; but you substitute ing = -9.81
(negative acceleration, instead of positive) andh - y0 = distanceToRoof
, so it's still different in some respects.
– John Law
Nov 8 at 17:27
add a comment |
up vote
0
down vote
Hehe, thanks for your help.
Here's the answer:
float timeToRoof = (-velocity.y + Sqrt(velocity.y * velocity.y + 2f * gravity.y * distanceToRoof)) / gravity.y;
- gravity.y = negative -9.81
- velocity.y = current velocity
- distanceToRoof = current distance to roof
New contributor
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You need to solve quadratic equation for unknown time t
h = y0 + Vy * t - g*t^2 / 2
or
g*t^2/2 - Vy*t + (h-y0) = 0 // a,b,c coefficient grouped
for known height of starting point y0, roof height h, gravity g, y-component of initial velocity Vy
wait, isn't this the exact same equation that i provided? am i missing something?
– Sami
Nov 8 at 11:22
Yes, your formula represents solution of this equation for caseh=0, y0 = distanceToGround
. You can slightly correct it for you current task (that has not been properly formulated yet)
– MBo
Nov 8 at 11:37
It's the same suvat formula, the same general principle; but you substitute ing = -9.81
(negative acceleration, instead of positive) andh - y0 = distanceToRoof
, so it's still different in some respects.
– John Law
Nov 8 at 17:27
add a comment |
up vote
0
down vote
accepted
You need to solve quadratic equation for unknown time t
h = y0 + Vy * t - g*t^2 / 2
or
g*t^2/2 - Vy*t + (h-y0) = 0 // a,b,c coefficient grouped
for known height of starting point y0, roof height h, gravity g, y-component of initial velocity Vy
wait, isn't this the exact same equation that i provided? am i missing something?
– Sami
Nov 8 at 11:22
Yes, your formula represents solution of this equation for caseh=0, y0 = distanceToGround
. You can slightly correct it for you current task (that has not been properly formulated yet)
– MBo
Nov 8 at 11:37
It's the same suvat formula, the same general principle; but you substitute ing = -9.81
(negative acceleration, instead of positive) andh - y0 = distanceToRoof
, so it's still different in some respects.
– John Law
Nov 8 at 17:27
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You need to solve quadratic equation for unknown time t
h = y0 + Vy * t - g*t^2 / 2
or
g*t^2/2 - Vy*t + (h-y0) = 0 // a,b,c coefficient grouped
for known height of starting point y0, roof height h, gravity g, y-component of initial velocity Vy
You need to solve quadratic equation for unknown time t
h = y0 + Vy * t - g*t^2 / 2
or
g*t^2/2 - Vy*t + (h-y0) = 0 // a,b,c coefficient grouped
for known height of starting point y0, roof height h, gravity g, y-component of initial velocity Vy
answered Nov 8 at 8:54
MBo
44.7k22847
44.7k22847
wait, isn't this the exact same equation that i provided? am i missing something?
– Sami
Nov 8 at 11:22
Yes, your formula represents solution of this equation for caseh=0, y0 = distanceToGround
. You can slightly correct it for you current task (that has not been properly formulated yet)
– MBo
Nov 8 at 11:37
It's the same suvat formula, the same general principle; but you substitute ing = -9.81
(negative acceleration, instead of positive) andh - y0 = distanceToRoof
, so it's still different in some respects.
– John Law
Nov 8 at 17:27
add a comment |
wait, isn't this the exact same equation that i provided? am i missing something?
– Sami
Nov 8 at 11:22
Yes, your formula represents solution of this equation for caseh=0, y0 = distanceToGround
. You can slightly correct it for you current task (that has not been properly formulated yet)
– MBo
Nov 8 at 11:37
It's the same suvat formula, the same general principle; but you substitute ing = -9.81
(negative acceleration, instead of positive) andh - y0 = distanceToRoof
, so it's still different in some respects.
– John Law
Nov 8 at 17:27
wait, isn't this the exact same equation that i provided? am i missing something?
– Sami
Nov 8 at 11:22
wait, isn't this the exact same equation that i provided? am i missing something?
– Sami
Nov 8 at 11:22
Yes, your formula represents solution of this equation for case
h=0, y0 = distanceToGround
. You can slightly correct it for you current task (that has not been properly formulated yet)– MBo
Nov 8 at 11:37
Yes, your formula represents solution of this equation for case
h=0, y0 = distanceToGround
. You can slightly correct it for you current task (that has not been properly formulated yet)– MBo
Nov 8 at 11:37
It's the same suvat formula, the same general principle; but you substitute in
g = -9.81
(negative acceleration, instead of positive) and h - y0 = distanceToRoof
, so it's still different in some respects.– John Law
Nov 8 at 17:27
It's the same suvat formula, the same general principle; but you substitute in
g = -9.81
(negative acceleration, instead of positive) and h - y0 = distanceToRoof
, so it's still different in some respects.– John Law
Nov 8 at 17:27
add a comment |
up vote
0
down vote
Hehe, thanks for your help.
Here's the answer:
float timeToRoof = (-velocity.y + Sqrt(velocity.y * velocity.y + 2f * gravity.y * distanceToRoof)) / gravity.y;
- gravity.y = negative -9.81
- velocity.y = current velocity
- distanceToRoof = current distance to roof
New contributor
add a comment |
up vote
0
down vote
Hehe, thanks for your help.
Here's the answer:
float timeToRoof = (-velocity.y + Sqrt(velocity.y * velocity.y + 2f * gravity.y * distanceToRoof)) / gravity.y;
- gravity.y = negative -9.81
- velocity.y = current velocity
- distanceToRoof = current distance to roof
New contributor
add a comment |
up vote
0
down vote
up vote
0
down vote
Hehe, thanks for your help.
Here's the answer:
float timeToRoof = (-velocity.y + Sqrt(velocity.y * velocity.y + 2f * gravity.y * distanceToRoof)) / gravity.y;
- gravity.y = negative -9.81
- velocity.y = current velocity
- distanceToRoof = current distance to roof
New contributor
Hehe, thanks for your help.
Here's the answer:
float timeToRoof = (-velocity.y + Sqrt(velocity.y * velocity.y + 2f * gravity.y * distanceToRoof)) / gravity.y;
- gravity.y = negative -9.81
- velocity.y = current velocity
- distanceToRoof = current distance to roof
New contributor
New contributor
answered 2 days ago
Sami
32
32
New contributor
New contributor
add a comment |
add a comment |
Sami is a new contributor. Be nice, and check out our Code of Conduct.
Sami is a new contributor. Be nice, and check out our Code of Conduct.
Sami is a new contributor. Be nice, and check out our Code of Conduct.
Sami is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53203956%2fball-collision-time-with-ceiling%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Hi there, welcome to SO. I think your question needs a bit of clarification: is gravityY maintained as a vector? (i.e. if it is +9.81 when falling to the ground, will it be -9.81 when rising to the roof?) What is
velocity
? Is it the initial/final velocity?– John Law
Nov 8 at 8:52
gravity is constant, -9.81, just flipped - for simplicity. velocity is the current velocity
– Sami
Nov 8 at 10:49