Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Developing a General Formula for a family of Curve Shapes

  1. May 22, 2012 #1
    I have a process that requires an operational profile that follows one of the curves in the diagram which follows. I wish to program into the device a general equation that will give me a family of curves of this general shape. The goal is to adjust the parameters of the equation so that I can generate the uppermost curve that rises quickly and at other times generate a curve like the lowest one that is almost approaching a straight line. These curves are not based on pre-existing data so I can't use a curve fitting program to generate an equation to generate additional points on the curve. I need to create a general equation that can then be used to generate any intermediate value along the curve.

    In the diagram, x runs from 0 to 100 and y runs from 0 to 100. These represent percentages. So, looking at the diagram, for the uppermost curve at x=25%, y=80% while the lowermost curve is showing that at x=25%, y=50%. Since these curves represent percentages, the y value can never exceed 100. The points (0,0) and (100,100) are fixed points. You can't use a 3 point curve fit where the (25,80) point or (25,50) is the intermediate point, since such a polynomial will generate a parabola whose height exceeds 100. This curve looks more like part of a hyperbola or an arctan function of some sort.

    Can anyone give me an idea of how I might find such an equation.
     

    Attached Files:

  2. jcsd
  3. May 22, 2012 #2

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    What about

    [tex]100\left(1-\left(-\frac{(x-100)}{100}\right)^p\right)^{1/p}[/tex]

    where [itex]p\geq 1[/itex]
     
  4. May 22, 2012 #3

    AlephZero

    User Avatar
    Science Advisor
    Homework Helper

  5. May 22, 2012 #4
    Thank you. I was considering a bezier curve and was playing around just a few hours before your post with an interactive demo on WolframAlpha to plot different curves. I didn't quite get the series of shapes I am looking for but perhaps with more experimentation I will. I haven't looked into how the implement code to generate points along the curve, but I know its already been implemented in several Abode products.
     
  6. May 22, 2012 #5
    Thank you for this suggestion. I would be interested in understanding how you derived that the proposed equation would create the type of shape. I attached a few plots generated from the formula you posted. This is a great start.

    For the general curve shape, I need to control the point along the curve where it begins the bend toward y=100. In the attached sample which utilizes the formula posted, for p=10, that bend is greatest at around x=5,while for p=5 it starts around x=10. I need the user of the device to have the option to set parameters to be able to move where this bend starts so that the vertical step from x=0 to x=1 is not so steep. I don't want a 1% change in x to cause an 80% change in y. You can see the difference in the shape of this set of curves versus the sample set that I posted in the original question.

    I also posted a 3D plot of the family of curves generated from p=1 to 10. You can see how this equation is biased toward a rapid rise for small increments of x.
     

    Attached Files:

    Last edited: May 22, 2012
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Developing a General Formula for a family of Curve Shapes
Loading...