2
$\begingroup$

Is there a free / open-source program that would allow me to drag and drop points of a cubic curve and displays the equation?

There are a number of equations that I could use in my game project and it would be a huge time saver if there is a tool that allows me to drag & drop and fine-tune curves to meet the desired effect.

In all circumstances I need to compute the value of y given x. This probably is not important, but both axis always range between -1 and 1.

1 Answers 1

3

Here's a little JSXGraph web page. Click and drag the red dots to change the cubic. The equation for the cubic will be changed accordingly... Drag the green dot along the curve to see the coordinates.

Is this what you wanted?

The full source is in the html file from the download link, and is easily modified (I think). It uses the formulas for the cubic passing through four given points found on this page: Lagrange Polynomials.

Admittingly, the equation looks ugly, but one could expand the formulas found on the linked page to put it in standard form.

Be warned: I haven't checked this thoroughly. The equations may be off...

Sample screen shot is below:

enter image description here

  • 0
    @chester There is a "download document" icon at the top right of the linked page. Click this and you should be able to load the page in your browser.2013-04-04