Mathforge – How Did I Do That?

loopspace

2023-05-10

Creative Commons License

Contents

  1. Home

  2. 1. TeX/LaTeX

    1. Document Revision System

    2. Drawing Knots in LaTeX

    3. Drawing Knots in LaTeX, Version 2

    4. Monotilic Musings

  3. 2. Google Apps Scripts

    1. Sharing A Cell

    2. On Average

    3. A Fractal Spreadsheet

    4. Zero Correlation

  4. 3. Codea

    1. Matrices

    2. Quaternions

    3. Gradient Fill

    4. Roller Coaster

    5. Shaders

    6. Libraries

    7. Touch Tutorial

    8. Extending Codea's Objects

  5. 4. Miscellaneous

    1. Languages

The How Did I Do That? section of my website is devoted to my computer experiments. The motivation for this is that I often figure out what I want to do through random searches on the Internet, and cobbling together bits of solutions from different sites. So I learn a lot from other people posting stories as to how they achieved some particular end. This is my little "pay back" section where I record how I managed to do something.

1 TeX/LaTeX

If allowed, I would write just about every document in LaTeX. Here are some thoughts springing from my experiences with LaTeX, together with links to my packages.

My packages generally are stored now on github and so comments or bug reports can be left there. For general TeX/LaTeX help I recommend the fantastic site TeX-SX.

  1. Document Revision System.

    I decided to start using a document revision system for my LaTeX documents. This is an account of how I made the switch.

  2. Drawing Knots in LaTeX

    This is an attempt at making a tutorial for using my packages to draw knots in LaTeX using the knots TikZ library.

  3. Drawing Knots in LaTeX, Version 2

    This is an adaptation of the above tutorial which uses the newer spath3 TikZ library.

  4. Monotilic Musings

    As the maintainer of the TikZ library for tilings then the announcement of a single tile that forces an aperiodical tiling was intriguing. This is some things I discovered about it while implementing it in TikZ (and in Codea).

2 Google Apps Scripts

The Google ecosystem (Google Docs, Google Sheets, and other Google Stuff) is a great resource for teaching. The fact that it is scriptable makes just adds to its utility and flexibility. The scripts can work not just within a document but with different documents.

  1. Sharing A Cell

    A script for making a spreadsheet with blocks editable by just one user each. Useful for having a spreadsheet for a class to enter data safely (i.e., without the danger of overwriting each others' data).

  2. On Average

    This is a spreadsheet-based introduction to the different types of average. Using Google Sheets and Google Apps Scripts, the students first take a series of measurements, which are then reshared with the class for further analysis.

  3. A Fractal Spreadsheet

    This is an explanation of how to make a spreadsheet that displays a Julia set.

  4. Zero Correlation

    Figuring out how to adjust a set of bivariate data so that it has zero correlation, useful for demonstration purposes.

3 Codea

Codea is a fantastic programming "app" for graphical programming on the iPad. It uses the lua language and extends it by adding lots of useful iPaddy functions, making it very straightforward to write simple animations, simulations, games, and all sorts of things. There's an ever-growing list of apps released on the AppStore that were written either mainly or entirely using Codea.

Through writing programs using it, I've been constantly amazed at how much mathematics I use even when I'm not writing mathematical programs (though that is often the subject of my programs). So some of what I write about it is to explain a bit of mathematics to other Codea programmers.

Again, most of my code is available on github. For general Codea help, the Codea forums are the place to go.

  1. Matrices.

    A simple explanation of matrices and their use in graphical programming, such as in Codea.

  2. Quaternions.

    An explanation of why we use quaternions to encode rotations of 3–space.

  3. Gradient Fill.

    When displaying objects graphically, everything ends up as triangles. In particular, a quadrilateral will be represented by two triangles. However, there is a distinction between two triangles that happen to share a common edge and two triangles that are part of a quadrilateral.

  4. Roller Coaster.

    Codea did not originally have the facility to work directly with meshes. When it was added, I made a little roller coaster program as part of learning about meshes. It was added as an example program to the Codea app. This is a little explanation of the code.

  5. Shaders.

    After meshes, the next fun addition was shaders. This is an explanation of two shaders that I wrote as part of exploring how they work.

  6. Libraries.

    With the advent of the Codea Community project, code sharing in Codea got a whole lot easier. However, my larger projects use a slightly complicated system of libraries that works outside of Codea's dependency mechanism and so it doesn't work automatically with Codea Community. These are the instructions on how to get one of these projects working.

  7. Touch Tutorial.

    This is an old tutorial for using my Touch library, which is a touch handler. The tutorial needs updating a little – this is a preliminary version.

  8. Extending Codea's Objects.

    I suspect that most of my code is too tied to my way of working to be easily usable by others. The bits that might be are my extension libraries. These take built-in objects in Codea and add extra functionality. Because they work with existing objects, they probably would be more readily integrated into others' code than the rest of my stuff.

    The extensions documented here centre on colours, vectors, and meshes (and models).

4 Miscellaneous

  1. Languages This definitely comes under the heading of "stuff I wanted to get out of my head so I could stop thinking about it".