Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add exp and log #14

Open
1 of 2 tasks
RobinKa opened this issue Jun 20, 2020 · 2 comments
Open
1 of 2 tasks

Add exp and log #14

RobinKa opened this issue Jun 20, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@RobinKa RobinKa added the enhancement New feature or request label Jun 20, 2020
@RobinKa
Copy link
Owner Author

RobinKa commented Jun 21, 2020

For 2D and 3D (including PGA) this seems to work (just took inspiration from the Quaternion logarithm), although I don't know under what conditions this works.

def rotor_log(x):
    norm_x = tf.sqrt(ga.geom_prod(x, ga.reversion(x))[..., :1])
    bv_indices = ga.get_kind_blade_indices("bivector")
    v = ga.keep_blades(x, bv_indices)
    norm_v = tf.sqrt(ga.geom_prod(v, ga.reversion(v))[..., :1])
    s = x[..., :1]

    scalar = tf.math.log(norm_x)
    rotor = ga.from_tensor_with_kind(tf.math.acos(s / norm_x) / norm_v, "scalar")

    return scalar + ga.geom_prod(v, rotor)

@RobinKa
Copy link
Owner Author

RobinKa commented Jul 14, 2021

General bivector exp and log: https://arxiv.org/abs/2107.03771 (Graded Symmetry Groups: Plane and Simple)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant