Skip to content

Instantly share code, notes, and snippets.

@micahscopes
Created April 16, 2022 20:51
Show Gist options
  • Save micahscopes/24db2b7b251c5fdb7c9f236d0b2cc145 to your computer and use it in GitHub Desktop.
Save micahscopes/24db2b7b251c5fdb7c9f236d0b2cc145 to your computer and use it in GitHub Desktop.
quaternion Moebius transformation in SymPy
from sympy import *
a,b,c,d,x = [Quaternion(*[IndexedBase(s)[i] for i in range(4)]) for s in ['a','b','c','d','x']]
(a*x + b)/(c*x + d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment