Write a script able to create a table on multiple A4 pages describing an arbitrary sequence of Unicode characters. Each line of the table should report binary, decimal, and UTF-8 hexadecimal representations. Also, the line should render the character itself surrounded by two pipes “|” in gray and a description of the character according to the Unicode standard (check the unicodedata module). Here you can check a PDF example. Table header (in bold) and page numbering would be a nice to have, don’t you think?
Draw a multiplication table. You should be able to define the first and last values of the range of multiplied numbers (from 1 to 10, from 10 to 100, and so on). Then, extend the program capabilities in order to compute many different operations like addition, difference, power of, and division. Check the operator module for some hints. With different operations, you will probably face very large numbers or numbers with a decimal part. In the first case, scale down the type size if the number does not fit the cell size, in the other case use some tools from the fractions module mixed with OpenType features to typeset numbers like 0.333333333 in a compact way. Here is a an example.
The following exercise consists of typesetting a color table. This CSV file contains a collection of hex values followed by a name; it is compiled from this Wikipedia colors list. Your table should show a color swatch, the name, the HLS value, the RGB value, and the hexadecimal value. You are free to choose the page format, but the data should spread automatically over as many pages needed. Each page should have a header describing the content of the columns. Here you can find a PDF example.
Choose four colors and assign them to the canvas corners. Draw one or more donuts, each donut stroke color should be influenced (aka interpolated) by the canvas corners colors. You can either use arcs (and color them separately) or clipPath over a gradient.
Try to emulate Julio Le Parc's “Séquences progressives ambivalentes”. Draw a grid of black squares evenly distributed on the canvas. Superimpose a grid of circles filled with the background color. Animate the squares grid harmonically using sin() and cos() functions. In the original work, the circles did not move. How would you organize the code to animate them too? Export a looping animation in gif and mp4 format.
Draw a protractor. Do you remember that plastic thingy used to measure angles in technical drawings made with paper and pencil? No clue? Ok, google it. Measurements in degrees and fractions of
π. Extra: why don't you show an arc measuring one radian?
Choose a font you like. You can pick an open-source UFO file, use your drawings, or ask a type designer friend for some unreleased cool stuff. You can access the font data using fontParts, a Python module shipped along with the drawBot application. Once you managed to access the font data, draw a glyph on the canvas showing the underlying Béziers structure as if you were looking at the glyph in a font editor application. Subclassing a BasePen from fontTools – another Python module shipped along with the drawBot application – could make the solution easier to achieve. The cookbook could help a little bit. If you have never met a Pen until know, you might want to check this presentation