def main():
    enhance_print()

    X = (x, y, z) = symbols('x y z')
    (ex, ey, ez, grad) = MV.setup('e_x e_y e_z', metric='[1,1,1]', coords=(x, y, z))

    A = x*(ey ^ ez) + y*(ez ^ ex) + z*(ex ^ ey)
    print('A =', A)
    print('grad^A =', (grad ^ A).simplify())
    print()

    f = MV('f', 'scalar', fct=True)
    f = (x**2 + y**2 + z**2)**(-1.5)
    print('f =', f)
    print('grad*f =', (grad*f).expand())
    print()

    B = f*A
    print('B =', B)
    print()

    Curl_B = grad ^ B

    print('grad^B =', Curl_B.simplify())

    def Symplify(A):
        return(factor_terms(simplify(A)))

    print(Curl_B.func(Symplify))
    return
Beispiel #2
0
def main():
    Get_Program(True)
    with GA_Printer():
        enhance_print()
        basic_multivector_operations()
        check_generalized_BAC_CAB_formulas()
        derivatives_in_rectangular_coordinates()
        derivatives_in_spherical_coordinates()
        rounding_numerical_components()
        noneuclidian_distance_calculation()
        conformal_representations_of_circles_lines_spheres_and_planes()
        properties_of_geometric_objects()
        extracting_vectors_from_conformal_2_blade()
        reciprocal_frame_test()
    return
Beispiel #3
0
def main():
    Get_Program(True)
    with GA_Printer():
        enhance_print()
        basic_multivector_operations()
        check_generalized_BAC_CAB_formulas()
        derivatives_in_rectangular_coordinates()
        derivatives_in_spherical_coordinates()
        rounding_numerical_components()
        noneuclidian_distance_calculation()
        conformal_representations_of_circles_lines_spheres_and_planes()
        properties_of_geometric_objects()
        extracting_vectors_from_conformal_2_blade()
        reciprocal_frame_test()
    return
Beispiel #4
0
def main():
    enhance_print()
    (ex, ey, ez) = MV.setup('e*x|y|z', metric='[1,1,1]')

    u = MV('u', 'vector')
    v = MV('v', 'vector')
    w = MV('w', 'vector')
    print(u)
    print(v)

    uv = u ^ v
    print(uv)
    print(uv.is_blade())

    exp_uv = uv.exp()
    exp_uv.Fmt(2, 'exp(uv)')

    return
Beispiel #5
0
def main():
    enhance_print()

    coords = symbols('x y z')
    (ex, ey, ez, grad) = MV.setup('ex ey ez', metric='[1,1,1]', coords=coords)

    mfvar = (u, v) = symbols('u v')

    eu = ex + ey
    ev = ex - ey

    (eu_r, ev_r) = ReciprocalFrame([eu, ev])

    oprint('Frame', (eu, ev), 'Reciprocal Frame', (eu_r, ev_r))

    print('eu.eu_r =', eu | eu_r)
    print('eu.ev_r =', eu | ev_r)
    print('ev.eu_r =', ev | eu_r)
    print('ev.ev_r =', ev | ev_r)

    eu = ex + ey + ez
    ev = ex - ey

    (eu_r, ev_r) = ReciprocalFrame([eu, ev])

    oprint('Frame', (eu, ev), 'Reciprocal Frame', (eu_r, ev_r))

    print('eu.eu_r =', eu | eu_r)
    print('eu.ev_r =', eu | ev_r)
    print('ev.eu_r =', ev | eu_r)
    print('ev.ev_r =', ev | ev_r)

    print('eu =', eu)
    print('ev =', ev)

    define_precedence(locals())

    print(GAeval('eu^ev|ex', True))
    print(GAeval('eu^ev|ex*eu', True))
    return
def main():
    Get_Program(True)
    enhance_print()
    MV_setup_options()
    return
Beispiel #7
0
def main():
    Get_Program(True)
    enhance_print()
    MV_setup_options()
    return