Tighter tension on curve?
Posted: Fri May 22, 2020 10:15 pm
I am working on a project, and I am trying to get the right curve on the tension. This is the code I have for it.
What I am after is having a "tighter" tension, rather than having it stretch through the whole plot. This is new to me, so I am experimenting as much as I could. Here is a video example of how it looks and also how I want the curve to go: https://www.youtube.com/watch?v=g97tR-IRmdo
Could someone point to the right direction regarding this?
Many thanks!`
Code: Select all
def curve x, tension
tn = [[0.5 * (tension+1.0), 0.999999].min, 0.000001].max
t = 1.0 - (2.0*tn-1.0) / tn
return (t!=1.0) ? (t**x-1.0) / (t-1.0) : x
endWhat I am after is having a "tighter" tension, rather than having it stretch through the whole plot. This is new to me, so I am experimenting as much as I could. Here is a video example of how it looks and also how I want the curve to go: https://www.youtube.com/watch?v=g97tR-IRmdo
Could someone point to the right direction regarding this?
Many thanks!`