Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- y = ax^2 + bx + c with x as time and y as vertical displacement
- one root is (0,0), other is (duration,0)
- y = ax^2 + bx is valid bc there will never be a y intercept
- rules for simplifying quadratics:
- if (x+q)(x+g):
- b = q + g
- c = q * g
- for our case:
- b = q + g
- 0 = q * g <-- either q or g has to be zero, it will be q in this case bc we want leftmost root to be origin.
- (x+0) (x+duration)
- so the vertex of the point is given by: (duration/2, maxVert)
- however, vertex is found by:
- vertex = -b/2a
- therefore:
- duration = d for simplification.
- d/2 = -b/2a
- factor in previous b:
- d/2 = -(q + g)/2a
- we know q = 0 and g = duration:
- d/2 = -d/2a
- solve for a:
- multiply by 2a:
- 2ad/2 = -d
- reduce:
- ad = -d
- divide by d:
- a = -d/d
- a = -1
- factor our newly discovered variables into our original function:
- y = -1x^2 + (q + g)x + c
- reduce:
- y = -x^2 + (d)x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement