diff --git a/README.org b/README.org index 24fbe60..11bec01 100644 --- a/README.org +++ b/README.org @@ -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]] diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..ed79e18 --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +elm make Torus.elm +sed -i 's/Torus<\/title>/<title>PQ Torus Knot<\/title>/g' index.html +mkdir -p ./public +mv index.html ./public/ +cd public +zip -r ../pqtk.zip . diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..3e89879 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +scp pqtk.zip joe-vps:~ +ssh joe-vps 'unzip -o pqtk.zip -d ~/websites/pqtk/ && rm pqtk.zip' diff --git a/media/blue-p3q5.gif b/media/blue-p3q5.gif new file mode 100644 index 0000000..28dff18 Binary files /dev/null and b/media/blue-p3q5.gif differ diff --git a/media/green-p2q9.gif b/media/green-p2q9.gif new file mode 100644 index 0000000..e87a4c5 Binary files /dev/null and b/media/green-p2q9.gif differ diff --git a/media/red-p2q5.gif b/media/red-p2q5.gif new file mode 100644 index 0000000..91e92da Binary files /dev/null and b/media/red-p2q5.gif differ diff --git a/media/yellow-p8q9.gif b/media/yellow-p8q9.gif new file mode 100644 index 0000000..d3b4d51 Binary files /dev/null and b/media/yellow-p8q9.gif differ