diff --git a/docs/source/posts/2021/2021-08-02-week-9-antriksh.rst b/docs/source/posts/2021/2021-08-02-week-9-antriksh.rst new file mode 100644 index 000000000..b2ef01b00 --- /dev/null +++ b/docs/source/posts/2021/2021-08-02-week-9-antriksh.rst @@ -0,0 +1,35 @@ +Week #9: More Layouts! +====================== + +.. post:: August 02 2021 + :author: Antriksh Misri + :tags: google + :category: gsoc + +What did I do this week? +------------------------ +Below are the tasks that I worked on: + +* `Added Horizontal/Vertical Layout to the layout module `_ : These PRs add support for Horizontal/Vertical layouts. These layouts allow the actors to be placed in a horizontal/vertical stack. + + .. image:: https://user-images.githubusercontent.com/54466356/127688192-8412b604-d6c7-4da9-87c4-dfae044a136e.png + :width: 200 + :height: 200 + + .. image:: https://user-images.githubusercontent.com/54466356/127620054-7e14f86e-1579-46ac-b4a6-ac98c109094a.png + :width: 200 + :height: 200 + +* `Finalizing Card2D UI element `_ : As panel border, wrap overflow PRs were merged this week I updated the Card2D UI to take advantage of these features. +* `Added GSoC blog posts `_ : Added GSoC blog posts in .rst format for the FURY's blog website. Also reviewed the blog posts of other members. +* `Added support for dragging by label text/icon in Tree2D UI `_ : Added support for dragging TreeNode2D by the label text/icon. This will help making the Tree2D as well as TreeNode2D UIs more mobile. + +Did I get stuck anywhere? +------------------------- +For now I am not stuck anywhere but I have yet to start my work on freetype this could pose some trouble. + +What is coming up next week? +---------------------------- +Next week I will finish the remaining UI elements which includes Accordion2D, SpinBox2D. + +**See you guys next week!** \ No newline at end of file diff --git a/docs/source/posts/2021/2021-08-09-week-10-antriksh.rst b/docs/source/posts/2021/2021-08-09-week-10-antriksh.rst new file mode 100644 index 000000000..e7488a250 --- /dev/null +++ b/docs/source/posts/2021/2021-08-09-week-10-antriksh.rst @@ -0,0 +1,36 @@ +Week#10: Accordion UI, Support for sprite sheet animations +====================== + +.. post:: August 09 2021 + :author: Antriksh Misri + :tags: google + :category: gsoc + +What did I do this week? +------------------------ +Below are the tasks that I worked on: + +* `Added Accordion2D to UI sub-module `_ : This PR adds the Accordion UI to the UI sub-module. This UI inherits from the Tree2D UI and can only be merged once the Tree2D UI is in. Here's a screenshot for reference: + + .. image:: https://i.imgur.com/klI4Tb5.png + :width: 200 + :height: 200 + +* `Adding X, Y, Z Layouts `_ : It was pointed out in last week's meeting that in 3D space horizontal/vertical means nothing. Instead X, Y, Z are used, so, these three layouts were added on top of horizontal/vertical layouts. They also have functionality of changing the direction i.e. reverse the stacking order. +* `Added support of sprite sheet animation in Card2D `_ : The image in Card2D was static in nature and wasn't very interesting. So, to make things a bit interesting support for animated images were added. These animations are played from a sprite sheet or a texture atlas. A buffer of processed sprite chunks is maintained and with the help of a timer callback the image in the card is updated after a certain delay which is dependent of the frame rate. Below is the demonstration: + + .. image:: https://i.imgur.com/DliSpf0.gif + :width: 200 + :height: 200 + +* **Researching more about Freetype/Freetype-GL**: Apart from coding stuff, i did some more research on custom font using freetype and freetype-gl. I found some examples that used the python bindings of the c++ library and displayed custom fonts that were transformable i.e. can be rotated by some angle. Hopefully I can create a working example by this weeks meeting. + +Did I get stuck anywhere? +------------------------- +No, I did not get stuck anywhere. + +What is coming up next week? +---------------------------- +Next week I will finish up my remaining work. Which includes addressing all PR reviews and adding some more features. + +**See you guys next week!** \ No newline at end of file diff --git a/docs/source/posts/2021/2021-08-16-week-11-antriksh.rst b/docs/source/posts/2021/2021-08-16-week-11-antriksh.rst new file mode 100644 index 000000000..70fb69d8c --- /dev/null +++ b/docs/source/posts/2021/2021-08-16-week-11-antriksh.rst @@ -0,0 +1,26 @@ +Week #11: Finalizing open Pull Requests +======================================= + +.. post:: August 16 2021 + :author: Antriksh Misri + :tags: google + :category: gsoc + +What did I do this week? +------------------------ +Below are the tasks that I worked on: + +* `Created PR for sprite sheet animation `_ : This PR adds support for playing animations from a sprite sheet. This feature will be used in Card2D to create a tutorial in which the card will show the animation in the image box. Previously, the utility functions for this were added directly inside the tutorial but now they are refactored to go in their respective modules. +* `Finalized the x, y, z layouts `_ : The PR that adds these layouts needed some updates for it to work as intended. These changes were added and this PR is ready to go. +* `Resolved all conflicts in the GridLayout PR `_ : As the Horizontal and Vertical layouts were merged this week the GridLayout PR had got some conflicts. These conflicts were resolved and the PR is almost ready. +* **Continuing the work on custom font rendering** : In the last meeting, a few points were brought up. Firstly, to position each glyph to their respective location in the atlas a seperate module is used which is freetype-gl. The python bindings for this module are not available which means either we have to write the bindings ourselves or the freetype team will be emailed about this and they will add bindings for that. On the other hand, I looked how latex is rendered in matplotlib. `This `_ is the Text class that is used to represent the string that is to be drawn and `This `_ is the class that it inherits from. Everything is handled internally in matplotlib, to draw the rasterized text `this `_ function is used. The text can be rendered in two ways, the first one is by using the default renderer and the second way is by using PathEffectRenderer that is used to add effects like outlines, anti-aliasing etc. It is a very rigid way of rendering text and is designed to be used internally. + +Did I get stuck anywhere? +------------------------- +No, I did not get stuck anywhere. + +What is coming up next week? +---------------------------- +Hopefully everything is resolved by the end of this week and next week I will hopefully submit my final code in a gist format. + +**See you guys next week!** \ No newline at end of file diff --git a/docs/source/posts/2021/2021-08-23-final-work-antriksh.rst b/docs/source/posts/2021/2021-08-23-final-work-antriksh.rst new file mode 100644 index 000000000..f72f9a80a --- /dev/null +++ b/docs/source/posts/2021/2021-08-23-final-work-antriksh.rst @@ -0,0 +1,205 @@ +.. image:: https://developers.google.com/open-source/gsoc/resources/downloads/GSoC-logo-horizontal.svg + :height: 50 + :align: center + :target: https://summerofcode.withgoogle.com/projects/#6653942668197888 + +.. image:: https://www.python.org/static/community_logos/python-logo.png + :width: 40% + :target: https://blogs.python-gsoc.org/en/nibba2018s-blog/ + +.. image:: https://python-gsoc.org/logos/FURY.png + :width: 25% + :target: https://fury.gl/latest/community.html + +Google Summer of Code Final Work Product +======================================== + +.. post:: August 23 2021 + :author: Antriksh Misri + :tags: google + :category: gsoc + +- **Name:** Antriksh Misri +- **Organisation:** Python Software Foundation +- **Sub-Organisation:** FURY +- **Project:** `FURY: Create new user interface widget `_ + +Proposed Objectives +------------------- + +* Add support for Layouts in UI elements +* Add support for Horizontal Layout +* Add support for Vertical Layout +* Add support for Layout along X, Y, Z axes. +* Stretch Goals: + + * Add Tree2D UI element to the UI sub-module + * Add Accordion2D UI element to the UI sub-module + * Add SpinBox2D UI element to the UI sub-module + +Objectives Completed +-------------------- + + +- **Add support for Horizontal Layout** + + Added support for Horizontal Layout in the layout module. This layout allows the user to stack actors in a horizontal fashion. Primarily, should be used for laying out UI elements as there is no meaning of horizontal/vertical in 3D space. + + *Pull Requests:* + + - **Horizontal Layout:** https://github.com/fury-gl/fury/pull/480 + - **Ribbon Representation demo:** https://github.com/fury-gl/fury/pull/480 + +- **Add support for Vertical Layout** + + Added support for Vertical Layout in the layout module. This layout allows the user to stack actors in a vertical fashion. Primarily, should be used for laying out UI elements as there is no meaning of horizontal/vertical in 3D space. + + *Pull Requests:* + + - **Vertical Layout:** https://github.com/fury-gl/fury/pull/479 + - **Vertical Layout demo:** https://github.com/fury-gl/fury/pull/479 + +- **Add support for Layout along X, Y, Z axes** + + Added support for Layout along x, y, z axes. Allows user to layout different actors along any given axes. Also it allows users to switch the stacking order by passing a axis+ or axis- to the constructor. + + *Pull Requests:* + + - **X, Y, Z axes Layout:** https://github.com/fury-gl/fury/pull/486 + - **X, Y, Z axes Layout demo:** https://github.com/fury-gl/fury/pull/486 + +- **Add Tree2D UI element to the UI sub-module** + + Added Tree2D UI element to the UI sub-module. This allows user to visualize some data in a hierarchical fashion. Each node inside the tree can have N child nodes and the depth can be infinite. Each node can be clicked to trigger a user defined callback to perform some action. Tests and two demos were added for this UI element. Below is a screenshot for reference: + + .. image:: https://camo.githubusercontent.com/dd23b7c8503e4d01c80f2d9e84ee173e06c61eeb7c348c35aeadc75f722647ca/68747470733a2f2f692e696d6775722e636f6d2f4e49334873746c2e706e67 + :width: 200 + :height: 200 + + *Pull Requests:* + + - **Tree2D UI element:** https://github.com/fury-gl/fury/pull/460 + - **Tree2D UI element demo:** https://github.com/fury-gl/fury/pull/460 + +- **Add Accordion2D UI element to the UI sub-module** + + Added Accordion2D to the UI sub-module. This Ui element allows users to visulize data in a tree with depth of one. Each node has a title and a content panel. The children for each node can be N if and only if the children are not nodes themselves. The child UIs can be placed inside the content panel by passing some coordinates, which can be absolute or normalized w.r.t the node content panel size. Tests and two demos were added for this UI element. Below is a screenshot for reference + + .. image:: https://camo.githubusercontent.com/9395d0ea572d7f253a051823f02496450c9f79d19ff0baf32841ec648b6f2860/68747470733a2f2f692e696d6775722e636f6d2f7854754f645a742e706e67 + :width: 200 + :height: 200 + + *Pull Requests:* + + - **Accordion2D UI element:** https://github.com/fury-gl/fury/pull/487 + - **Accordion2D UI element demo:** https://github.com/fury-gl/fury/pull/487 + +Objectives in Progress +---------------------- + +- **Add support for Layout in UI elements** + + Currently all the available layouts are only available for actors i.e. of type vtkActor2D. In order to add support for the layouts in UI elements there needs to be some tweaking in the base Layout class. Currently, the PR that adds these functionalities in stalling because of some circular imports. These will hopefully be fixed soon and as soon as the circular imports are fixed, the PR will be merged. + + *Pull Requests:* + + - **Add support for Layout in UI elements:** https://github.com/fury-gl/fury/pull/443 + +- **Method to process and load sprite sheets** + + This method adds support for loading and processing a sprite sheet. This will be very useful in playing animations from a n*m sprite sheet. This also has a flag to convert the processed chunks into vtkimageData which can be directly used to update the texture in some UI elements. The primary use of this method will in a tutorial for Card2D, wherein, the image panel of the card will play the animation directly from the sprite sheet. + + *Pull Requests:* + + - **Method to process and load sprite sheets:** https://github.com/fury-gl/fury/pull/491 + +Other Objectives +---------------- + +- **Add Card2D UI element to UI sub-module** + + Added Card2D UI element to the UI sub-module. A Card2D is generally divided into two parts i.e. the image content and the text content. This version of card has an image which can be fetched from a URL and the text content which is yet again divided into two parts i.e. the title and the body. The space distribution between the image and the text content is decided by a float between 0 and 1. A value of 0 means the image takes up no space and a value of 1 means the image consumes the whole space. Below is a demonstration: + + .. image:: https://camo.githubusercontent.com/a2e461352799b6490088de15ac041162d7bf8adf9c07485ea921b525fecd0a8e/68747470733a2f2f692e696d6775722e636f6d2f446c69537066302e676966 + :width: 200 + :height: 200 + + *Pull Requests:* + + - **Add Card2D UI element to UI sub-module:** https://github.com/fury-gl/fury/pull/398 + +- **Resize Panel2D with WindowResizeEvent or from corner placeholder** + + Currently, the size of the Panel2D is static and cannot be changed dynamically. The size is passed in during the initialization and cannot be changed easily at runtime. This PR adds support for resizing the Panel2D dynamically by adding a placeholder icon at the bottom right corner of the panel. This icon can be click and dragged on to change the size accordingly. Other than this, the panel also retains a specific size ratio when the window is resized. This means if the window is resized in any direction the panel adapts itself w.r.t the updated size. This is done by adding relevant observers for the WindowResizeEvent and binding the relevant callback to it. Below is a quick demonstration: + + .. image:: https://camo.githubusercontent.com/3b1bf6a1b6522a6079055ff196551362fcf89a41b35ac4b32315ce02333e496d/68747470733a2f2f692e696d6775722e636f6d2f3837504e3754512e676966 + :width: 200 + :height: 200 + + *Pull Requests:* + + - **Resize Panel2D with WindowResizeEvent or from corner placeholder:** https://github.com/fury-gl/fury/pull/446 + +- **Added the watcher class to UI** + + This PR adds support for a watcher class in the UI elements. The purpose of this class is to monitor a particular attribute from the UI element after it has been added to the scene. If the attribute changes in the real time, a user defined callback is triggered and the scene is force rendered. + + *Pull Requests:* + + - **Added wathcer class to the UI sub-module:** https://github.com/fury-gl/fury/pull/448 + +- **Added support for borders in Panel2D** + + The Panel2D previously, didn't support any sort of effect, the main reason behind this is that, all UI elements are individual entities that are comprised of different actors. These are not the widgets provided by vtk and in order to have some effects provided by vtk shaders must be involved. This obviously makes the whole system very complicated. The border on the other hand uses 4 Rectangle2Ds to draw the 4 borders. This makes the whole process easier but makes the Panel2D very performance heavy as we are adding 5 actors to the scene. Future iterations will replace these rectangles by textures, that way we don't compromise performance and we can have different patterns in the border. Below is a demonstration: + + .. image:: https://user-images.githubusercontent.com/54466356/121709989-bd340280-caf6-11eb-9b8a-81c65260d277.png + :width: 200 + :height: 200 + + *Pull Requests:* + + - **Added support for borders in Panel2D:** https://github.com/fury-gl/fury/pull/441 + +- **GSoC weekly Blogs** + + Weekly blogs were added for FURY's Website. + + *Pull Requests:* + + - **First Evaluation:** https://github.com/fury-gl/fury/pull/477 + + - **Second Evaluation:** https://github.com/fury-gl/fury/pull/494 + +Timeline +-------- + ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Date | Description | Blog Link | ++=======================+==================================================================+=======================================================================================================================================================+ +| Week 1(08-06-2021) | Welcome to my weekly Blogs! | `Weekly Check-in #1 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 2(14-06-2021) | Feature additions in UI and IO modules | `Weekly Check-in #2 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 3(21-06-2021) | Adapting GridLayout to work with UI | `Weekly Check-in #3 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 4(28-06-2021) | Adding Tree UI to the UI module | `Weekly Check-in #4 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 5(05-07-2021) | Rebasing all PR's w.r.t the UI restructuring, Tree2D, Bug Fixes | `Weekly Check-in #5 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 6(12-07-2021) | Bug fixes, Working on Tree2D UI | `Weekly Check-in #6 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 7(19-07-2021) | Finalizing the stalling PR's, finishing up Tree2D UI. | `Weekly Check-in #7 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 8(26-07-2020) | Code Cleanup, Finishing up open PR's, Continuing work on Tree2D. | `Weekly Check-in #8 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 9(02-08-2021) | More Layouts! | `Weekly Check-in #9 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 10(09-08-2021) | Accordion UI, Support for sprite sheet animations. | `Weekly Check-in #10 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ +| Week 11(16-08-2021) | More tutorials for Accordion2D, Finalizing remaining PRs. | `Weekly Check-in #11 `__ | ++-----------------------+------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+ + + + +Detailed weekly tasks and work done can be found +`here `_. \ No newline at end of file