#!/usr/bin/env python # coding: utf-8 # In[ ]: from clifford.g3c import * # In[ ]: # Metric print(e1*e1) print(e2*e2) print(e3*e3) print(e4*e4) print(e5*e5) # In[ ]: # Example a = (2 + 5.7*e2)*(e1 + e3*e4) b = 5*e2 - 3.5*e1 print(a) print(b) # Projection print(a(2)) # Outer product print(a^b) # Inner product print(a|b) # Left contraction print(a.lc(b)) # In[ ]: # Mapping points from euclidean to conformal b_up = up(5*e2 - 3.5*e1) print(b_up) # And back again print( down(b_up) ) # In[ ]: