Bouncing Ball Wave

Discussion in 'Programming & Software Development' started by @rt, Jul 13, 2017.

  1. @rt

    @rt Member

    Joined:
    Nov 30, 2005
    Messages:
    2,296
    Hi Guys :)
    If you type that thread title into Google images, you get plenty of examples describing bouncing ball movement,
    but I’d like to know what a ball bouncing up and down on the same spot looks like.

    Are there any examples of that?
    I’m after 180 degrees of amplitude data essentially so a program could simulate
    a convincing bouncing ball on a 2D screen that never loses energy.

    I’m just not sure if that will look sinusoidal or actually circular.
    Cheers, Brek.
     
  2. oculi

    oculi Member

    Joined:
    Aug 18, 2004
    Messages:
    9,003
  3. @rt

    @rt Member

    Joined:
    Nov 30, 2005
    Messages:
    2,296
    hi :)
    Admittedly, I haven’t even given thought to what happens to the ball itself.
     
  4. @rt

    @rt Member

    Joined:
    Nov 30, 2005
    Messages:
    2,296
    Given the basket ball image example on that page,
    I should be able to try just the peak part from a sin lookup table.
     
  5. oculi

    oculi Member

    Joined:
    Aug 18, 2004
    Messages:
    9,003
    I only skimmed that page, I was only thinking about the path the ball would follow, not the deformation of the ball.

    A simpler way to describe it would be as a positive rectified sine wave, that shouldn't be too hard to plot. I don't think that is the path a bouncing ball would actually follow but it would look close enough.
     
  6. @rt

    @rt Member

    Joined:
    Nov 30, 2005
    Messages:
    2,296
  7. @rt

    @rt Member

    Joined:
    Nov 30, 2005
    Messages:
    2,296
    Ok, I’m happy with this one :)
    https://www.youtube.com/watch?v=-P8oZkYYvCY
    It has a linear component that would end up making the ramp steeper,
    as if cut from the peaks of a sine, and then the empty space trimmed out.

    Basically the index for the sine table is divided by a number,
    and the result added to the lookup value of the sine table.
     

Share This Page