"Quint" graph help

Hello! I am experimenting with different graphs to calculate a value in the interval [0,1]. However I need the value to accelerate faster the closer it gets to 1. I am currently using a sinus graph for this:

local relation = math.sin(math.rad(degrees))

However, I want the acceleration to be more aggressive, like the “Quint” graph below:

Skjermbilde
Image from: EasingStyle

How would I accomplish this? :slight_smile:

Are you looking for just the quint graph? It looks like a polynomial function with a even coefficient, probably x^5 as the name suggests.

Annotation 2020-05-24 145512
(What x^5 looks like from 0 to 1)

1 Like

That’d be correct. The quint graph depicted in the OP is EaseInQuint and the function for it is x^5.

There’s a neat website on easings that could help with viewing the graphs and code/math functions involved in creating them. All directions (in, out and inout) as well as applicable styles can be found on this site with a little demonstration of how they look when used.

You can also use Desmos Graphing Calculator if you want to see the graphs of your easings and try to refine the equations better should you apply a custom one.

2 Likes

Aaah I see! Thanks! Now how would I declare the relation variable? The degrees variable is in the interval [0,90] or [0,𝜋/2] converted to radians). The relation variable has to be in the interval [0,1].

I would think that something like this would work.

local relation = math.pow((math.rad(degrees) / (math.pi * 1/2)), 5)

That should have a range of (0,1) and follow the curve of the quint.

1 Like