IFRAME SYNC
IFRAME SYNC
IFRAME SYNC
IFRAME SYNC

Prime Climb colouring in with LuaTeX https://ift.tt/2BRxkGc

A while ago, my son did the Prime Climb colouring sheet.

The idea is to colour each number. Primes are given a new, single colour. Then composite numbers are broken into segments, which are coloured using the colours of their prime factors.

It came out like this.

Coloured in Prime Climb colouring sheet.

Recently, I was encouraged to try LuaTeX, which is a replacement for pdflatex that has better font support and means you can run Lua code in your LaTeX documents.

Looking for a project to try running some Lua code in a LaTeX document, and inspired by Andrew Stacey’s mention of the Sieve of Eratosthenes, I wrote some Lua code to generate TikZ code that draws grids like the one above. Here are some examples.

So now my son has a print out of my hundred grid next to the one he coloured in on his wall. He complained about my choice of colours, especially for 11.

You can look at the code I wrote on GitHub as drawing-primes – GitHub is something else new I’m trying. Oh, and I learned a bit of markdown today to write the readme file – so it’s all new coding things for me at the moment!



from The Aperiodical https://ift.tt/2BokKyc
Peter Rowlett
Labels:

Post a Comment

[blogger]

Contact Form

Name

Email *

Message *

copyrighted to mathematicianadda.com. Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget

Blog Archive