As I was learning to draw a stickman using the context, I realized that I could make my stickman posable if—instead of hard-coding his angles—I wrote a drawStickman subroutine that would take nine angles as inputs and draw my stickman for me.
Here is stickman in his Heisman pose. I store the nine angles needed to describe his pose in an array named pose. The angle of his torso is 32° and the angle of his right upper arm is 50°. I save the context, translate the origin to the center of the <canvas>, call the drawStickman subroutine and pass it the array of angles, and then restore the context back to its last save point after the drawing is done.