Summer of Code has started, and I’ll try to document here my questions, problems and achievements.
During the community bonding period, I talked with a lot of other participants, I knew people around the world, but I also studied how to do my first task, to implement vectors (2D and 3D), on Analitza and allow the user to plot it on Khipu. This is my first time writing on a blog, so I would like if somebody give me tips, like use LaTeX here, the best way to show a code, and this kind of thing.
I made a function for 3D plot, which uses Euler Angles to calculate a matrix that makes the vector [1,0,0] go to the vector [a,b,c], which is given by the user. I calculated and found:
I needed to do it, because in 3D, to plot a vector, you need to plot a pyramid and a tail. The tail is easy, you can just plot a line that starts in (0,0,0) and ends in (a,b,c), but the pyramid isn’t easy to calculate, so I got these points for (1,0,0) (that are easy to find because two coordinates are 0 and were already on the code to plot the axis) and just rotate and multiplicate to align with (a,b,c). I reused part of the code to plot the axis. The function you can find here: https://pastebin.com/84yzTSaq
I thought that I was almost implementing it and that would only be missing to put it on Khipu interface. I created a layout, a button and a window to give it to the user. However, in the moment that I was tried to connect it with the function that I created, I noticed two things:
1- Plotter3DES is an abstract class, I can’t create an object from this class, so my function shouldn’t be there. And I couldn’t understand how this class was connected to Khipu.
2- That there’s a lot of object management on Khipu, that allows the user to edit and delete their plot.
Since that, I got stucked trying to understand how everything on these codes works and it may will delay my schedule. I’ll try my best to solve it as fast as I can.