Here are some Mathematica notebooks and other such documents that should be useful in various mathematical and scientific calculations.

Mathematica is a computer-algebra software package that is produced by Wolfram Research, but the algorithms I've implemented in it can be ported to other computer-algebra software and programming languages if desired.

All of this software and all of the web content here that is my work is under the MIT License. I make the qualification "that is my work" because some of the pages here have inlined images from other sources, and they may be under difference licenses.

-- Loren Petrich, lpetrich at various online venues

- My Color-Blindness Simulators are several sorts of software for simulating various sorts of color-vision deficiency, including dog vision.
- Symmetries with interactive demos, including on polygons and pictures of organisms. How is a starfish like a petunia?
- Computational Geometry: Convex Hull, Delaunay Triangulation/Tessellation, Voronoi Diagram
- Geometry Demo (spherical Delaunay, convex hull, Voronoi)
- Semisimple Lie Algebras
- The Cayley-Dickson construction For making complex numbers, quaternions, octonions, etc. out of real numbers.
- Distance-Matrix Cluster Analysis and Phylogeny Software

These mathematical structures are important in physics for expressing the internal symmetries of space-time and elementary particles and the like. I wrote this package because it was hard to find anything online certain things that I was looking for. More specifically, decomposing product representations into irreducible ones and calculating branching rules: what representations of subalgebras does a representation of an algebra produce? It has applications like getting Standard-Model particle multiplets from Grand-Unified-Theory particle multiplets.

Contains code in Mathematica, Python, and C++; all three versions are feature-parallel except for Mathematica's graphics code.

SemisimpleLieAlgebras.zip (zip archive)

Convex hull, Delaunay triangulation/tessellation, Voronoi diagram. This archive contains code that implements convex hulls and Delaunay triangulations using several algorithms: quickhull, incremental, gift wrapping, divide and conquer, and more. Voronoi-diagram code will follow in later versions.

Mathematica and Python code: CHDVArchive.zip

Abstract-algebra code for making complex numbers, quaternions, octonions, sedenions, and higher 2^n-ions out of real numbers. I've included functions to verify various properties, so you can see properties drop as one goes higher and higher.

Inspired by John Baez's The Octonions

Mathematica code: CayleyDicksonConstruction.zip

Code that uses distance matrices to do cluster analysis and to find phylogenies. Though Mathematica has some nice clustering algorithms, it has no support for using distance matrices directly, as far as I can tell. Although distance matrices would not make any sense for some algorithms, like K-means, they can nevertheless be used in K-medoids.

I have also implemented code for finding phylogenies from distance matrices. This is useful in evolutionary biology.

- K-Medoid Clustering: Partitioning Around Medoids (PAM).
- Fitting of data vectors to a distance matrix.
- Multidimensional Scaling or Principal Coordinates Analysis for finding data vectors.
- Weighted Pair Group Method with Arithmetic Mean (WPGMA): simple averaging of branches at each branch node.
- Unweighted Pair Group Method with Arithmetic Mean (UPGMA): weighted averaging of branches at each branch node for making an unweighted total contribution.
- Nei-Saitou neighbor joining.
- Fitch-Margoliash tree fitting (rather crude).

Mathematica code: DMCAPhylo.zip

**To my home page**