Math problem

5gw

New member
Joined
Jul 28, 2020
Messages
7
There is a animation which goes from top to bottom, decreasing speed. Starts fast and ends slowly. Duration is from 0 to 1. So if it is 0.32 then visually this animation is half done.
So table is like that:
Duration = Visually done
0 = 0
0.32 = 50
1 = 100

What formula I should use to calculate another numbers both ways.

Thanks.
 
Hi.
Do you assume constant (negative) acceleration?
Are you familiar with kinematics in one dimension?
What have you tried so far?
 
Hi,

Yes, constant (negative) acceleration.
No, I am not familiar with that.
Nothing basically, have tried to google different things but didn't find anything what I could try.
 
Ok. So can I assume that this is not homework but something you need to know? You can think of two variables:1. t (time elapsed from the beginning of the animation: 0[MATH]\leqslant[/MATH]t[MATH]\leqslant[/MATH]1, in your units of time, whatever they are. 2. The length of the animation as a function of t: x(t). Are you interested also in knowing and understanding how it works? There are equations that connect the length of your animation as a function of time, the initial velocity and acceleration (negative in your case). You write the equation of motion for t=0.32 and t=1 and solve. But before I write you the equations I want to be sure this is not homework. We are supposed to help and not to do the whole thing.
 
No, this is not homework. I am app programmer, trying to implement animation and stop it in right position.
Yeah, you can write how it works, maybe also someone else can learn from that.

Also big thanks in advance.
 
You may try x(t)=v0t+[MATH]\frac{1}{2}[/MATH]at2. It is given that x(t=0.32)=50 and x(t=1)=100. You just need to substitute in the equation of x(t) and solve for v0 and a. Try to write both equations. Do you know how to solve a system of 2 equations?
 
No, don't know how to solve a system of 2 equations by heart.

Sorry, don't know how to write both equations.

Also my time is very late, the brain no longer works.
 
There are several methods to solve your system of equations.
The equations are: 50=v0[MATH]\cdot[/MATH]0.32+[MATH]\frac{1}{2}[/MATH]a[MATH]\cdot[/MATH]0.322 and
100=v0[MATH]\cdot[/MATH]1+[MATH]\frac{1}{2}[/MATH]a[MATH]\cdot[/MATH]12. From the second equation you get v0=100-a/2 . Substitute it in the second equation in order to compute a.
Finally you get: x(t)=182.8[MATH]\cdot[/MATH]t-82.8[MATH]\cdot[/MATH]t2. Note that when you substitute t=0.32 and t=1 you get what you were supposed to get. What are the units of measurement you are using? I hope it helps you.
 
Tried this final formula and seems to be working good! Thanks a lot, you saved my life!
 
So table is like that:
Duration = Visually done
0 = 0
0.32 = 50
1 = 100

You cannot set these equal to each to each other. The inputs on the left
are not equal to the outputs on the right. The inputs lead to the outputs.
If you were writing it as a function, you may write

f(0) = 0
f(0.32) = 50
f(1) = 100
 
@yoscar04 , tried to calculate also vice verca but something doesn't seems to match.

This one is if I want to calculate % using progress(used more decimal places to be more accurate):
x(t)=182.720588235294⋅t-82.7205882353⋅t2

let say progress is 0.15, so if I do calculation, % is 25.546877.
calculation: 182.720588235294⋅0.15-82.7205882353⋅0.152

and this one if I want to calculate progress using %, did system of equations and got this:
x(t)=0.0028⋅t+0.000072⋅t2

now if I use previously calculated % which is 25.546877 and calculate progress I get 0.11852154616 but it should be 0.15.
calculation: 0.0028⋅25.546877+0.000072⋅25.5468772

First system of equations: 50=x*0.32+(1/2)*a*0.322, 100=x*1+(1/2)*a*12,
for second one I just moved numbers around: 0.32=x*50+(1/2)*a*502, 1=x*100+(1/2)*a*1002

Where I am wrong or why doesn't numbers match?

Used system of equations calculator:

Big thanks!!
 
@yoscar04 , tried to calculate also vice verca but something doesn't seems to match.

This one is if I want to calculate % using progress(used more decimal places to be more accurate):
x(t)=182.720588235294⋅t-82.7205882353⋅t2

let say progress is 0.15, so if I do calculation, % is 25.546877.
calculation: 182.720588235294⋅0.15-82.7205882353⋅0.152

and this one if I want to calculate progress using %, did system of equations and got this:
x(t)=0.0028⋅t+0.000072⋅t2

now if I use previously calculated % which is 25.546877 and calculate progress I get 0.11852154616 but it should be 0.15.
calculation: 0.0028⋅25.546877+0.000072⋅25.5468772

First system of equations: 50=x*0.32+(1/2)*a*0.322, 100=x*1+(1/2)*a*12,
for second one I just moved numbers around: 0.32=x*50+(1/2)*a*502, 1=x*100+(1/2)*a*1002

Where I am wrong or why doesn't numbers match?

Used system of equations calculator:

Big thanks!!
Sorry, but I don't understand what your problem is.
The solution is x(t)=182.72[MATH]\cdot[/MATH]t-82.72[MATH]\cdot[/MATH]t2.
This solution fulfills your initial conditions: x(0)=0, x(t=0.32)=50 and x(t=1)=100. So, please, try to write more clear what the problem is.
 
Sorry for not clear question.

Looked over some things and seems like I messed up a little bit. Have to double check later again but atm everything seems to be all good.

Thanks for quick response.
 
Sorry for not clear question.

Looked over some things and seems like I messed up a little bit. Have to double check later again but atm everything seems to be all good.

Thanks for quick response.
Glad to know.
 
Top