Andrew Stacey's Code Projects

Andrew Stacey

2022-09-04

1 My Code Projects

1.1 Teaching Resources

These are resources I wrote specifically to use in lessons to illustrate or help with some aspect of the curriculum.

  1. Worksheets. A worksheet generator. Original code available on github.

  2. Bernoulli. A demonstration of the histogram for the sum of Bernoulli distributions (with varying p and n). Original code available on github.

  3. Poisson. A modification of the sum of Bernoulli distributions program to display a Poisson distribution. Original code available on github.

  4. Statistics. A data summariser with histogram, frequency table, and a moveable "marker" to find the median and quartiles. Original code available on github.

  5. Trigonometry. A demonstration of the connection between circles and the trigonometric functions. Original code available on github.

    A better demonstration uses jsCanvas (see below).

  6. Arithmetic. A demonstration of the formula for the sum of an arithmetic series. Original code available on github.

  7. Complex Canvas. A program for visualising complex numbers and operations on them. Original code available on github.

  8. Axes. A program for making axes suitable for printing. Original code available on github.

  9. Triangle Calculator. A Triangle Calculator, for calculating the side lengths in a right-angled triangle. Original code on github.

  10. Emoji Story Dice. A customisable version of story cubes. Pick emoji (or other) characters to put on the cubes and get a re-usable link that uses those characters. Original code on github.

2 Explorations, Puzzles, and Games

These are resources of a more recreational nature, most still to be of use in a lesson but less directly focussed on curriculum matters.

  1. Chaos. A simple demonstration of the logistic map leading to chaotic behaviour. Original code available on github.

  2. Polyominoes. This code generates the unique polyominoes of a given size. Original code available on github.

  3. Hypocycloid. A javascript rewrite of Craig Kaplan's hypocycloids. Original code available on github.

  4. Monte Carlo. A program for running experiments in probaility, currently flipping some number of coins. Original code available on github.

  5. Vector Racer. A racing game where you control your acceleration at each turn. Original code available on github.

  6. Make a Number. A variant of the Countdown Number game. Original code available on github.

  7. Magic Calculator. The Magic Calculator, popular with Christmas crackers. Original code on github.

  8. Text Analyser. A preliminary version of a text analyser for gathering statistics on a body of text. Original code on github.

  9. Modular Calculator. A Modular Arithmetic Calculator, for doing arithmetic modulo some integer. Original code on github.

  10. What's My Function? A function guessing game. Original code on github.

  11. House of Commons Visualisation. A fork of the House of Commons Vote Visualiser by Floklimm for visualising how MPs voted during the Brexit Indicative Votes.

  12. Squircle Clock. Converts the date and time into a shape using Fourier series, circles, and squares. Original code on github.

  13. Toroidal Sandpiles. Inspired by Annie Perkins' Math Art Challenge on sand piles. Original code on github.

  14. Knight's Tour. This is an animation of one of Robert Bosch's knight's tours realised as an alternating knot. The original path was devised by using the spath3 library for TikZ to compute the self-intersections of the path and insert the relevant gaps. This was then exported to SVG, which was then animated using javascript.

  15. Make a Peano Picture. This creates a "Peanoified" version of an image. For details of the procedure, read the article "What can you do with this space?" in the Chalkdust Magazine. Original code available on github.

3 Tools

These are some resources intended to be useful.

  1. MathJax to MathML. A simple webpage that uses MathJax to convert LaTeX-like syntax to MathML. Original code available on github.

  2. Extra Time Calculator. A little extra time calculator for exams. Original code on github.

  3. Sociogram Generator. Generate sociograms of likes and dislikes. Original code on github.

4 Programming

  1. LuaCanvas (relocated). This code provides a playground for graphical programming using the lua language. Original code available on github.

  2. jsCanvas. This code provides a playground for graphical programming using javascript. Original code available on github.

  3. Brickout A version of the classic Brickout game written using jsCanvas.

  4. WebGL Experiments. Some experiments with WebGL. Original code available on github.

    1. Fractals

    2. Fragments

    3. Voronoi Diagrams

    4. Voronoi Football Diagrams

  5. Quick Hobby in Javascript. A demonstration of the quick variant of Hobby's path-fitting algorithm in javascript. Original code on github.

  6. PHPLaTeX. A php site that converts a subset of TeX (but more than just Mathematics) to HTML5+MathML. Original code on github.