• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 524
  • Last Modified:

Formula for describing the flight path of a basket ball

Hi,

I would like to animate the movement of an image so it will follow a trajectory similar to a basket ball.

I need to translate the flight path into x/y co-ordinates using Javascript.

A symmetrical arc would be pretty easy to describe. But I want a path which is closer to a lob, like that of a basketball from the free throw point.

Could someone please point me to a formula or algorithm I could use for this ?

Regards,

0
howtogetitright
Asked:
howtogetitright
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
Hello howtogetitright,

Have a look to the spline curve : http://local.wasp.uwa.edu.au/~pbourke/geometry/spline/index2.html

You can set three points (or more) and design a smooth curve passing on the three points.

Regards.
0
 
howtogetitrightAuthor Commented:
Great, thanks that got me onto the right track. http://github.com/weepy/jquery.path
0
 
leakim971PluritechnicianCommented:
Thanks for the link and for the points!
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now