Skip to content

Commit

Permalink
fix typo in blog posts (#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
WassCodeur authored Jul 29, 2024
1 parent e7932d6 commit 77ce124
Show file tree
Hide file tree
Showing 21 changed files with 166 additions and 199 deletions.
2 changes: 1 addition & 1 deletion docs/source/posts/2021/2021-08-16-week-11-antriksh.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Below are the tasks that I worked on:
* `Created PR for sprite sheet animation <https://github.com/fury-gl/fury/pull/491>`_ : 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 <https://github.com/fury-gl/fury/pull/486>`_ : 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 <https://github.com/fury-gl/fury/pull/443>`_ : 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 separate 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 <https://github.com/matplotlib/matplotlib/blob/3a4fdea8d23207d67431973fe5df1811605c4132/lib/matplotlib/text.py#L106>`_ 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.<https://github.com/matplotlib/matplotlib/blob/3a4fdea8d23207d67431973fe5df1811605c4132/lib/matplotlib/artist.py#L94>`_ Everything is handled internally in matplotlib, to draw the rasterized text `this function is used. <https://github.com/matplotlib/matplotlib/blob/3a4fdea8d23207d67431973fe5df1811605c4132/lib/matplotlib/text.py#L672>`_ 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.
* **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 separate 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 <https://github.com/matplotlib/matplotlib/blob/3a4fdea8d23207d67431973fe5df1811605c4132/lib/matplotlib/text.py#L106>`_ 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 <https://github.com/matplotlib/matplotlib/blob/3a4fdea8d23207d67431973fe5df1811605c4132/lib/matplotlib/artist.py#L94>`_. Everything is handled internally in matplotlib, to draw the rasterized text `this function is used. <https://github.com/matplotlib/matplotlib/blob/3a4fdea8d23207d67431973fe5df1811605c4132/lib/matplotlib/text.py#L672>`_ 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?
-------------------------
Expand Down
71 changes: 26 additions & 45 deletions docs/source/posts/2021/2021-16-08-gsoc-devmessias-11.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Week #11: Removing the flickering effect
Week 11: Removing the flickering effect
========================================

.. post:: August 16 2021
Expand All @@ -12,69 +12,50 @@ What did I do this week?
FURY
^^^^

- `PR fury-gl/fury#489: <https://github.com/fury-gl/fury/pull/489>`__
1. `PR fury-gl/fury#489: <https://github.com/fury-gl/fury/pull/489>`_

This PR give to FURY three
pre-built texture maps using different fonts. However, is quite easy
to create new fonts to be used in a visualization.
| It's was quite hard to develop the shader code and find the correct
positions of the texture maps to be used in the shader. Because we
used the freetype-py to generate the texture and packing the glyps.
However, the lib has some examples with bugs. But fortunately, now
everything is working on FURY. I've also created two different examples
to show how this PR works.
This PR give to FURY three pre-built texture maps using different fonts. However, is quite easy to create new fonts to be used in a visualization.

The first example, viz_huge_amount_of_labels.py, shows that the user can
draw hundreds of thousands of characters.
It's was quite hard to develop the shader code and find the correct positions of the texture maps to be used in the shader. Because we used the freetype-py to generate the texture and packing the glyps. However, the lib has some examples with bugs. But fortunately, now everything is working on FURY. I've also created two different examples to show how this PR works.

The first example, viz_huge_amount_of_labels.py, shows that the user can draw hundreds of thousands of characters.

|image2|

The second example, viz_billboad_labels.py, shows the different behaviors of the label actor. In addition, presents
to the user how to create a new texture atlas font to be used across different visualizations.
|image2|

- `PR fury-gl/fury#437: <https://github.com/fury-gl/fury/pull/437>`__
The second example, viz_billboad_labels.py, shows the different behaviors of the label actor. In addition, presents to the user how to create a new texture atlas font to be used across different visualizations.

- Fix: avoid multiple OpenGl context on windows using asyncio
The streaming system must be generic, but opengl and vtk behaves in uniques ways in each Operating System. Thus, can be tricky
to have the same behavior acrros different OS. One hard stuff that we founded is that was not possible to use my
TimeIntervals objects (implemented with threading module) with vtk. The reason for this impossibility is because we can't use
vtk in windows in different threads. But fortunely, moving from the threading (multithreading) to the asyncio approcach (concurrency)
have fixed this issue and now the streaming system is ready to be used anywhere.
2. `PR fury-gl/fury#437: <https://github.com/fury-gl/fury/pull/437>`_

- Flickering:
- Fix: avoid multiple OpenGl context on windows using asyncio

Finally, I could found the cause of the flickering effect on the streaming system.
This flickering was appearing only when the streaming was created using the Widget object.
The cause seems to be a bug or a strange behavior from vtk.
Calling iren.MouseWheelForwardEvent() or iren.MouseWheelBackwardEvent()
inside of a thread without invoking the
Start method from a vtk instance produces a memory corruption.
Fortunately, I could fix this behavior and now the streaming system is
working without this glitch effect.
The streaming system must be generic, but opengl and vtk behaves in uniques ways in each Operating System. Thus, can be tricky to have the same behavior acrros different OS. One hard stuff that we founded is that was not possible to use my
TimeIntervals objects (implemented with threading module) with vtk. The reason for this impossibility is because we can't use vtk in windows in different threads. But fortunely, moving from the threading (multithreading) to the asyncio approcach (concurrency) have fixed this issue and now the streaming system is ready to be used anywhere.

- Flickering:

Finally, I could found the cause of the flickering effect on the streaming system.
This flickering was appearing only when the streaming was created using the Widget object.
The cause seems to be a bug or a strange behavior from vtk.
Calling iren.MouseWheelForwardEvent() or iren.MouseWheelBackwardEvent()
inside of a thread without invoking the
Start method from a vtk instance produces a memory corruption.
Fortunately, I could fix this behavior and now the streaming system is
working without this glitch effect.


FURY/Helios
^^^^^^^^^^^

- `PR fury-gl/helios#24
: <https://github.com/fury-gl/helios/pull/24>`__
3. `PR fury-gl/helios#24: <https://github.com/fury-gl/helios/pull/24>`__

This uses the
`PRfury-gl/fury#489: <https://github.com/fury-gl/fury/pull/489>`__ to
give the network label feature to helios. Is possible to draw node
labels, update the colors, change the positions at runtime. In addition,
when a network layout algorithm is running this will automatically
update the node labels positions to follow the nodes across the screen.
This uses the `PRfury-gl/fury#489: <https://github.com/fury-gl/fury/pull/489>`__ to give the network label feature to helios. Is possible to draw node labels, update the colors, change the positions at runtime. In addition, when a network layout algorithm is running this will automatically update the node labels positions to follow the nodes across the screen.

|image1|

- `PR fury-gl/helios#23:
Merged. <https://github.com/fury-gl/helios/pull/23>`__
4. `PR fury-gl/helios#23 (merged): <https://github.com/fury-gl/helios/pull/23>`__

This PR granted compatibility between IPC Layouts and Windows. Besides
that , now is quite easier to create new network layouts using inter
process communication
This PR granted compatibility between IPC Layouts and Windows. Besides that , now is quite easier to create new network layouts using inter process communication

Did I get stuck anywhere?
-------------------------
Expand Down
1 change: 1 addition & 0 deletions docs/source/posts/2022/2022-09-15-week-13-blog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This week I fixed all the issues with skeletal animations, and we got to see our
- Implemented a hierarchical timeline system (i.e., one timeline for each bone, and the timeline will contain its parent timeline in a hierarchy).

- I figured out that we don't need to apply the parent transform as we're applying it to the vertex data while forming the actor. So the skin matrix becomes

``SkinMatrix = InverseBindPose * BoneDeform`` where ``BoneDeform = CurrentBoneTransform * ParentBonetransform``.

Here's a preview using the ``CesiumMan`` model:
Expand Down
Loading

0 comments on commit 77ce124

Please sign in to comment.