GitLab | UTCN

Skip to content

Refactoring

Tassos requested to merge refactoring into master

Hello @Ioana.Ulici . This is another feature of git/gitlab that would be useful if you get familiar with. It is called 'Merge request'. Basically I made some changes in another branch (called Refactoring) and I want to merge these changes with the master branch.

I did it this way, cause like this you can actually see what I changed before we do the merge. You can inspect the changes between the two branches, and if you think they are good changes you can choose to merge them.

I basically did some refactoring of the first lab. Your code was working great, but there was a lot a lot of repetitions, making it very difficult to read and to debug. That's why I extracted two functions: one for creating an empty plot with a coordinate frame on it, and one for plotting an arbitrary coordinate frame starting from a transformation matrix.

Then I just used matrix transformations for 'describing' the coordinate frame that I want to plot. Then the code for each of the interactive plots became small enough to be inserted in the cell.

Hope this gives a good example of writing modular code, avoiding repetitions :)

Merge request reports

Loading