Skip to content

Instantly share code, notes, and snippets.

@usefulslug
Last active September 11, 2015 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usefulslug/b49229f8e71a499c4e7e to your computer and use it in GitHub Desktop.
Save usefulslug/b49229f8e71a499c4e7e to your computer and use it in GitHub Desktop.
// Returns a quaternion between q1 and q2 as part of a smooth SQUAD segment
def SplineSegment(q0 as Quaternion, q1 as Quaternion, q2 as Quaternion, q3 as Quaternion, t as single):
qa as Quaternion = Intermediate(q0,q1,q2)
qb as Quaternion = Intermediate(q1,q2,q3)
return SQUAD(q1, qa, qb, q2, t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment