Skip to content

Add a CGA preset for Ga #226

@eric-wieser

Description

@eric-wieser

Perhaps:

from galgebra.ga import Ga
g = Ga('n_o e_1 e_2 e_3 n_inf', g=[
    [0, 0, 0, 0, 1],
    [0, 1, 0, 0, 0],
    [0, 0, 1, 0, 0],
    [0, 0, 0, 1, 0],
    [1, 0, 0, 0, 0],
])
n_o, e_1, e_2, e_3, n_inf = g.mv_basis
up = lambda x: x*x*n_inf + x - n_o
g3_vector_sym = lambda name: sum(g.mv(name, 'vector').components()[1:-1])
point_sym = lambda name: up(g3_vector_sym(name))

Filing this so I at least have something quick to copy/paste :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions