oriels/src/dofs/cubic-flow/pattern.txt
2023-04-10 08:17:40 -04:00

27 lines
505 B
Text

# 2021.10.18 -> 2023.02.16 ->
# 4 independent spatial cursors
p0 = leftHand.pos
p1 = leftTwistCursor.pos
p2 = rightTwistCursor.pos
p3 = rightHand.pos
if toggle
if !leftTwistCursor.outty
pp = p0
p0 = p1
p1 = pp
if !rightTwistCursor.outty
pp = p2
p2 = p3
p3 = pp
pastPos = p0
for i = 0, i < 64, i++
t = i / 63.0f
a = Lerp(p0, p1, t)
b = Lerp(p1, p2, t)
c = Lerp(p2, p3, t)
pos = Lerp(Lerp(a, b, t), Lerp(b, c, t), t)
Draw.Line(pastPos, pos, color)
pastPos = pos