Andrew Stacey's Code Projects
20220904
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.

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

Bernoulli. A demonstration of the histogram for the sum of Bernoulli distributions (with varying
p
andn
). Original code available on github. 
Poisson. A modification of the sum of Bernoulli distributions program to display a Poisson distribution. Original code available on github.

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

Trigonometry. A demonstration of the connection between circles and the trigonometric functions. Original code available on github.
A better demonstration uses jsCanvas (see below).

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

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

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

Triangle Calculator. A Triangle Calculator, for calculating the side lengths in a rightangled triangle. Original code on github.

Emoji Story Dice. A customisable version of story cubes. Pick emoji (or other) characters to put on the cubes and get a reusable 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.

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

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

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

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

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

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

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

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

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

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

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.

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

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

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 selfintersections of the path and insert the relevant gaps. This was then exported to SVG, which was then animated using javascript.

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.

MathJax to MathML. A simple webpage that uses MathJax to convert LaTeXlike syntax to MathML. Original code available on github.

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

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

LuaCanvas (relocated). This code provides a playground for graphical programming using the
lua
language. Original code available on github. 
jsCanvas. This code provides a playground for graphical programming using
javascript
. Original code available on github. 
Brickout A version of the classic Brickout game written using
jsCanvas
. 
WebGL Experiments. Some experiments with WebGL. Original code available on github.

Quick Hobby in Javascript. A demonstration of the quick variant of Hobby's pathfitting algorithm in javascript. Original code on github.

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