Chapter 13.  Drawings For Practice

Posted on

The previous chapters cover most contents of Inkscape extension development. This chapter will describe some drawing ideas for practice. We could manually draw those figures in Inkscape, but the point here is to practice extension programming skills.

Pythagoras’s Theorem

Chapter 2 of Bill Casselman’s book Mathematical Illustrations book has a drawing (on Page 5) which shows the “graphic proof” of the Pythagoras’s theorem. The Pythagoras’s theorem is,

For a right angled triangle with short sides a and b and long side c, c^2 = a^2 + b^2

Let’s generate the same drawing in an Inkscape extension. The SVG drawing is shown below.
The code is available on the github repository for this website.


American Flag

Bill Casselman’s book Chapter 5 Exercise 5.4 (on Page 5) is to draw an American flag. This webpage lists the US Flag Specifications. Write an extension to generate the flag drawing.

american flag