Body-fixed coordinate systems

A good friend of mine responded to the fractal drawing instructions.

When I did dragon curves, I’d use U->L->D->R, so I don’t get confused when I am moving down and turning left becomes turning right.

My list of Ls and Rs can be more verbosely written like, “Draw forward, then turn left, then draw forward (now that you’re facing left), then turn right, then draw forward, then turn right again,” and so on. Alex’s directions would go more like, “Draw a line upwards (relative to the page), then draw to the left, then draw a line down, then draw to the right,” etc. Alex’s instructions recognize the fact that, while you’re busy drawing the dragon curve, your view of the page is not actually changing. Up, down, left, and right always point in the same direction, regardless of the last move. In my set of instructions, L and R don’t mean the same thing: you have to keep track of the direction your line is “facing,” the last direction you drew in, in order to turn left or right. The ULDR alphabet is probably a lot better for telling someone how to draw a given iteration of the dragon curve (although it doesn’t occur to me how I’d go about generating those instructions).

This difference in these kinds of instructions show up whenever we are describing an object moving around in space. We probably see it the most often when figuring out directions. The game everyone has to play when looking at a map is in connecting the fixed, objective orientation of a map to their own personal situation. In order to start figuring out which way to go, you have to figure out where you are, as well as ask, “which direction am I facing?” You then have to translate a set of directions on the objective map to a set of subjective directions, ones that you will have to execute from your point of view.

As a car travels through the city streets, its own directions (the body-fixed coordinates) change, while the more objective coordinate compass rose stays the same. My LR instructions for drawing the dragon fractal are like the car’s system, while the UDLR instructions are like following the compass rose directions.

In the drawing, you might start describing your car’s path with, “drive two blocks east, then three blocks south, then two blocks east, then two blocks north.” You’d need to use the fixed system. But when executing your drive, you need to think in terms of your subjective viewpoint, “drive two blocks forward, then turn right, then drive three blocks, then turn left, drive two blocks, turn left again and drive two blocks.”

The directions we attach to the rotating, traveling car, Forward, Backwards, Left, and Right, are what you’d call in physics a body-fixed frame of reference, or a fixed-body coordinate system. The system we attached to the Earth, including North, South, East, and West, is an example of a space-fixed frame of reference, or an inertial coordinate system.

The difference between the objective and the body-fixed coordinate systems is pretty important in physics. The game plan in most situations involves first finding an objective coordinate system in which the laws of physics are the most simple. There might also be plenty of cases when someone would be interested in the alternative, a body fixed system, for instance, to verify that a person driving around still sees the same universe as the rest of us standing on the side of the road.

The car example is not too hard to wrap our heads around, since the car can only rotate around a vertical axis. It’s the same direction whether you’re using the compass rose or the car-fixed system: Up. When dealing with objects that can rotate in all three dimensions, though, things get mucky. Describing rotations in 3D can get complicated when making a distinction between body-fixed coordinates and space-fixed coordinates.

From Wikipedia’s Euler Angles page: a 3D object mixes up the directions of its axes of rotation whenever it rotates.



You might be thinking, “I don’t plan my car trips. I ask the GPS on my phone.” Well, sure, okay. FINE. The phone can detect where you are and which direction you’re traveling, and give you a set of instructions having translated NSEW to FBLR.

Google Maps on my Android can show my car directions either from the car’s point of view (with a neat 3D perspective camera following the car) or from overhead, with north fixed in a certain direction. I kind of prefer the latter, which like the dragon fractal instructions, means I would rather put that extra step on myself. I’m not sure what that means.

As a kid, I’d occasionally get the change to go to my uncle’s house and play Sonic the Hedgehog. I loved it. One day, another uncle of mine, his brother-in-law, traded Sonic for a copy of Electronic Arts’ Desert Strike.

I do remember the intro having some pretty sweet licks.

I was pretty annoyed as a young kid. This slow, Gulf War-themed, objective-based helicopter mission simulator had nothing like Sonic whipping across colorful, futuristic, robot populated levels. But I did play it a bit.



Desert Strike’s Apache in action. (Super Adventures in Gaming)

The helicopter was controlled from an isometric viewpoint above, using a body-fixed system. No matter which direction you were facing, pressing Up on the directional pad made the chopper move forward. It could still look like the chopper was flying to the left on the screen. Pressing Left and Right made it rotate. This can be a bit confusing, since the controls act as if the player were in the cockpit, while the view is fixed from above. (The arcade game Asteroids is another example with a body-fixed control system, and probably a better example since it was way more popular and came first.)

Some years later, as an adult, I got a copy of Desert Strike of my own and did enjoy it. There was a way to change the directional controls, so that Up was always Up, etc. But I preferred the body-fixed controls.

This is a third example, after the dragon curve instructions and the Google Maps orientation, in which I prefer what seems to be the more difficult way of viewing the system. I must be MESSED UP.

Pareto Principle

The fractal drawing period went well enough. I suggested to the students that they instruction sheets increased in difficulty (when in the same order as in the previous post). I expected most to go for the Sol LeWitt drawing. In fact, that was kind of a wash! I had really hoped to have a nice full sized Wall Drawing 797 poster made by the kids. Most went straight for the dragon fractal. I can’t really blame them, since it looks so cool, but my instructions were unclear enough to make it difficult for most. The biggest issue was that most students didn’t pick up that each “elbow line” needed to be drawn so that it connected opposite corners of the squares on a piece of graph paper. Their dragon drawings ended up looking flat and floppy, and after only a couple iterations there wasn’t a whole lot left to work with.

Most of the kids were not thrilled to be doing any mindfulness activity. Many asked if I could ask the administration to never have a mindfulness advisory day again. There were, however, a few who quietly and attentively worked on drawing the curves, and a couple did quietly exclaim that the dragon curve was pretty cool.

I’ll keep things in perspective. My goal wasn’t to make them experts on drawing these figures, but to at least expose them so that they can recognize the ideas if they happen to come across them later. I’d also hope that a seed of interest has been planted in at lease one student, so that they’d be motivated to read a bit more about these things on their own.

The ratio of interested kids to uninterested kids reminded me of something called the Pareto Principle. This rule of thumb asserts that, in a situation like this, I could expect 80% of the effort or participation to come from 20% of the students.

This is a really lousy model for the drawing activity, not only because effort isn’t a well-quantified value. Number of drawings, time spent with pencil to paper, some arbitrary standard for quality all could play into the measure of effort. In addition, the “4:1 for 1:4” Pareto rule is a goofy way of putting it; the statement that “20% do 80% of the work” can make one think that there are some students who are doing 4 or 5 times the work of another. In fact, it would mean that the hard-working students would be doing 16 times more than one from the larger population. This seems a bit high for a typical high school class.

An example of the Pareto principle for a group of five students making identical drawings. One student (20%) ends up making 16 / 20 = 80% total drawings.

The Pareto rule might work a bit better in the business example, “20% of your customers will give you 80% of the sales,” but any decent business would hopefully make predictions based on their particular situation and history. Perhaps most hover around this distribution — it doesn’t seem too wild of an idea that a few die hard regulars are the ones keeping any given bar afloat.

The real benefit of this rule of thumb is to give that sense of perspective. It would have been unrealistic for my goal to have the room be lit with energy, all of the kids scrambling around in excitement because they were given some drawing instructions.  To expect 1/5 of the students to be truly interested might sound pessimistic, but in retrospect it’s a good place to start when making expectations. It might also be a good place to start in a brand-new business.

The rule is an instance of a Pareto distribution, which is a generalization that would be able to tell you exactly how much each student is producing (rather than big groups), as well as describe groups of students who are producing work at different ratios than 4:1. The benefits of being able to describe your system (be it schoolchildren, sales, volunteer participation, whatever) with a Pareto distribution would not only lie in how accurate the shape is, but also in knowing exactly the parameters that fine-tune that shape.

The Pareto concept has other ways of showing itself. Zipf’s Law says that you order the words in the English language by how often they’re used, the Nth word in the list will be 1/N as popular as the 1st. So, you see a very small number of words showing up a very large percentage of the time in writing. Like the Pareto principle, this is a generalization, and different people, regions, and documents will have variations on word popularity. These variations allows for statistical stylometry, as well as making sure every book in the library isn’t identical.

The Internet %1 Rule (or 1-9-90 Rule) is one that suggests that only about 1% of users on a website actively create content for that site. This doesn’t mean 1% of people who read are writing news articles, but it might mean that 1% of a news site’s readers are leaving comments. I’ve heard this referred to often in the realm of podcasts, where show hosts can expect about 1% of users to email in, or participate in a contest, etc.

Again, it’s key to note the error bars we’re willing to accept. If 2% rather than 1% of listeners responded to a call for podcast questions, the creators might not notice the difference. Using the Pareto principle as a very rough rule of thumb, as a suggestion for what to expect, is the way to make it work for you effectively.


Fractal Drawing for Mindfulness Activity

Tomorrow, our student advisory team is leading a school block dedicated to mindfulness. Each teacher leading an advisory was asked to propose an activity that would promote mindfulness.

I put together the following four sets of instructions for kids to sit and do focused drawing for the period.


Sol LeWitt: Wall Drawing 797


Hilbert Curve


Peano Curve


Dragon Curve


My experience with very short meditation sessions before and after kendo practices are the most direct form of regular mindfulness of which I’ve been a part, at least as a designated “activity.” I’m not prepared to lead 45 minutes of quiet meditation for high schoolers, though, and especially not if I have to keep them in pain sitting in seiza. I like to think my time hiking in the Adirondacks has been mindful, in that it involves focus, physical energy, awareness of one’s surroundings and situation, as well as the calming connection to nature, but I can’t take the kids out on a tough hike for a half hour in the middle of the school day. Exercise like running could be mindful, but it sure isn’t when I go, since I’m usually listening to a podcast or music while I jog. Really, the request to guide a session caught me off guard, since I don’t think I’m qualified to say or present much about mindfulness.

The other activities the teachers are leading include Drop Everything and Read, yoga, “games outside”, adult coloring books, and exercise. These all seem like they could be done well enough.

I figured that, since I’m preoccupied with math while at the school anyway, I might as well try to fit in some kind of math-related thing. The fractal curve drawing stuff is something I brought up while co-teaching a Math and Art elective at a previous school, and it had already been floating around in my head while thinking about leading a math team, or introducing some kind of alternative project for one of my current classes.

Sitting down and scratching away a pattern that follows a rule, and knowing it’s going to end up with a near image in the end sounds like a great relaxing time to me. I do have to remind myself that sometimes my brain is a runaway freight train, and people may not be so interested in thinking about Star Trek or Homestuck as much as I want to keep bringing them up. The idea that someone might not be as interested in drawing fractals for an hour as me is something I need to be aware of. I do think there’s a good chance this set of activities will activate the LEGO loving kid in some of them, though.

While sitting in a meeting, I realized the dragon fractal could be generated by recording a list of L and Rs, representing left and right 90-degree turns while drawing a line in a grid. Start with just an L. For each iteration, add an L to the end of the string, then write a mirror image of all of the previous letters: write them in reverse order, and replace L <—> R.






etc. These five strings correspond to the images at the top of the Dragon Curve drawing instructions. The mirror image behavior creates the self-similarity. It also made it more clear why the paper folding method creates the same figure.

Later I realized that this set of instructions is essentially the same as the Lindenmayer system of writing the dragon fractal. Let “F represent drawing a line forward, “+” a 90 degree counter clockwise turn, “-” a 90 degree clockwise turn, and “X” and “Y” as placeholders which add to the structure but don’t indicate a drawing instruction. Start with FX as your string of drawing instructions. For each iteration, replace

X –> X+YF+


Y –>−FX−Y

You can see the mirror image instruction here: the string to replace each “Y” can be recreated by taking the X replacement string, reversing the order, and swapping X <—> Y and “-” <—> “+”.

In the case that fractal drawing is too intimidating for anyone, I’ll include the Sol LeWitt page as well. I hope we can beast out a full posterboard with 797-like drawing tomorrow as a class taking turns. The MASS MoCA trip mentioned in the instructions was with a bunch of good friends in August, and they drove a conversation about the piece that day, and continued to think and play with it for some time afterwards (Phil and Ben’s blog posts, each with some neat insights and programming results, can be found in the links <— over there and <— over there).

We’ll see how tomorrow goes.

Racist Joke

I heard a joke this week. It was told by Dan Harmon, creator of Community and Rick and Morty, on his podcast Harmontown, Ep. 256. It was told in the context that suggested it was a “classic,” a well-known joke.


Harmon is an interesting person. He often brings up social issues on his podcast, usually in a casual or comedic way. One joke he frequently retells is very short: he simply says “or woman,” in a drawn-out, knowing tone, after mentioning an occupation with a traditionally masculine title. An example of it might go as follows:

Suppose you were pulled over by a policeman, or -woman, after speeding on the highway.

This sentence wouldn’t be independent. It’s not a one-liner. It would fall within a conversation which is likely not about sexism. It’s clear that saying “or woman” is intended to be a joke due to the tone he adopts. So, so, so much humor is based on the delivery, but the method that tells us it is a joke can sometimes mask the content. The information we’re being delivered with this joke seems to be some combination of the following:

He thinks it’s worth being aware of gendered language. He has made this clear when talking about social issues, at length, plenty of other times. This alone does not make it a joke.

He admits it can feel awkward to say “he or she,” or similar, when talking about a hypothetical person, and he knows that we know that he knows. If you’ve learned to use “he” as the default pronoun for an unspecified person, like most of us, you know it can feel jarring to hear someone try to include “she.” One’s own train of thought can stop a moment when trying to use “he or she” ourselves.

He’s extremely proud of himself for thinking of bringing it up at all, and also embarrassed by his pride. Harmon can come across as narcissistic, and frequently refers to himself as such. He also likes to repeat that he is a horrible person. So, when he decides to include a form of speech that he thinks is right to include, and simultaneously feels proud of himself and awkward in the moment, he plays the irony card and overplays his pride. Humor like this is a classic way of deflecting, drawing attention away from one’s discomfort.

I don’t really think the joke is “problematic,” although he tells it a bit often. There is an issue with using irony like this: it’s noncommittal. Ironic statements like this allow one to straddle the fence, allowing one to fall to either side as is convenient. Harmon seems to have a strong sense of social justice, and likely does think it’s worth reducing casually gendered language. However, someone could easily claim their irony meant, “it was a joke,” as in, they were mocking people who thought it was worth speaking in such a manner.

This kind of speech can end up making everything you say uncertain, while simultaneously making it seem like you know something beyond what you’re saying. I’ve known people who talk with an ironic tone like this often, and it really does work to make them sound like they’ve got lots of (usually cynical) insight into the world around them.

Dan Harmon can be pretty awful on social media sometimes, and can come across as narcissistic, but I doubt he makes this one little joke because he wants to manipulate people into thinking he is smarter than he is. He most likely makes the joke just because he feels it’s funny to mock himself for feeling like he is making a powerful statement by including an “or woman” genuinely. Which is a bit funny.


Anyway, the racist joke goes like this:

What do Mexicans use to slice their pizzas?

Little Caesars.

The joke is a play on a stereotypical accent. “Caesars” sounds like “scissors.” Little scissors. Little Caesars is a pizza restaurant chain. Explaining jokes is always a great way to make them seem funnier.

When he first told the joke, though, I thought the punchline was “Little Cesars.” Little Cesar Chavezes, all lined up in a row, working the fields of your pizza, slicing across with their hoes. I think that’s pretty funny.

Grape Preserves and Broccoli

This summer I had a plot at the Fox Point Community Garden. It was my first experience with gardening and I was able to learn a lot from my friends and through experimentation. The plot is only about 4’x10′, and I wanted to make the most of it, so in the end I had some overcrowding.

The plot on June 30th. From left to right: Bok choy, chocolate mint, lemon balm, Fordham chard, curly kale, beets, beets, beets, sage, cherry tomatoes, broccoli, beans, radishes, carrots.

Overall it’s been an incredible success. There isn’t much left, and I’m now enjoying the last of the crop.

Originally, I was drawn by the garden’s beehive. In February of 2016 I took a beekeeping class with the Rhode Island Beekeeper’s Association at RIC after many years of dreamy interest, and connected to the local community garden through a friend who had helped with their hive. I ended up observing a queen installation, standard 20,000 mile bee maintenance and checkups, but ultimately did not become a regular helpful boy. I was now aware of the garden, however, and felt that the $25 fee to score a plot made it a no-brainer.

The same plot on August 15. The beans in the corner had actually shrunk after their July peak. They were a little scary.

It’s hard to say what was the most successful, but I ended up having way more chard and cherry tomatoes than I know what to do with. They started producing early and are still managing to replenish themselves faster than I can use them.

The garden boundary is lined with raspberry bushes that seemed to produce fruit faster than we could pick them, much to Karin’s delight. She made several jars of lightly sweetened raspberry preserves, which turn out to be delicious with some rosemary scattered within. Some of these bushes hid grape vines, and a week or so ago I picked about a half a cup of cute little grapes. Today, I finally put the time in to make something out of them.

This was the smallest pan I had.

It felt a bit silly, but I made maybe an ounce or two of grape preserves.

Actually, it’s pretty tasty.

Behind it, you can see one of the last of the garden’s produce: a head of broccoli! I decided to fry that up tonight with some sesame oil and tofu. I was worried I got to the broccoli a little too late.

I included a salad with some garden cherry tomatoes. Despite my expectations, it didn’t taste unusual at all! A typical storebought head has much darker green florets and a pale stalk — I was really taken with how evenly green this broccoli was. I’m not sure if this difference is due to when I picked it, environment, variety, or the result of not having it shipped the same way, but regardless I am left content.