Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What does t represent in Bézier curves?

Asked by 6 years ago
Edited 6 years ago

I’ve been looking at roblox wiki to try and understand Bézier curves and I’ve come very close, one thing that I don’t understand is that for the third argument in the function lerp, roblox used t instead of p3, so how does the script know the third part, and what does t represent? Script is below:

function lerp(a, b, c)
    return a + (b - a) * c;
end;

function quadBezier(t, p0, p1, p2)
    local l1 = lerp(p0, p1, t);
    local l2 = lerp(p1, p2, t);
    local quad = lerp(l1, l2, t);
    return quad;
end;
0
Probably the point that is between EndPoint and StartPoint. thesit123 509 — 6y

1 answer

Log in to vote
0
Answered by
Tomstah 401 Moderation Voter
6 years ago

T Represents time. You can actually see it in this Gif.

Basically, it's the total duration of the lerp.

0
So how can I use that and if you know, how do I make a trail appear with this script? cmgtotalyawesome 1418 — 6y
0
For a trail see: http://wiki.roblox.com/index.php?title=API:Class/Trail for using t simply increase or decrease the time in seconds you want the lerp to happen. Tomstah 401 — 6y
Ad

Answer this question