ignore the stuff below unless you want a longer explanation on what i want. i didnt read what you posted and it looks like it would work. but i did try this before. the problem with it was the input value only ranged from 0 to 1 where i want the input value to range from any real number. for example: -90 to 90
(i am currently creating this within python since its easier for me to do it in python then transfer to roblox, will edit with update)
— ignore below unless needed longer explanation –
no its nothing to do with visualizing a curve. heres an example
i got a number curve where the input min is -90 and the input max is 90, the output can range from 0-1
i put at 30 for the input a 1 for output and at -30 a -1 for output. this can be easily defined through just points on a graph.
the graph i just talked about is something used for plane lift based on its angle of attack. where at 90 or -90 degrees the output would be 0 and at 0 degrees the output would also be zero.
those are 3 points out of 5 then two more points at the limit of the angle of attack for this example that is 30 degrees, since everything is mirrored there will also be one for -30 degrees, these will output 1 and -1.
i curve using these 5 points would look like this
where the x axis, or input, is the angle of attack and the y axis, or output, is the lift.
in unity this is curve creation is done for you with your given points (this exmaple using the points of (0, 0), (30, 1), (90, 0), (-90, 0), (-30, -1)). in unity and animation curve’s Evaluate function will give you the output. the input is always the x axis and the output is always the y axis
again creating these points is really easy the thing im going for is the curve part where it will fill in the rest and give me an output. for example, i input 40 and i should get an output of something between 1 and 0
heres all of that in a summary:
i know how to point points on a graph, thats simple. what i want is the ability to take those points and create a wave or curve function off of it.
example: a quadratic function, given point is the vertex, grab two points to the left, graph, curve function = f(x) = (x - 5)2 + 7 (the 2 after the ( is an exponent). i dont want just a quadratic function btw