Add gifs showcasing knots, add simple shell scripts to build/deploy

This commit is contained in:
Joseph Ferano 2023-08-18 15:52:45 +07:00
parent 4cebcebfa3
commit ba080403f5
7 changed files with 27 additions and 8 deletions

View File

@ -4,21 +4,28 @@
** About
[[https://ferano.io/3d-fp/][Live Link]]
[[https://ferano.io/pqtk/][Live Link]]
This is an attempt to implement the [[https://en.wikipedia.org/wiki/Torus_knot][PQ Torus Knot]] in the Elm programming
language.
This is an implementation of the [[https://en.wikipedia.org/wiki/Torus_knot][PQ Torus Knot]] in the Elm programming language
using WebGL. I worked on this project for a few weeks in 2019. However, it was
just thrown into a git repo without much consideration, along with [[https://git.ferano.io/JosephFerano/fp-rendering-engine][this]] project.
I felt this deserved a little bit more TLC, so I decided to spruce it up a little
bit and move it to its own repository. Here's the [[https://github.com/JosephFerano/elm-graphics][original project]].
** Showcase
[[file:./media/red-p2q5.gif]]
[[file:./media/blue-p3q5.gif]]
[[file:./media/green-p2q9.gif]]
[[file:./media/yellow-p8q9.gif]]
** Keybindings
You can increment/decrement P or Q using the keyboard to get different geometry;
You can increment P or Q with the keyboard by pressing ~p~ or ~q~ and decrement with
the neighboring letter ~o~ and ~w~ respectively.
- Increment P: ~p~
- Increment Q: ~q~
- Decrement P: ~w~
- Decrement Q: ~o~
- Incr/Decr P: ~p/o~
- Incr/Decr Q: ~q/w~
** Building with Elm 0.18.0
To install the binaries manually, follow this short guide; - [[https://sirfitz.medium.com/install-elm-0-18-0-in-2021-3f64ce298801][Install Binaries]]

8
build.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
elm make Torus.elm
sed -i 's/<title>Torus<\/title>/<title>PQ Torus Knot<\/title>/g' index.html
mkdir -p ./public
mv index.html ./public/
cd public
zip -r ../pqtk.zip .

4
deploy.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
scp pqtk.zip joe-vps:~
ssh joe-vps 'unzip -o pqtk.zip -d ~/websites/pqtk/ && rm pqtk.zip'

BIN
media/blue-p3q5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 KiB

BIN
media/green-p2q9.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 KiB

BIN
media/red-p2q5.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 KiB

BIN
media/yellow-p8q9.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 KiB