Jump to content
  • Advertisement
Sign in to follow this  
Felipe M

Get a formula from a graph

This topic is 2086 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know a good software or web service where you can draw a graph an get the formula?

 

 

Like: I input three points: (0,0), (6,9), (10,10). Then I see a curve that perfectly intersects those three points and get the formula for it.

 

There are a lot of situations in game developement when that would be useful. Like if you want the speed of something slowly start rising, and then rise faster and faster until it stabilizes and then start rising slower and slower until its not rising anymore. Things like that. If you could just visualize this variation of speed on a graph and get the formula to implement in your game would be awesome.

Share this post


Link to post
Share on other sites
Advertisement

Pretty good. But it seems to make a mean of some of the points or something. It doesn't intersects all of the points if I make some more.


Try this instead:

interpolating polynomial {{0,0},{6,9},{10,10},{3,5}}

Share this post


Link to post
Share on other sites

Wow that's exactly what I wanted. Thank you guys.

 

I have tried wolfram alpha before posting here, this website is very handy and I use from time to time. It's just difficult if you're not into the terms...

Share this post


Link to post
Share on other sites

I tried this once, I do think the term was "curve fitting" I think I was trying to use Microsoft Excel to do it.

Interpolating polynomial does sound like a better choice though, also there is the term "parametric equations" where there is a certain equation that allows you to set the points and interpolate between them (I actually knew the equation). We used it in calculus to draw out a letter.

I will see if I can find it (because you could use this in a program)

Edited by Tutorial Doctor

Share this post


Link to post
Share on other sites

I could be wrong, but I think something like cubic spline interpolation might be better than nth degree polynomial.  A polynomial can get some pretty wild oscillations to fit the data points. 

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!