local function quadratic(p0, p1, p2, t)
local L1 = lerp(p0, p1, t)
local L2 = lerp(p1, p2, t)
return lerp(L1, L2, t)
end
What is the third argument for I am so confused. and for each part do I use p0.Position? And for t do I give a number or something??
It looks like t is for theta. Put in a theta probably between 0 and 1 and it will give you a corresponding point on the function.
for t = 1, 100 do
point = quadratic(p0, p1, p2, t)
end
As theta is usually an angle, t doesn’t mean theta. t is just a common variable for a number in the interval [0, 1].
For OP, if you know what lerp does then this GIF should provide better intuition. I can’t find the original source now so here it is on my Twitter from a few years ago. https://twitter.com/AstroCodeRblx/status/818129428710621189?s=19
Thanks. I was too rushed to look into it, but it definitely didn’t seem right.
1 Like