SoK/2022/StatusReport/Srirupa Datta
Adding Perspective Ellipse Assistant Tool in Krita
This project aims to create a tool that is essentially an adjustable four corner mesh that always has an ellipse inside it which touches the sides, in order to draw ellipses in perspective with ease.
Developing this tool would make it easier to draw ellipses in perspective. Currently, to draw a circle in a square with the ellipse tool, one needs to draw the diagonals of the square and correctly align the axis of the ellipse to the square, which is rather complicated since it takes time to set a concentric ellipse with the current ellipse tool. With the circle in a square tool, one just needs to set the four corners of the square.
Mentor
Halla Rempt
Merge Request
The merge request can be found here.
Blog Posts
So far, I have created three blog posts where I made sure to pen down my progress as graphically as possible.
- First Blog Post for Sok'22
- Drawing the Convex Quadrilateral
- Inscribing the Ellipse
- Mathematical Derivations
Timeline
Week 1 and Week 2
During the first two weeks, I mostly spent time finding the relevant source files, talking to my mentor and other developers regarding whether to extend the current Ellipse Assistant or create a new Perspective Ellipse Assistant in Krita. During this time, I also wrote my first blog post.
Week 3 and Week 4
I spent the third and fourth weeks writing the code to add the Perspective Ellipse option in the Tools Option Docker. My mentors and I decided that as of now, it makes more sense to add a new Assistant Tool for Perspective Ellipse instead of extending the Ellipse Assistant Tool. Then, I created a four-point cage by reusing the code from Perspective Assistant, and made changes to a few files to register the Perspective Ellipse Assistant. Also, wrote my second blog post which demonstrates my progress in details.
Week 5 and Week 6
During these two weeks, I created the merge request. Then added the code to draw the inscribed ellipse inside the four-point-cage, cleaned up the code, and created my third blog post. Added an animation which shows how my tool works so far!
Week 7 to Week 11
Spent a lot of time trying the derive the mathematics to get the equation of the desired transformed ellipse. Tiar helped me out with the mathematics once I got stuck. This link contains a draft of what I had worked on.
Dmitry gave a nice link for introduction about projection matrices.
During this time, I started working on code related to drawing the drawable ellipse inside the four-point-cage.
Plans ahead
Since I have not yet finished drawing the correct ellipse inside the four-point cage, I will spend the next week working on this part. I might also work on integrating the Ellipse Assistants (Ellipse, Concentric Ellipse, Perspective Ellipse) once I complete the code related to adding the Perspective Ellipse Assistant.