A Mathematical Treatment of Foot Placement in the Il Dan Blue Pattern

Since my earliest days of learning the Il Dan Blue pattern, I’ve had a hard time convincing myself that the right (left) foot should finish in the same place as it started when performing the pattern’s right (left) side. I would always finish close to where I started, but always sufficiently far away to leave me wondering if this was the first pattern where, in fact, the foot didn’t finish where it started. The pattern is unique in that it’s the first one in which we don’t return to our starting position before starting the techniques in a new direction; e.g. after finishing north and beginning east. Even using sketches, I couldn’t convince myself one way or the other.

Well, I wonder no more! What follows is a proof that both feet should finish in the same place and in the same orientation as they started. (See this previous post for a description of the pattern.) In the analysis below, I assume that when landing the front-leg swing kick into a side stance, the distance between your feet is the same as the diagonal distance between your feet when you were in the front stance

Let \vec{A_i}, i = 0,\ldots, 4 and \vec{B_i}, i = 0, \ldots, 4 be vectors encoding the positions of the right and left feet respectively. So \vec{B_0} is the initial position of the left foot, \vec{B_1} is the next position of the left foot and so on up to the final position, \vec{B_4}. For example, \vec{A_2} below encodes right foot in its second position (A_2) of x=-3 and y=2 on the Cartesian plane.

    \[\vec{A_2} = \left(-3, 2\right)\]

The diagram below illustrates the progression of foot positions. The red arrow associated with each position indicates the direction that the feet are pointing. The purple arrows show the first two swing kicks. Position B_4 (perhaps exactly at location B_0?) as well as any arrows indicating the spinning side kicks aren’t drawn because doing so makes the diagram way too busy.

Right-Side Il Dan Blue Pattern

As we talk about movement and direction below, we’ll use a combination of cardinal directions (north, south, east and west) and left, right, front, rear. Cardinal directions will be used when we refer to the direction of the pattern. By convention we’ll always say that the pattern begins by performing the techniques moving north. When we’ve finished in that direction, and if we’re performing the right side of the pattern, then we turn 90° to our right, and start performing the techniques moving to the east. North and south correspond to increases and decreases in the Y dimension respectively. East and west correspond to increases and decreases in the X dimension respectively. The terms left, right, front and rear will be used with reference to our body; e.g. the left-right distance between our feet.

Our analysis will proceed by looking at the left foot. The initial vector, \vec{B_0} is easy to determine from the diagram.

    \[ \vec{B_0} = \left(-m, -n \right) \]

The next move of the left foot happens as it comes around in a spinning side kick to land in a left-front stance. The “left-right” distance between the left and right feet is still m, and the “front-rear” distance is still n per assumption one. Furthermore, the right foot is placed at a distance \sqrt{\left(m^2 + n^2\right)} in front of the left foot per assumption two. The expression \sqrt{\left(m^2 + n^2\right)} is simply the length of \vec{B_0} which we denote as \lvert{\vec{B_0}}\rvert.

We see that the left foot has moved west a distance of m, and has moved north a distance of \lvert\vec{B_0}\rvert + n. This gives us the following value for \vec{B_1}.

    \[ \vec{B_1} = \left(-2m, -n + \lvert\vec{B_0}\rvert + n\right) = \left(-2m, \lvert\vec{B_0}\rvert\right) \]

We now turn our head to the right 90°, switch our hands, the left moving to guard the head and the right moving to the front position, and begin moving east. Note that now we’ve swapped the left-right and front-rear distances separating our feet. The left-right distance is now m while the front-rear distance is now n. Imagine now that the spinning side-kick has landed and we have finished moving east. Then from diagram 1 we can determine the value of \vec{B_2}.

    \[ \vec{B_2} = \left(-2m + \lvert\vec{B_0}\rvert + n, \lvert\vec{B_0}\rvert + m\right) \]

Continuing this way, we can use the diagram to construct the expressions for \vec{B_3} and \vec{B_4}. For \vec{B_3}, the X component is the value of the X component of \vec{B_2} plus m and the Y component is the value of the Y component of \vec{B_2} minus \left(\lvert\vec{B_0}\rvert + n\right). Similar logic yields the expression for \vec{B_4}.

    \[ \vec{B_3} = \left(-2m + \lvert\vec{B_0}\rvert + n + m,   \lvert\vec{B_0}\rvert + n - \lvert\vec{B_0}\rvert - n\right) =  \left(-m + \lvert\vec{B_0}\rvert + n, m - n\right) \]

    \[ \vec{B_4} = \left(-m + \lvert\vec{B_0}\rvert +n - \lvert\vec{B_0}\rvert - n, m - n - m\right) = \left(-m, -n\right) \]

Notice how \vec{B_4} = \vec{B_0}, thereby proving that our feet do finish in the same place that they started.

I have to admit, I was a bit crestfallen when I arrived at this result. Crestfallen because it was now a mathematical fact that my foot positions were truly sloppy and I couldn’t just blame the pattern.

We could stop here, but because I’m a glutton for punishment, let’s take things just a bit further and model the progression of foot positions using matrices. We can think of our feet as being on each end of a fixed-length stick. When performing the right side of the pattern, the stick first rotates a little bit counterclockwise around the back end (the front-leg swing kick) and then rotates considerably more, but still counterclockwise, around the front end (the spinning side kick). Then the stick rotates counterclockwise around the back end (this time heading east), and then counterclockwise around the front end. This alternating sequence of rotations continues until we finish and are facing west.

Let’s encode our foot positions in a 2 x 2 matrix wherein the first column contains the Cartesian coordinates of our left foot and the second column contains those of our right foot.

    \[ P_0 = \begin{bmatrix} x_l & x_r \\ y_l & y_r \end{bmatrix} \]

To rotate a vector counterclockwise around the origin by an angle \theta_1, one multiplies the vector to be rotated on the left by the following matrix.

    \[ R_{swing} = \begin{bmatrix} \cos \theta_1 & -\sin \theta_1 \\ \sin \theta_1 & \cos \theta_1 \end{bmatrix} \]

In our case, we will be rotating our “stick” around its end points, not the origin. In order to accomplish this, we must temporarily move the “fixed” end of the stick to the origin, perform the rotation, and then move it back. This “moving to the origin” is a translation on the Cartesian plane and can be accomplished using matrix operations only if positions are encoded using so-called homogeneous coordinates. This amounts to adding a Z-dimension for the purposes of matrix multiplication and when it comes time to interpret a result, making a projection from 3 dimensions onto the XY plane. In our case, the interpretation is easy and the projection is obtained by simply ignoring the Z-dimension in the resulting matrix. If we want to rotate around the left foot, then to translate our left foot to the origin we multiply on the left by the following matrix. Notice the -x_l and -y_l values in the right-most column, the coordinates of the left end of the stick. These elements in the matrix will result in the shift of the stick’s left end to the origin. Also note that the matrix has three rows where the third one is the Z-dimension.

    \[ T_{2L} =  \begin{bmatrix} 1 & 0 & -x_l \\ 0 & 1 & -y_l \\ 0 & 0 & 1 \end{bmatrix} \]

To undo the translation, we need only multiply by the following.

    \[ T_{1L} =  \begin{bmatrix} 1 & 0 & x_l \\ 0 & 1 & y_l \\ 0 & 0 & 1 \end{bmatrix} \]

Before we can put this all together, we need to express our initial position, P_0, in homogeneous coordinates by adding the Z-dimension as shown below.

    \[ P_0 =  \begin{bmatrix} x_l & x_r \\ y_l & y_r \\ 1 & 1 \end{bmatrix} \]

Let P_1 denote the 2 x 3 matrix that describes the foot positions after the first front-leg swing kick. P_1 is obtained by multiplying matrices as shown below.

    \[ P_1 = T_{1L} * R_{swing} * T_{2L} * P_0 \]

The process for rotating around the right foot is similar. The differences are that our translation matrices move the right foot to and from the origin (notice x_r and y_r below), and the angle of rotation, \theta_2 is different, though still counterclockwise.

    \[ T_{1R} = \begin{bmatrix} 1 & 0 & x_r \\ 1 & 0 & y_r \\ 0 & 0 & 1 \end{bmatrix} \]

    \[ T_{2R} =  \begin{bmatrix} 1 & 0 & -x_r \\ 1 & 0 & -y_r \\ 0 & 0 & 1 \end{bmatrix} \]

    \[ R_{side} = \begin{bmatrix} \cos \theta_2 & -\sin \theta_2 \\ \sin \theta_2 & \cos \theta_2 \end{bmatrix} \]

Let P_2 denote the matrix describing the foot positions after the first spinning side kick. P_2 is obtained by multiplying matrices as shown below.

    \[ P_2 = T_{1R} * R_{side} * T_{2R} * P_1 \]

To obtain the position of each foot after every kick, we need only repeat these two equations six more times, each time using the result of the previous multiplication as input to the next step. Depending on whether we just finished a swing kick or a spinning side kick, we use the new positions to create either T_{1R} and T_{2R} or T_{1L} or T_{2L}. The we multiply the proper rotation and newly-constructed translation matrices by the result of the previous step’s multiplication. All the remains in order to obtain numerical results are expressions for \theta_1 and \theta_2.

Body Rotations

From the diagram it’s easy to see that

    \[ \theta_1 = \frac{\pi}{2} - \tan^{-1}\left(\frac{m}{n}\right) \]

    \[ \theta_2 = \frac{3}{2}\pi - \theta_1 = \pi - \tan^{-1}\left(\frac{m}{m}\right) \]

In the same way that we combined the actions “translating to the origin, rotating, translating away from the origin” by multiplying together the matrices associated with each action, we could also combine moving north with moving east by combining even more matrices. In fact, we could multiply together all of the matrices for all directions. If the pattern truly results in our finishing where we started, then that resulting matrix, when multiplied by our original foot-position matrix, should result in the same foot-position matrix. In other words, the result of multiplying all of the matrices together should be the Identity matrix.

Life is far, far too fleeting to spend it performing this many symbolic (as opposed to numeric) matrix multiplications by hand. I spent some time writing a Python program using the Sympy CAS package, hoping that from the deep and complicated machinations of its symbolic matrix multiplication algorithms would emerge, as if by magic, the Identity matrix. In the end, the expressions got so long that the only real result was to make my laptop cry.

I had to settle for numerical output. To that end I wrote blue_feet_numeric.py, a utility written in Python, which can be cloned from here. Given a “stance geometry”, this program will spit out the locations for each foot after each kick for both the left and right sides of the pattern and in fact, the ending foot positions are always the same as the starting positions. If you’re particularly motivated (or let’s be honest, if you tend to get obsessed exploring rabbit holes), you can tailor it to the geometry of your own stance, have it generate positions, and then mark those positions with tape on the floor as a training aid for more accurate foot placement.

Happy Training.