Week 10

August 2017 ยท 1 minute read

During week 10 with my mentor, we finished creation of new CoordSys3D constructor. We can set now transformation while coordinate system is created. We’ve moved functionality from _connect_to_standard_cartesian to constructor so we support the same type of transformation as previously.

Now I demonstrate shorty how coordinate system different that Caertsian can be created in SymPy:

a = CoordSys3D('a', transformation='spherical', variable_names=["r", "theta", "phi"]) a.lame_coefficients() a.transformation_to_parent() b = CoordSys3D('b', lambda r, theta, phi: (r*sin(theta)*cos(phi), r*sin(theta)*sin(phi), r*cos(theta)), variable_names=["r", "theta", "phi"]) c = CoordSys3D('c', [(r, theta, z), (r*cos(theta), r*sin(theta), z)], variable_names=["r", "theta", "z"])

We assumed here that even if parent isn’t set, there is some standard one which we refers to.

Another thing which I was involved for a while, was support for pretty and LaTeX printing for unevaluated expression in vector package.