Week 9

August 2017 ยท 1 minute read

Reconstruction of constructor in CoordSys3D is like never ending story, but fortunately we are almost at the end of the work. We decide to distinguish two cases. When rotation matrix or location is set and when transformation is set. In the first case we are creating transformation equations from rotation matrix and translation vector. In the second, user is responsible for defining transformation equations but it is also possible to use some pre-defined curvilinear coordinate system. Like it was done previously in _connect_to_standard_cartesian. Creating coordinate system different than Cartesian could be done by setting transformation or transformation and variable_names:

a = CoordSys3D('a', transformation='cylindrical') b = CoordSys3D('b', transformation=(r*cos(theta), r*sin(theta), h), variable_names=(r, theta, h))

Forming a Lame coefficients, transformation and inverse transformation is based on Lambda functions so for example we can easily recalculate point position between different type of curvilinear coordinate system.

I hope that in the next week everything in constructor will be ready and we could focus on the rest things which we need to finish like Jacobian for vector, pretty printing and LaTex printing for unevaluated expression and documentation with examples.