• Create Account

## Get a formula from a graph

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

8 replies to this topic

### #1L i n c k  Members

148
Like
0Likes
Like

Posted 04 February 2014 - 10:12 PM

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.

### #2phil_t  Members

7650
Like
0Likes
Like

Posted 04 February 2014 - 10:30 PM

http://www.wolframalpha.com/

type in:

### #3L i n c k  Members

148
Like
0Likes
Like

Posted 04 February 2014 - 11:22 PM

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.

How would I draw a graph like this?

http://draw.to/D2QbLEi

### #4 slalrbalr   Banned

2006
Like
0Likes
Like

Posted 05 February 2014 - 03:06 AM

### #5Álvaro  Members

20266
Like
1Likes
Like

Posted 05 February 2014 - 07:19 AM

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.

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

### #6L i n c k  Members

148
Like
0Likes
Like

Posted 05 February 2014 - 08:15 AM

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...

### #7Tutorial Doctor  Members

2565
Like
0Likes
Like

Posted 05 February 2014 - 10:18 AM

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, 05 February 2014 - 12:32 PM.

They call me the Tutorial Doctor.

### #8Quat  Members

563
Like
0Likes
Like

Posted 05 February 2014 - 11:44 AM

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.

-----Quat

### #9Tutorial Doctor  Members

2565
Like
0Likes
Like

Posted 05 February 2014 - 12:31 PM

I think that was it Quat, the nth degree polynomial. Good tip too.

They call me the Tutorial Doctor.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.