GSoC Week 3-4 - Rerouting plans
Update on the WrappingSphere Example
The intial PR that I drafted which tried to integrate the WrappingSphere into the pre-existing biomechanical model example was closed, as explained in my previous blog.
My mentor suggested a different model which was simpler and I started to work on it. Here is where things got tough for the first time since I started my GSoC work.
My approach to implement this smoothly was to:
- First create a 2D example with all the parameters, ensuring that I got the logic of the model and its details correct.
- Then simply change the position of the points to turn it into a 3D example.
- “LGTM!” and merged.
It sounded good on paper. I created a 2D model, it worked fine, gave little messy results but it was okay. Then I decided to implement next step and convert it into a 3D system, with 2 degrees of freedom. The implementation was fine after a few tweaks and review from my mentor. But here’s when the real challenges showed up.
Problem #1 : The symbolic representation of the system proved to be too complicated for the solve()
function to be able to find the tangent points needed fast, it gave no output even after 10-12 minutes. I later realised that I was being naive and solved them in a different way, so now we had the tangent points.
Problem #1 out of the way.
Problem #2: The WrappingSphere
class expects the tangent points to lay on the surface of the sphere to find geodesic lengths, fair requirement, or so we thought. The symbolic representations of the tangent points were so so monstrous, that the class and even simplify()
were unable to determine that the points in fact were on the sphere. In particular, it was the point_on_surface
method that was unable to return True. After a long discussion about this issue, it was deemed appropriate by my mentor Jason that we should deprecate this method in both WrappingSphere
and WrappingCylinder
classes. I opened a seperate PR for this task. I read up on the deprecation policy in the documentation and did all the required steps. Currently this PR is waiting for approval by Jason, my other mentor said that everything looked good to her so far.
Problem #2 mostly out of the way.
Problem #3: The results of computation of KanesMethod
were completely monstrous expressions as I expected. More than 50 lines in the terminal, hundreds of terms, and completely un-interpretable. My mentor suggested various solutions like plugging in some numbers, using lambdify
etc. I tried these solutions to some extent, and I will continue to work on them further.
Currently waiting for the deprecation PR to be merged, and trying my best to get the script to work.
PRs Created: