Log in

No account? Create an account
entries friends calendar profile It's Me Previous Previous Next Next
The Autobiography of Russell
Life from a different perspective
Graphing Functions
I tried all yesterday evening to make a graphing function that will make it easy to plot a curve that made upgrading a stat easy at first but then as it reaches peak it becomes harder until it maxes out.

Each stat starts at a base, can be upgraded a max number of times (steps), and up to a max number (starts at 10 and, after being upgraded 20 times, maxes out at 100). The most I can come up with is f(x)=sqrt(x/steps)*(max-base)+base, but that seems too steep at first and slows down too much later.

Below is a graph of the function I wrote, and below that is a picture of what I want the curve to be more like.

(Seems I forgot to upload the graph of the function... sorry.)

The things I want to be able to control are the base, steps, peak, and max. So far, I've only gotten control of the base, max, and steps, but not the peak. Le suggested using a circle, but the curve is too sharp on a basic circle. (Increasing from 10 to 100 in 20 steps, the first step increases by 20 and the last five steps barely increase by one point)

Anyone have any suggestions?

Current Mood: contemplative contemplative
Current Music: "Shape of My Heart" by Backstreet Boys

3 comments or Leave a comment
raist_ From: raist_ Date: April 9th, 2005 03:05 pm (UTC) (Link)
Remove the sqrt.

Roots mean you're dealing with powers of variables, which means you're going to get that curved line whether you like it or not.

Just follows the mx+b pattern to get a straight line like that.
zimzat From: zimzat Date: April 9th, 2005 04:38 pm (UTC) (Link)
Actually, the curve is what I'm trying to get, and to be able to specify where the peak of the curve is. I had the other straight line there for reference if the upgrade was always steady.
raist_ From: raist_ Date: April 9th, 2005 06:04 pm (UTC) (Link)
It's all calculus stuff. I've made a point of forgetting calc, myself.
3 comments or Leave a comment