Predicting projectile peak based on vector points

Click For Summary

Discussion Overview

The discussion revolves around predicting the peak trajectory of a juggling ball using object tracking data from a camera. Participants explore the necessary data points and equations required to model the ball's motion, considering the effects of gravity and the conversion of measurements from meters to pixels.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks to determine if two frames of data are sufficient to predict the ball's trajectory, questioning if a third frame is necessary.
  • Another participant suggests that gravity must be converted from meters to pixels, proposing a method for this conversion based on camera distance.
  • A participant mentions that having three frames allows for the computation of gravitational acceleration in pixels per second squared.
  • One participant provides the basic equation for vertical motion and outlines how to set up equations using three data points to solve for unknowns such as initial height and gravity.
  • Another participant expresses confusion about treating initial height as an unknown and discusses the challenges of solving the equations with multiple unknowns.
  • Concerns are raised about the robustness of the algorithm against noise in real data, with a suggestion to use a best fit parabola approach with more data points.
  • Participants discuss the implications of assuming an initial height of zero and the potential need for more complex algorithms if additional data is used.
  • One participant requests guidance on resources for understanding systems of linear equations to better grasp the problem at hand.

Areas of Agreement / Disagreement

Participants express differing views on the necessity of an initial height assumption and the sufficiency of data points for accurate predictions. There is no consensus on the best approach to take, and the discussion remains unresolved regarding the optimal method for modeling the trajectory.

Contextual Notes

Limitations include the dependence on the accuracy of the data points, the challenges of noise in measurements, and the complexity of algorithms needed for more extensive data analysis.

TJtheJuggler
Messages
4
Reaction score
0
hey folks, I am making a program that uses object tracking to watch a juggling pattern and plays notes based on the peaks of the balls. I want to predict when/where(x,y) a peak will happen before it does and what i have to work with is when/where(x,y) the ball appears in each frame. I have looked around a bit online, but physics is so foreign to me and I am having some trouble. Here is a sample problem:

FRAME #1

time = 0.00, x = 10, y = 10

FRAME #2

time = 0.05, x = 12, y = 16

I just made these figures up, but is this enough information to determine the balls trajectory? or do I need a FRAME #3? if it is enough, then what formula do I use to get the position/time of the peak?

Any help whatsoever would be so greatly appreciated, let me know if this doesn't make sense and I will re-explain. Thanks!
 
Physics news on Phys.org
So now that I have this typed up, I think I may have just had an epiphany. I may be off on this, but in the real world the force of gravity is (9.81 m/s2), however, in order to take gravity into account here I need to have a gravity force that is in pixels, not meters. I am not sure but it seems like in order to do the conversion from meters to pixels, I need to take into account the distance I am away from the camera, right?

This conversion may be simple though, say i am working with a camera that has a pixel height of 100, and i hold a tape measure up when I am, say 5(i think this number is irrelevant) meters away from the screen and i find that at this distance the camera can see exactly 2 meters of my tape measure.

then it seems like to find my gravity effect at this range all i would need to do is
100pixels = 2m
Zpixels/s^2 = 9.81m/s^2

where Z = gravity in pixels
and in this case Z = 490.5

Can anyone confirm that this makes sense?
 
Last edited:
If you only have two frames, you need to figure out the value of g in pixels per second squared. If you have three frames, however, it can be computed from the data.
 
  • Like
Likes   Reactions: 1 person
Holy cow, that was fast! thank you so much voko!

Allright, so here are 3 actual values(pulled off a chart i found since my object tracker is not precise enough yet), what info do i need to extract from them, or what equation would i plug them into?

(t,x,y)
(0.05, 0.2, 0.13775)
(0.1, 0.4, 0.251)
(0.15, 0.6, 0.33975)

It is really great to hear that this is possible, i was initially told that i would probably need the depth sensor of a Kinect to do this, but i really want to avoid that, it looks like i will be able to. Thanks again!
 
The basic equation for vertical motion is ## y = y_0 + v_{y0} t - gt^2 / 2 ##. When you use the data from the three frames, you have $$

y_1 = y_0 + v_{y0}t_1 - gt_1^2/2
\\ y_2 = y_0 + v_{y0}t_2 - gt_2^2/2
\\ y_3 = y_0 + v_{y0}t_3 - gt_3^2/2

$$ where you know ## t_1, \ y_1, t_2, \ y_2, \ t_3, y_3 ## and ## v_{y0} ## (initial vertical velocity), ##y_0## (initial height) and ##g## (acceleration due to gravity) are to be determined. Solve the system for the unknowns.

Once you have them, the time for max height is given by the equation ## v_{y0} - gt = 0 ##, and the height at that time is given by the very first equation in this message.
 
  • Like
Likes   Reactions: 1 person
Thanks voko!

You say that initial height is to be determined, but would it not just be 0? if not, and it is an unknown then won't that always leave me with an unknown since I can't solve equations with 2 unknowns(or can I?)

I tried leaving (Yo) as an unknown and plugged my variables into the middle 3 equations you gave me, but I don't know, it just looks like an inconsistent mess to me. I don't know what I am doing, I get a bunch of different values for (g). I am really out of my league here, do you know what it is I should read up on to help me grasp this?0.13775 = Yo + (0.13775/0.05)(0.05) - [g(0.05)(0.05)]/2

0.13775 = Yo + 0.13775 - 0.00125g
0.00125g = Yo
g = Yo/0.001250.251 = Yo + (0.13775/0.05)(0.1) - [g(0.1)(0.1)]/2

0.251 = Yo + .2755 - .005g
-0.0245 = Yo - .005g
.005g = Yo + 0.0245
g = (Yo/.005) + 4.90.33975 = Yo + (0.13775/0.05)(0.15) - [g(0.15)(0.15)]/2

0.33975 = Yo + .41325 - 0.01125g
-0.0735 = Yo - 0.01125g
0.01125g = Yo + 0.0735
g = (Yo/0.01125) + 6.53333333333
 
If you are working with real data, you need an algorithm that is robust against noise. In theory, three points determines a parabola, but you probably want to take more than three points and find a best fit parabola, using least squares or maybe a more robust algorithm.
 
TJtheJuggler said:
Thanks voko!

You say that initial height is to be determined, but would it not just be 0?

I do not know enough about your problem to say that ##y_0 = 0 ## (or not). If you are completely sure that is the case, then you can drop it from the equations; and then you will only need two equations (two frames) to determine ##v_{y0} ## and ##g##. Khashishi is certainly correct stating that more data can be gainfully employed, but that also means more complex algorithms, which, given your difficulty with the basic linear equations might be more than you can chew.

I am really out of my league here, do you know what it is I should read up on to help me grasp this?

What you need here is some theory and practice in solving systems of linear algebraic equations. Here is a link: http://en.wikipedia.org/wiki/System_of_linear_equations
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
Replies
40
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
6
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 9 ·
Replies
9
Views
946
  • · Replies 3 ·
Replies
3
Views
2K