A web app I created to aid in visualising the surjective map from
https://dylanjohnston.github.io/S4ontoS3visualisation
The repository is made up of three main parts:
This directory contains 24 .gif
files, each of which is an animation showing the action of an element of
This Python file contains the code used to produce the 24 animations. It works by defining a $3$d linear transformation matplotlib.animation
.
Another fun problem was determining whether edges should be drawn using solid or dotted lines. This was accomplished using linear algebra and concepts involving convex hulls. Roughly, each face of the tetrahedron defines a plane, and each point along an edge defines a line passing through the camera's position and the point. The intersection of this line and the plane was found, and it was then checked if the intersection point lay on the face. This was done using some theory involving convex hulls and linear programming. If a sample point along a given edge produced an intersection point lying within the convex hull, the edge was considered hidden and was drawn using a dotted line.
The JS is used to dynamically update the