Change physics interaction setup using stretchy adjustment circles

I am working on ideas to create an interactive online physics lab where parameters can be changed interactively using stretch type interface similar to the one found at the link below.

The curved line has drag circles which change the shape of the curve and then a ball rolls down the hill when you hit the RUN button. Any hints on how to create basic stretch function would be greatly appreciated. Thank you!