0

I am making an app in Android wherein I require to move an image through a parabolic curve. Consider something like the famous Angry Birds game. The path followed by those birds is what I desire in the app that I am building.

I am bit weak at mathematics and geometry and hence cannot understand the equations and their implementations. Can anyone help what I need to achieve an image in a parabolic curve.

Thanks in advance

Jay
  • 3
  • 5

1 Answers1

0

Ok well to begin with you need to have at least a basic understanding of mathematics and equations. If you don't and aren't willing to learn, you won't be able to get anywhere. Even if we give you an implementation, you need to know enough to be able to give the proper input...

That being said, you probably want a bezier curve: http://en.wikipedia.org/wiki/B%C3%A9zier_curve

That wikipedia article is excellent and includes a couple of different curves (2d and 3d) that will work and equations that are relatively easy to translate to code.

If you simply want a curved animation, see: Problem to achieve curved animation

The class I posted in response to that question takes in a start, a middle, and an end point which it uses to create a curve and animate a view along.

Community
  • 1
  • 1
Sam Judd
  • 7,317
  • 1
  • 38
  • 38
  • Thrown objects don't follow a bezier curve but a simple parabolic curve. – J. Maes Feb 09 '12 at 19:58
  • Thanks for your answer. It did help me make some progress. Meanwwhile I found another equation for the projectile motion I wished to achieve.The following is a link to one of the games in C: http://www.daniweb.com/software-development/c/code/216266 I isolated the projectile() function and embedded it into my app an it helped me achieve what I wanted. Thanks Monkeyless – Jay Feb 10 '12 at 06:11