Skip to content

Commit 752d01c

Browse files
committed
review all blog posts
1 parent e81928e commit 752d01c

44 files changed

Lines changed: 221 additions & 171 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

feed/rss.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<description><![CDATA[Pedroth's Corner: Maths. Computer Science. Philosophy]]></description>
55
<link>https://pedroth.github.io</link>
66
<generator>Pedroth RSS Generator</generator>
7-
<lastBuildDate>Fri, 08 May 2026 23:15:35 GMT</lastBuildDate>
7+
<lastBuildDate>Sat, 16 May 2026 23:48:51 GMT</lastBuildDate>
88
<atom:link href="https://pedroth.github.io/feed/rss.xml" rel="self" type="application/rss+xml"/>
99
<language><![CDATA[en-US]]></language>
1010
<item>

macros.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,20 @@ function quote(input) {
44
function split(input) {
55
return `<div style="display: flex; gap: 1rem;">${input}</div>`;
66
}
7-
MACROS = { quote, split }
7+
8+
function details(input, args) {
9+
console.log("Details macro", args);
10+
return `
11+
<details style="margin-left: 1rem;">
12+
<summary style="font-weight: bold; cursor: pointer;">${args[0]}</summary>
13+
<div style="margin-left: 1rem;">${input}</div>
14+
</details>
15+
`;
16+
}
17+
18+
function scaleDiv(nablaImg, args) {
19+
const [scalePercentage, heightPercentage] = args;
20+
return `<div style="width:${scalePercentage}%; height: ${heightPercentage ?? 100}%; margin-left: auto; margin-right: auto;">${nablaImg}</div>`;
21+
}
22+
23+
MACROS = { quote, split, details, scaleDiv };

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

posts/3DRoute/3DRoute.nd

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
:: import "./macros.js"; ::
12
<!--
23
title: 3D Route
34
creationDate: 22/12/2021
@@ -13,16 +14,17 @@ tags: [
1314
experiment
1415
]
1516
-->
16-
After discovering that phone sensor data can be accessed from the browser[^hardware], I decided to do a project with that. This project is a way to visualize this sensor data. In this demo, you will see a wireframe abstraction of a phone, moving in space, with its movement tracing a path.
17+
After discovering that phone sensor data can be accessed from the browser[^hardware], I decided to build a project around it. This project is a way to visualize that sensor data. In this demo, you can see a wireframe abstraction of a phone moving in space, with its movement tracing a path.
1718

18-
Sensors used were:
19+
The sensors used are:
1920
- [Real-time orientation](https://w3c.github.io/deviceorientation/#deviceorientation)
2021
- [Real-time acceleration](https://w3c.github.io/deviceorientation/#def-devicemotion)
2122

2223
While initially designed for mobile hardware, a desktop version of this demo is also available.
2324

25+
@scaleDiv(66){
2426
![Video of the desktop version](/posts/3DRoute/3DRoute.webm)
25-
27+
}
2628

2729
## Project
2830

@@ -39,4 +41,4 @@ While initially designed for mobile hardware, a desktop version of this demo is
3941
</a>
4042
</div>
4143

42-
[^hardware]: [google developers device orientation](https://developers.google.com/web/fundamentals/native-hardware/device-orientation)
44+
[^hardware]: [Google Developers: Device Orientation](https://developers.google.com/web/fundamentals/native-hardware/device-orientation)

posts/ArcSummary/ArcSummary.nd

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,24 @@ tags: [
1111
project
1212
]
1313
-->
14-
This blog entry redirects you to my masters thesis about _"Arc Summaries of TV Series"_. Although I _couldn't test it properly_, in the paper there are a good description of the algorithms that were developed/used for *segmentation*, *clustering* and *summarization* of text signals. In the paper we used [Spectral Graph Theory](https://en.wikipedia.org/wiki/Spectral_graph_theory) framework to solve most of the problems, relating this area with glimpses of other fields such as [Discrete Exterior Calculus](https://en.wikipedia.org/wiki/Discrete_exterior_calculus), [Functional Data Analysis](https://en.wikipedia.org/wiki/Functional_data_analysis).
14+
This blog entry redirects you to my master's thesis, _"Arc Summaries of TV Series"_. Although I _couldn't test it properly_, the paper contains a good description of the algorithms developed and used for *segmentation*, *clustering*, and *summarization* of text signals. In the paper, we used the [Spectral Graph Theory](https://en.wikipedia.org/wiki/Spectral_graph_theory) framework to solve most of the problems, connecting this area with ideas from other fields such as [Discrete Exterior Calculus](https://en.wikipedia.org/wiki/Discrete_exterior_calculus) and [Functional Data Analysis](https://en.wikipedia.org/wiki/Functional_data_analysis).
1515

1616
## Abstract
1717

18-
In this dissertation, we aim to create a system capable of generating summaries of arcs of TV series. With thousands of hours of video being uploaded and stored in video-sharing websites and online streaming services, a need for video summarization appears as a necessary tool to save time and catch up with our beloved series. We propose a way to solve this problem using just subtitles information. The presented solution uses the framework of spectral graph theory to segment, find story arcs and summarize those arcs.
18+
In this dissertation, we aim to create a system capable of generating summaries of TV series story arcs. With thousands of hours of video being uploaded and stored on video-sharing websites and online streaming services, video summarization becomes a necessary tool to save time and catch up with our beloved series. We propose a way to solve this problem using only subtitle information. The presented solution uses the spectral graph theory framework to segment episodes, identify story arcs, and summarize those arcs.
1919

2020
- [Thesis](/posts/ArcSummary/thesisPedroth.pdf)
2121
- [Extended Abstract (Article form)](/posts/ArcSummary/extendedAbstract.pdf)
22-
- [Presentation ( watch it in presentation mode )](https://docs.google.com/presentation/d/1iQXAZszNOVqrjnANjOsVPEUHrQNjqlOWJqWMKAidRgc/edit?usp=sharing)
22+
- [Presentation (watch it in presentation mode)](https://docs.google.com/presentation/d/1iQXAZszNOVqrjnANjOsVPEUHrQNjqlOWJqWMKAidRgc/edit?usp=sharing)
2323

2424
## Video Tutorial
2525

26-
In this video tutorial, you will understand how to use the software made for implementation of the thesis.
26+
In this video tutorial, you will learn how to use the software built to implement the thesis.
2727

2828
![Video tutorial of the Arc Summarizer](https://youtu.be/5Oc-WWqchZg)
2929

3030

31-
## Running with docker
31+
## Running with Docker
3232

3333
Just run:
3434

@@ -37,22 +37,22 @@ sudo docker run -it -v <full path to folder where your series are>:<some contain
3737
```
3838

3939

40-
It will run a page at `localhost:31415/ArcSummary`. There you must insert the full path to folder where the series is in the container.
40+
It will run a page at `localhost:31415/ArcSummary`. There, you must enter the full path to the folder where the series is located inside the container.
4141

4242
### Example
4343

44-
A simple example would be:
44+
A simple example would be:
4545

4646
```sh
4747
sudo docker run -it -v ~/Downloads/OverTheGardenWall:/app/OverTheGardenWall -p 31415:31415 pedroth/arc-summary
4848
```
4949

50-
Then in `localhost:31415/ArcSummary`, in the `base folder` input you should put `/app/OverTheGardenWall`. For more details check the video tutorial above.
50+
Then, at `localhost:31415/ArcSummary`, in the `base folder` input, you should enter `/app/OverTheGardenWall`. For more details, check the video tutorial above.
5151

5252

5353
## Artifacts
5454

55-
As said above, you can test the software by using docker, or use the alternative, which is to download the artifacts below:
55+
As mentioned above, you can test the software by using Docker, or use the alternative option, which is to download the artifacts below:
5656

5757
- ArcSummary.zip:
5858
- ArcSummary.jar

posts/BitCalculator/BitCalculator.nd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ tags: [
1010
project
1111
]
1212
-->
13-
_Bit Calculator_ is a simple _parser_ and _evaluator_ for mathematical expressions in binary. My main motivation for creating this, was to study [formal grammars](https://en.wikipedia.org/wiki/Formal_grammar), [parsers](https://en.wikipedia.org/wiki/Recursive_descent_parser) and [compilers](https://en.wikipedia.org/wiki/Compiler). To achieve this, I tried to build the simplest parser I could, using no dependencies. The parser that was implemented is similar to a [parser combinator](https://en.wikipedia.org/wiki/Parser_combinator). With the practice I have got from this I started to write the [Nabladown language](https://github.com/pedroth/nabladown.js).
13+
_Bit Calculator_ is a simple _parser_ and _evaluator_ for mathematical expressions in binary. My main motivation for creating this was to study [formal grammars](https://en.wikipedia.org/wiki/Formal_grammar), [parsers](https://en.wikipedia.org/wiki/Recursive_descent_parser), and [compilers](https://en.wikipedia.org/wiki/Compiler). To achieve this, I tried to build the simplest parser I could, with no dependencies. The implemented parser is similar to a [parser combinator](https://en.wikipedia.org/wiki/Parser_combinator). With the practice I got from this project, I started writing the [Nabladown language](https://github.com/pedroth/nabladown.js).
1414

15-
Please go check the project page.
15+
Please check the project page.
1616

1717
![Bit calculator gif](/posts/BitCalculator/BitCalculator.webp)
1818

posts/BrownianMotion/BrownianMotion.nd

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ tags: [
1414
]
1515
-->
1616

17-
_Brownian Motion_ is `java` application where particles collide with each other. In this program you are able to control the direction of a constant length force field. I created it because I enjoy observing the dynamics of the system. Enjoy!
17+
_Brownian Motion_ is a `Java` application where particles collide with each other. In this program, you can control the direction of a constant-magnitude force field. I created it because I enjoy observing the dynamics of the system. Enjoy!
1818

19+
@scaleDiv(66){
1920
![*Brownian motion* app](/posts/BrownianMotion/BrownianMotion.webm)
21+
}
2022

2123
## Links
2224

@@ -33,9 +35,9 @@ tags: [
3335
</a>
3436
</div>
3537

36-
## Running with docker
38+
## Running with Docker
3739

38-
Copy paste to a terminal:
40+
Copy and paste this into a terminal:
3941

4042
```sh
4143
xhost + && sudo docker run --rm -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=$DISPLAY -it pedroth/java-apps bash -c "java -cp Learning/learning.jar apps.BrownianMotion"
@@ -53,23 +55,23 @@ xhost + && sudo docker run --rm -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=$
5355

5456
## Details
5557

56-
All balls have the same size and start in a random position and velocity. They can be accelerated by a constant force field $X$, controlled by the user. When a ball is moving in free space it moves as an accelerated object:
58+
All balls have the same size and start with random positions and velocities. They can be accelerated by a constant force field $X$, controlled by the user. When a ball is moving in free space, it behaves like an accelerated object:
5759

5860
$$ \ddot p_i = X $$
5961

6062
@quote(){
6163
$p_i$ is the position of the ball.
6264
}
6365

64-
The interesting behavior is when there is a *collision* between two balls. In this regime the ball velocity will be updated as follows:
66+
The interesting behavior appears when there is a *collision* between two balls. In this regime, the ball velocity is updated as follows:
6567

6668
$$
6769
\dot p_i = v_i - (2 - \beta) \left < v_i, n \right> n
6870
$$
6971

70-
Where $v$ is the velocity of the ball before collision and $n$ is the normalized normal to the plane of contact between the balls in collision. That is:
72+
Here, $v$ is the velocity of the ball before collision, and $n$ is the normalized normal to the contact plane between the colliding balls. That is:
7173
$$n = \frac{p_i - p_j}{|p_i - p_j|}$$
7274

73-
While $\beta$ is the damping factor, which is a value between $0< \beta < 1$. Where $\beta = 0$.
75+
Here, $\beta$ is the damping factor, with values in the range $0 < \beta < 1$.
7476

75-
This simulation doesn't try to follow the rules of physics, instead it tries to be a cool dynamical system.
77+
This simulation is not trying to be physically exact. It just aims to be a cool dynamical system.
0 Bytes
Binary file not shown.

posts/CellularAutomaton/CellularAutomaton.nd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ tags: [
1111
experiment
1212
]
1313
-->
14-
I made a simple [*Cellular Automaton*][automaton] application long time ago. Here each pixel represents a [cellular automaton][automaton] which is *alive* if is green or *dead* if is dark. The rules for the cellular automaton to be born and to survive are defined by the $S/B$ rules:
15-
- $S$ defines counts of alive neighbors necessary for a cell to survive.
16-
- $B$ defines counts of alive neighbors necessary for a cell to be born.
14+
I made a simple [*Cellular Automaton*][automaton] application a long time ago. Here, each pixel represents a [cellular automaton][automaton], which is *alive* if it is green and *dead* if it is dark. The rules for a cellular automaton to be born and to survive are defined by the $S/B$ notation:
15+
- $S$ defines the numbers of live neighbors required for a cell to survive.
16+
- $B$ defines the numbers of live neighbors required for a cell to be born.
1717

18-
If cell is not born or does not survive, then it dies or remains dead.
18+
If a cell is not born or does not survive, then it dies or remains dead.
1919

20-
In this _app_ you can try several [cellular automata rules][rules]:
20+
In this _app_, you can try several [cellular automata rules][rules]:
2121

2222
- Maze: `12345/3` *[key 1]*
2323
- 34 Life: `34/34` *[key 2]*
2424
- Coral: `45678/3` *[key 5]*
2525
- Coagulation: `235678/378` *[key 6]*
2626
- Replicator: `1357/1357` *[key 7]*
2727
- Gnarl: `1/1` *[key 8]*
28-
- Flakes: ` 012345678/3` *[key 9]*
29-
- Total Random rules *[key 0]*
28+
- Flakes: `012345678/3` *[key 9]*
29+
- Totally random rules *[key 0]*
3030

3131
![*Cellular automaton* app video](https://www.youtube.com/watch?v=HO1TijJ5DFM)
3232

33-
In the beginning you are able to draw the initial condition of the cells, then press `space bar` to start the animation.
33+
At the beginning, you can draw the initial state of the cells, then press the `space bar` to start the animation.
3434

3535

3636
## Links
@@ -48,9 +48,9 @@ In the beginning you are able to draw the initial condition of the cells, then p
4848
</a>
4949
</div>
5050

51-
## Running with docker
51+
## Running with Docker
5252

53-
Copy paste to a terminal:
53+
Copy and paste this into a terminal:
5454

5555
```sh
5656
xhost + && sudo docker run --rm -v /tmp/.X11-unix:/tmp/.X11-unix:ro -e DISPLAY=$DISPLAY -it pedroth/java-apps bash -c "java -cp Learning/learning.jar apps.ParallelCellularAutomaton"
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)