Name

lerp()

Examples
a = 20
b = 80
c = lerp(a, b, .2)
d = lerp(a, b, .5)
e = lerp(a, b, .8)
beginShape(POINTS)
vertex(a, 50)
vertex(b, 50)
vertex(c, 50)
vertex(d, 50)
vertex(e, 50)
endShape()
x1 = 15
y1 = 10
x2 = 80
y2 = 90
line(x1, y1, x2, y2)
for i in range(10): 
    x = lerp(x1, x2, i/10.0) + 10
    y = lerp(y1, y2, i/10.0)
    point(x, y)
Description
Syntax
lerp(start, stop, amt)
Parameters
start
stop
amt
Related curvePoint()
bezierPoint()
lerp()
lerpColor()
Updated on Wed Jan 18 17:32:21 2017.
Creative Commons License