Tag Archives: food

Like a Flamingo Among Chickens

he_li_ji_qun

Chinese has many set phrases chéngyǔ 成语: four-word phrases that communicate an idea or concept quickly to someone who knows the cultural and historical context of the phrase.

Some are really easy to understand, like rén shān rén hǎi 人山人海 : people mountains people sea. This place is very crowded!

Others require some knowledge of Chinese history and literature, like máo suì zì jiàn 毛遂自荐 : Mao Sui recommends himself. If you don’t know a little bit about The Warring States period, you might have no idea why your pal Lao Wang yelled this as he jumped up to fix the paper jam.

English-sepaking fans of Star Trek: The Next Generation would do well to think of chéngyǔ as the language of Tamarians: just think of Darmok and Jalad at Tanagra, and how much Tamarian history Picard had to learn before he understood what the Tamarian captain was talking about.

I recently learned a Chinese expression: hè lì jī qún 鹤立鸡群: a crane standing among chickens. My understanding is that it’s used to describe someone or something that stands out from the crowd, but I wasn’t sure whether this should be used in a positive, negative, or ambiguous sense.

My American sensibility led me to think it’s positive, since we tend to celebrate the individual. Boy, that kid does math better than the rest of her class. She’s truly a crane among chickens, and we should praise her achievements.

Or should it be used pejoratively? That kid’s always showing off how good she is at math. She’s truly a crane among chickens, and we chickens should peck her down to size, post haste.

I’ve also seen the expression used by American expat bloggers, describing themselves as wildly different from the people around them. In this sense it sounds akin to the English idiom “sticking out like a sore thumb.”

I follow Hacking Chinese and through that learned about Lang-8, a lanugage-exchange site that pairs up native speakers from different languages. So I asked about 鹤立鸡群 over there and they say it’s overwhelmingly positive.

I’m also now completely hooked on correcting the English grammar of Japanese teenagers. I can only imagine how dumb I sound in Mandarin with my pidgin talk about my cold cup of coffee.

The characters on the sticks are kinda-sorta-puns– 吉 (second tone) can mean lucky, but 鸡 (first tone) translates as chicken.

He 鹤 (fourth tone) is a crane (as in the bird, not the construction equipment), but 和 (second tone) can mean “harmony” or “harmonious,” depending on the context. So if you know the original chéngyǔ that character makes some kind of sense.

ji_he

A flamingo is a 火烈鸟, or fierce fire bird. Which is funny if you think for a minute about how threatening a pink filter-feeder can be.

I’m going to say my newly-minted chéngyǔ is unambiguously positive. You, my friend, are not merely a crane among chickens. You’re a flamingo among chickens. You are just that cool.

The next time you have folks over for cocktails, give the flamingo stick to the guest of honor. Everybody else gets a plain old chicken.

You can download these cocktail sticks for free. 干杯!

A cookie-cutter blog post

bread

It lightens my heart to know that Nikolaus Gradwohl has dedicated some of his time to producing a piece of software that generates 3D models of cookie cutters. I stood on his gigantic shoulders to make these Gingerzombies first on my Replicator and then in my kitchen.

I do almost all of my 3D work in Maya 2009. Once or twice I’ve hopped over to OpenSCAD, but for these models I used a little piece of free software called, appropriately, the Cookie Cutter Editor.

I started the process in Photoshop with a pair of gesture drawings.

gesture

And then filled out the gestures to make outlines of gingerbread men. While doing this one has to keep in mind how the final product is going to cut from moist dough and bake, so a little modification of the pose was necessary. The pose also has to read in silhouette to maintain the illusion of life.

trace

Next, bring the drawing into Maya and trace it with a polygon. We can skimp on the geometry a little because the outline will blorp out in the baking anyway. Then extrude, and we’re good, right? Easy peasy mac and cheesy.

maya_runner

Not so, alas. Take a look at these self-intersecting extrusion edges– it’s a common plague for me with modeling in Maya. The image on the left is a small edge extrusion, but once one extends the extrusion out, tight corners begin to intersect and produce unusable geometry.

extrusion

You could go through and merge those vertices, but it can get pretty tedious, especially with a complex model.

So I downloaded Cookie Cutter Editor, imported my drawings, and started tracing. Cookie Cutter Editor isn’t fancy, but it is very easy to use and it does the job.

cceditor

The only problem with it is the way one places vertices; you don’t connect the dots by drawing in sequence, but rather by adding vertex between two existing vertices. I don’t see a way to specify which two verts are the endpoints, so one ends up moving a lot of vertices around to follow a complex outline like a gingerzombie. This could take a very long time.

What to do? I’ve already drawn the cutters in Maya, so I just have to get the data from Maya to Cookie Cutter editor. This seems like a lot of work for a pair of cookie cutters, but now I have a problem to be solved, and that’s way more interesting than cookies.

In fact, forget the cookies, this is now a data manipulation project.

First I have to see what kind of information CCE puts out. I made a squarish cutter and exported the data.

square

Which exports the following:

414.0 65.0
427.0 404.0
76.0 408.0
76.0 62.0

Space-delimited Cartesian data separated by carriage returns. Love this. If you ever want to put something in my stocking for Christmas, get me a properly-formatted text file.

It looks like the minimum and maximums on these are 0 and 500 pixels, and CCE draws its polygons clockwise. That should be easy enough.

After a few minutes of fiddling, I have this MEL script. (MEL is Maya’s internal programming language. It’s really useful for automating repetitive tasks.)

proc export(){

$foo=”meshname”;

int $i=0;

# change 156 below to the number of verts in the mesh

for ($i=0; $i<=156; $i++){
$vert=$foo+".vtx["+$i+"]";

$loc=`xform -ws -q -t $vert`;
print ((int($loc[0]*10))+".0 "+int($loc[2]*10)+".0n");

}

}

export()

This is ugly, ugly code, folks. Some kid just starting out could get hurt on this stuff, so don’t use it as an example of how to write MEL scripts.

A quick copy/paste from Maya’s editor into TextEdit and CCE’s import looks like this:

runner_CCE

The export is a single keystroke and then I’ve got an STL file. netFabb doesn’t like it. The red polygons are suspicious for some reason. It’s also flipped left to right.

runner_netFabb

So I bring it back into Maya to take a closer look.

intersecting

Huh. Intersecting polygons. Exactly what I was trying to avoid when I started this process.

Phooey.

The goal here isn’t to produce a watertight mesh, it’s to get a working cookie cutter in the physical world, so let’s see what ReplicatorG will do with it.

runner_repG

ReplicatorG is the Honey Badger of slicing software. ReplicatorG don’t care. ReplicatorG’ll slice anything. Usually these slices print just fine, but in this case here’s the real-world result of intersecting geometry.

slicing_error

It’s certainly usable, but it’s a little weird and ugly. Here’s the final print:

gingerzombies

Download the models here from Thingiverse. Merry Christmas.

How does my toaster work?

TL;DR summary: I fixed a busted toaster in 16 minutes without burning or electrocuting myself. HUGE WIN. Also: toasters are more complicated than you’d think.

WARNING: Grody photo of a crumb-crusted toaster follows.

Our toaster stopped working a week ago, sending ripples of calamity through our breakfast routine. Then the family went away for Thanksgiving and upon our return I noticed that the toaster had failed to heal itself in our absence.

The toast wouldn’t stay down. Push the plunger, the bread pops right back up. I supposed maybe a spring had come loose, so I popped the cover off and took a look at the mechanism.

As I worked I was half-hoping that I’d screw it up badly enough that I’d need to buy a new toaster and use this one as the body for a toasterbot or something.

No springs seem to be out of place, and nothing looks bent, broken, or obviously amiss. No butter or fried mice gumming up the works, although there’s about half a pound of toast particles rattling around in there.

Ho ho, what’s this? This seems like an awful lot of electronics for something as simple as a toaster. Bears further investigation, obviously.

When the plunger’s down, the little plastic lever to the right drops a metal strip across the two contacts, completing a circuit.

And what’s up with that coil? Electricity flowing through that coil creates a magnetic field, which will keep the metal strip and in turn, the plunger, stuck in the down position.

A timer elsewhere in the unit must turn off the electromagnet when the toaster thinks the toast is ready, releasing the spring-loaded lever.

So. If the circuit were to fail, the electromagnet wouldn’t keep the plunger in the down position.

Sure enough, there was a crumb shorting out the electromagnet. A quick puff of air and she’s working again.

Twenty bucks saved.