Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def TRS_biv_params_to_biv(biv_params):
"""
Converts the bivector parameters for a general TRS rotor into
the bivector itself
"""
phiP = np_to_euc_mv(biv_params[0:3]) * e123
t = np_to_euc_mv(biv_params[3:6])
omega = biv_params[6]
biv = phiP + t * ninf + omega * e45
return biv
def TRS_biv_params_to_biv(biv_params):
"""
Converts the bivector parameters for a general TRS rotor into
the bivector itself
"""
phiP = np_to_euc_mv(biv_params[0:3]) * e123
t = np_to_euc_mv(biv_params[3:6])
omega = biv_params[6]
biv = phiP + t * ninf + omega * e45
return biv
def full_conformal_biv_params_to_biv(biv_params):
"""
Converts the bivector parameters for a general conformal rotor into
the bivector itself
"""
phiP = np_to_euc_mv(biv_params[0:3]) * e123
t = np_to_euc_mv(biv_params[3:6])
s = np_to_euc_mv(biv_params[6:9])
omega = biv_params[9]
biv = phiP + t * ninf + s * no + omega * e45
return biv
def full_conformal_biv_params_to_biv(biv_params):
"""
Converts the bivector parameters for a general conformal rotor into
the bivector itself
"""
phiP = np_to_euc_mv(biv_params[0:3]) * e123
t = np_to_euc_mv(biv_params[3:6])
s = np_to_euc_mv(biv_params[6:9])
omega = biv_params[9]
biv = phiP + t * ninf + s * no + omega * e45
return biv
def full_conformal_biv_params_to_biv(biv_params):
"""
Converts the bivector parameters for a general conformal rotor into
the bivector itself
"""
phiP = np_to_euc_mv(biv_params[0:3]) * e123
t = np_to_euc_mv(biv_params[3:6])
s = np_to_euc_mv(biv_params[6:9])
omega = biv_params[9]
biv = phiP + t * ninf + s * no + omega * e45
return biv