Making a Better Grasshopper

A few years ago, Gakken had a short series of large mecha kits available in the bookstores in the $100 to $150 range. At the time (when I was still in Tokyo), I held off on getting the centipede because of the cost and not having room to store the finished kit. Now, of course, that I want to try making something like that, all of the big kits are out of print. However, I recently discovered some smaller kits for kids in the children’s science section at Junkudo Books. There are 10 insect kits for 1,000 yen each, one for 1,300 yen, and six 1,500 yen dinosaur kits, and one special dinosaur kit for 1,300 yen. They were all released on June 20, 2014, but don’t think they were advertised on the Otona no Kagaku site.

I wanted to have something to build, and the 1,000 yen grasshopper looked like the best bet. I’m interested in the scorpion and tarantula, so I may get those later. I really want to get the 1,300 yen Anomalocaris, too.

Anyway, the grasshopper has about 30 parts, not including the 9 bolts, 9 nuts and 2 washers. There’s no suggested assembly time, but it took me maybe 1 hour to finish mainly because the nuts kept loosening up as I tried to put everything together. There’s no real moving parts, per se. The joints are held together by the nuts and bolts, so if you want to reposition the legs or wings you can, but then you have to tighten the bolts again. The pieces are all very soft stamped sheet metal, most likely tin, if not aluminum. Which is good, because you have to fold and form the back, wings and head by hand. The two tools that come with the kit are mostly useless, you’re better off getting a small needle nose pliers and screwdriver.

Assembly starts with the abdomen, then moves to the head/chest/legs bit, and finishes with the wings and head cowling. The springs don’t do anything, they’re just there to resemble the leg muscles.

The booklet has two pages advertising the other kits, and Gakken’s lines of insect and dinosaur picture books. There’s also 3 pages of pictures of different grasshopper species and a short description of grasshopper biology. So, the booklet is educational if you want to learn more about the specific insect you’re building.

The finished grasshopper is pretty big, at 11 cm (4.5 inches), and it was fun to assemble. I can’t imagine something like this being available in the U.S. because of the small parts swallowing hazard. The edges are also a bit sharp, presenting a cutting hazard if someone was so inclined (no worse than getting a paper cut, though). The box includes a small piece of sandpaper for smoothing off the edges if desired, but I didn’t bother with that. Now, I need a place to show it off.


Gakken Activity, Feb. 20, 2015

Another slow week. No news about the next Otona no Kagaku kit. The last one came out in September, and the lack of information this time is not a good sign. I’m guessing that we may not see anything on the next kit until maybe May. In the meantime, the Facebook and Otona no Kagaku pages introduced a new interview with a manga artist associated with the Mysteries of the Human Body book.

So far, there have been two interviews, one with Aooni Yamane (Dekochin, Meitantei Kageman, Oyaji Banzai).
The other is with Motoei Shinzawa (High School! Kimengumi).

Elsewhere, we have two new bi-monthly/weekly subscription kits from DeAgostini. The first is a 3D printer. It looks to have about a 6″ print table, with a footprint about the size of a laptop PC. The first issue is 999 yen ($10 USD), and the next will be 1,999 yen (not including tax). 55 volumes total, and the full price for the finished kit will be over $1,000. However, it will include CAD software for designing whatever you want to build.

The other is the Sky Rider Drone. From what I can make out, the first volume is 999 yen (10 USD), and the rest will probably be about 2,000 yen each (price varies from issue to issue depending on the size of the part included). The full set will run 20 volumes. And, if you buy all of them, you’ll get the RC unit and simulator software as a present.

Spiral arms

Funny. After playing with complex spirals for the past few months, I finally encountered a situation that looked just like one of the spirals, which got me to thinking about how to apply the math to the real world (old hat, I know, because it’s been done by entire industries for decades now). Regardless, the situation is cool.

There was an article mentioned on yahoo about a star being torn apart by a black hole, which was caught by a small telescope at McDonald Observatory. The article is accompanied by a 2014 youtube video showing a computer simulation of a similar event.

Just looking at the thumbnail of the video, I was struck by how it resembled a y = c^x spiral in a steep death curve towards 0. Then, after running the video I realized that it’s showing stellar mass being ejected out away from the black hole in the opposite direction as the star spins in a tight orbit around the hole. So, it’s a spiral that starts near 0 and eventually expands to infinity.

Direct youtube link

Normally, when you think of a decaying orbit, say of a satellite spinning around the Earth, you treat it as a pair of force vectors, with one vector being the planet’s gravitational pull (g) perpendicular to the “forward” velocity (Vf) of the satellite (usually initiated by some form of rocket propulsion). If Vf drops towards 0, the satellite is affected only by gravity, and it will fall straight towards the Earth. As Vf increases, the satellite’s orbit gets closer to a circle, until it’s more or less stable (ignoring any frictional or external gravitational effects). As vf exceeds this stable orbit value, the satellite will move farther away from Earth and eventually it will fly off on its own. In all cases, the combined two forces, gravity and satellite velocity, form a triangle when drawn on graph paper. And that triangle (a + ib) can be converted to polar coordinates as cos() + sin(), or as e^s.

In theory, a satellite’s orbit, or the spewing of stellar mass by a black hole, can be mapped to a Mandelbrot fractal if you know what value to assign to c0. That is, if you draw the orbit as a 2D plot on a piece of graph paper, with successive orbit points lying on one given spiral, then assign that to a specific spiral in the form of y = c0^x, turning around and drawing the Mandelbrot fractal using y = c0^2^x will give you the corresponding color value for that data point. It’s arbitrary, in that you need to pre-assign colors as well as values of x, and if you’re on a circle,┬ác0 can be any point along it. Again, of course, given the nature of fractals, that small differences in starting values compound exponentially over time, you’d never get the EXACT correct value of c0 anyway, but you could get close, and “close” is all that matters in games of horseshoes and grenades. And star-chewing black holes.

But wait! There’s more!

What if we look at something closer to home, and closer to people’s hearts. Like money. And Las Vegas. And like trying to beat Las Vegas to make money.

Of all the gambling formats in Vegas, the one most attackable from a physics viewpoint is roulette. In effect, you have a small body traveling along a decaying trajectory before coming to a terminus. This is pretty much our death spiral, and it fulfills the conditions given above – being able to measure specific points along the spiral at varying times, or varying points at specific times. With this data, and the expectation that friction is a constant, we should be able to determine exactly which spiral we have, and roughly where on the wheel the ball will land. The calculations will be approximate, but the increased probability of at least getting the right quadrant of the wheel when placing bets would significantly improve your chances of winning over the house odds.

If only there were some way to verify this hypothesis

Bokaro P ni Naritai, vol. 11

(Images used for review purposes only.)

I want to be a Vocaloid Producer, vol. 11, 1,500 yen, plus tax.
New magazine features:

In the 4-panel comic, Rana succeeds at learning how to dance, so Robo-panda gives her his promised present – her own room. The classroom section builds on the new room model conversation, as well as discussing the next “I can compose music” PDF, and closes by talking about a new online download page (mentioned below). The artist interview is with Mitchie M again, and the highlighted music genre is 90’s era pop. There’s no “back page” this time, so no mention of any of the Vocaloid voice software packages or of the pick-up artist.

New DVD Features:
First off, we have the next installment of “I can compose music”. This consists of a folder on the DVD containing a second PDF instruction file, and another set of music work files for Vocaloid. Then, we have the link to download the updater for Vocaloid, to bring it up to ver. 3.2.1. (I’m assuming that if you bought the commercial package, you’d be running edition 4. I only have edition 3.) The biggest feature, though, is the link to the online song library. Yamaha has the rights to a number of commercial songs (including stuff from YMO, Exile, Queen, and Mr. Children) that we can load into SSW for studying music composition and the use of chords. To access the site you need a valid SSW serial number and a working email address. There’s also a link to VocaloNet, a file sharing service for people that want to get feedback on the Vocaloid songs they write.

Finally, there’s the model files for Rana’s new dance room – Rana’s Room. Unlike with the live stage and the practice rooms, there’s no skin for door #4 to replace the blank door from the default Warp Room model.

Note that there’s no pick-up artist song or video in this issue.

(List of recommended Vocaloid music videos.)

This one is an interesting concept – breathing. Normal human singers inhale prior to starting a particular lyric, and that inhale sound is picked up by the microphone. Human listeners expect this short intake, and not hearing it on a Vocaloid song makes the final product somewhat artificial sounding. To remedy this, we can drag and drop breath sound .wav files from the DVD-ROM into the mono WAV track of the work file.

Every volume of the magazine has come with voice sample wav files with Rana speaking fixed phrases with varying intonations, from the simple counting numbers, to saying “hello” and “good bye”, plus certain stock phrases. The current volume has 12 breath sounds, including short inhales and longer exhales. To use them, just drag the desired sound into the Vocaloid mono WAV track, and slide the sound with the mouse to a point just prior to where Rana starts singing, where a normal person would take a short breath, or let out a long sigh at the end of a solo.

As they are, the breath sounds on the completed demo (“Never Ever Love”) aren’t perfect, but that gets addressed in the next tutorial.

Rather than doing all the work on the sounds and effects in Vocaloid and then importing them to SSW, you can do editing directly in SSW. The lesson builds on breathing, by copy-pasting the breath track from measure 51 to measure 2. This introduces a problem, though – the waveform looks flat in the track editor. We have to use Gain or Normalize to make the sounds visible, but if we close either of those windows, the sound level of the original breathing track changes. As a temporary step, we save the modded waves to disk as separate files with “save wave as filename”. Volume for the track as a whole can be corrected from the mixer, and the copied waveform can be trimmed without affecting the breathing effects elsewhere in the song. Once you’ve isolated a specific breath, you can use “PitchTime”->”TimeComp” to stretch the sound out to make it longer, which makes the breath intakes less robotic and mechanical. Just save the modded waveform to a new filename each time.

(Part of Rana’s side-to-side dance step, and her new bedroom/dance stage.)

The task for MMD is to create a more complex dance cycle, this one stepping from side to side while Rana swings her arms. In order to keep the video length at 12 minutes, the editors chose to break it up into 2 parts, with the lower body movements in this volume, and the upper half next time. The tasks themselves are pretty much the same as last issue’s walk cycle, it’s just that there’s more of them and the timing is getting more complicated. In essence, Rana’s feet are going to follow a simple left-right bouncing ball path, while she crouches down on the beats and stands up in the middle so that her hips follow an “m” path. The tutorial starts out with the theory of the movements, then the bulk of the instructions are on how to make little tweaks to Rana’s ankle or knee positions to get a more “cute girl” result. Finally, there’s a lot of manipulation of the motion curves for the x- and y-axes and rotation to get a snappier movement closer to the keyframes.

As with the last volume, the editing on the tutorial video is really sloppy. The instruction text blocks the motion curves screen, making it almost impossible to determine if they’re talking about changing the rotation or x-axis curves, and the instruction text itself doesn’t identify the curve to be edited. Plus, a number of the screen caps are wrong. The magazine has the information right, though, so it’s actually better to ignore the video and just use the magazine when there’s any confusion.

Additional comments:
I’ve kind of mentioned this before, but SSW isn’t being used as a note writing composition tool. Rather, a lot of the tasks so far have been with existing .wav sound samples (and the pattern editor) and just cutting-pasting pieces of those samples throughout the score. It’s very similar to using Microsoft Word in this sense.

Two Spirals

Because I think fractals are cool, that’s why.

As mentioned before, y = c^x creates a spiral, either exploding to infinity or decaying to 0 depending on the starting value of c. And, when you’re drawing fractals, you’re assigning values of c to each pixel on your screen, or dot of ink when printing to paper. In the case of the Mandelbrot fractal, you’re accelerating things by using the formula y = c^2^x, which is equivalent to y=c^x, with x=1, 2, 4, 8, 16, 32, etc. You’re still basically working with a spiral, just that if you use a cutoff of 50 for deciding when to stop calculating, then you’ve squared your starting value of c at each point up to y=c^2^50. That’s a VERY BIG number, if you want to try writing it out by hand.

So, what happens when you start messing with a good thing? The first temptation is to just add a constant to c (j + i*k), as with:

y = (c + j + i*k)^x

But, if you look at how I described the making of a fractal last time, starting from (-2, -2) and going to (2, 2) in 0.25 steps, we’re already adding a constant to c. This just shifts the fractal we’re making up or down, left or right depending on the offset, as if we’re moving a viewer window. That is,

y = (-2.0 + i*2.0 + 0.25 -i*0.5)^x is the same thing as picking

y = (-1.75 + i*1.5)^x to begin with. No magic here.

Instead, how about:

cn+1 = cn^2 + cp, where cp is a constant offset?

Well, people already do this. It’s related to the Julia set, named after French mathematician Gaston Julia (1893-1978). Mandelbrot is a special case of the Julia set, where the “perturbation constant” cp is 0 + i*0.

In effect, this perturbation constant is adding an offset step to the original spiral, kicking the spiral into a new orbit, but only when x is one of the above sampling points (1, 2, 4, 8, 16, 32, etc.) The effect of this perturbation depends on the value of the constant. Since cp = a+ib, making “a” small is going to make a small change to the magnitude of the spiraling, and “b” adds to, or subtracts from the spiral’s rotation factor. This can make a specific point in the fractal switch from a death spiral to an explosion to infinity, or vice versa. The impact on the finished fractal can be very subtle, or really huge. In a way, we can think of the Julia set as being a 3D solid, and cp is on the z axis. Changing cp up and down can be said to be creating cross sections of the Julia solid, if you like.

What does this look like at the individual point level?

Say we start with c0 = 0.8 + i*0.6.

(Graph 1: y = (0.8 + i*0.6)^x)

This forms something close to a circle, with x from 1 to 128. Next, let’s add cp = 0.8 – i*0.62.

(Graph 2: y, with cp = 0.8 – i*0.62)

The offset kick just pushes us into new orbits. Because the original starting point was more or less stable, cn^2 + cp is also stable, in this case.

(Graph 3: y = (0.78 + i*0.63)^x)

Moving c0 a bit down and to the right, with c0 = 0.78 + i*0.63, we get a spiral slowly going to infinity.

(Graph 4: cp = 0 – i*0.4)

Cherry picking a value for cp to make something visually interesting, the spiral expands. It’s still going to go to infinity, but it’s taking longer now.

(Graph 5: y = (0.79 + i*0.6)^x)

Going the other way, c0 = 0.79 + i*0.6)^x). This is a spiral heading towards 0.

(Graph 6: cp = 0 + i*0.4)

Again, choosing cp to look good, we still get a death spiral, but again, it’s going to take longer. So, when we ask “what happens with the spiral if we perturb it ala the Julia set?”, the answer is “it depends on the spiral and the perturbation factor”. That’s what makes chaos so cool.

I wanted to have a way to actually draw the fractals I’m talking about, so I went to and grabbed a copy of Xaos from the software page. It’s a sweet little app with real-time zoom in. Very nice.

(Classical Mandelbrot.)

(With a perturbation factor of 0 + 0.1i)

(Perturbation of 0.1 + 0.1i)

Notice how perturbing y = c^2^x impacts the original fractal.

Hmm. I hear someone out there asking “can we multiply two spirals against each other?”
(My therapist says that’s something called “projecting”, but I ignore him because he’s not real.)

My response to that is, “Yes. It’s an excuse to make another Excel animation with a soundtrack from Audacity.” Actually, the soundtrack could make for another blog entry by itself. I’d recorded a big robot cat waving its arm in the shopping district near my apartment, and I thought about stripping the audio track off to use it for the Excel video. The recording was made at 8 PM, when the shops were closing up and lowering their security shutters. Very loud and noisy, and picked up very clearly on the camera. Problem was that the audio was too short to align with the Excel video. Since I had the track in Audacity, I decided on a whim to use the “Paulstretch” function, which I’d never tried before. Just guessing, I picked a stretch factor of 10. The result was extremely atmospheric and rather musical. I tried a couple other audio tracks with different stretch factors, and ended up with the start of what might become real songs. When I get more time, I may experiment with the videos of cranes I made last year… Loud, rapid sounds seem to stretch well.

Direct youtube link

Cafe Labo

This is one of the reasons I wish I was still living in Tokyo.

The Asahi newspaper recently ran a review on Cafe Labo. Labo is a coffee cafe originally opened in 2012 as a showcase for Takamura Co., a packaging company located in Tochigi prefecture. The cafe has 3D printers, laser cutters and CAD systems – all for assisting the creation of products made out of used cardboard. The chairs, tables and various toys are all made from laser-cut cardboard. They even have an almost-full-sized tank.

Cafe Labo is located in the Nihonbashi district of Tokyo. Plus, they serve coffee.


I spent a lot of time talking about Mandelbrot fractals in the last post, without going into any of the details on how to draw them. I really shouldn’t have to, because there’s so many resources on the net if you want to learn more, and you can probably get free apps from iTunes for your phone for making your own effortlessly. But, this is something that stuck in my head, so I have to write about it to get it out.

Computer fractals exist only on your monitor, or when printed out on paper (there are lots of examples of fractals in nature, but unless you want to grow your own sunflowers from genetically mutated seeds, you’re going to be doing this on a monitor or on paper with a printer). If you look at your screen, it’s made up of thousands of tiny dots, called “pixels,” laid out in rows and columns. In a way, your monitor is much like a dynamic sheet of graph paper that you don’t have to erase every time you redraw on it.

Keeping this “graph paper imagery” in mind, let’s make a graph 17×17 squares (or, “pixels”). (Many monitors have default resolutions of 1400×1000 pixels, if you want to be ambitious, have lots of pencils, a few free minutes, and want to make a full-scale fractal.) I’m going to number them from 0 to 16 for simplicity. To make a fractal, you assign values in the complex plane to each square, then repeat some kind of squaring operation on that value until the magnitude of the final result exceeds 2, or you get bored (usually after 50 repetitions). This implies a circle of radius 2, so I’m going to make my grid run from (-2, -2) to (2, 2). Because there are 17 data points per row and column, moving from one point to the next adjacent one will involve increments of (2 – (-2))/16 = 0.25.

Grid point (0, 0) represents the starting value of C0 = -2.0 + i*2.0.
Before we go any further, let’s check the magnitude of this value.

Mag =sqrt(a^2 + b^2) = sqrt((-2)^2 + (2)^2) = sqrt(4+4) = sqrt(8) = 2.82.
Yuppers, we’re outside of our limit circle, so let’s give up without even beginning. Bye, see you next week.

Or, maybe not. One thing about fractals, because we’re making them up ourselves, we can choose whatever colors we want for the results of the operations. For my purposes, let’s pick white for a repetition count of 0. So, color grid point (0, 0) white and then go to the next point on row 0 (we don’t have to. We could go down to the next row.) Using our 0.25 increment, grid point (1, 0) is (-2 + 0.25) + i*2 = -1.75 + i*2.0. The magnitude of this point is 2.66, so we color this one white, too. In fact, the top 3 1/3 rows are white.

This brings us to grid point (6, 3), which is -0.5 + i*1.25. The magnitude is sqrt(0.25 + 1.5625) = 1.8. Now, we can go to the next step.

For my example, let’s use the formula Cn+1 = Cn^2.

(-0.5 + i*1.25)^2 = (-0.5 * -0.5) – (1.25 * 1.25) + i * 2 * (-0.5 * 1.25)

= -1.3125 – i*1.25

You might be able to tell just by looking at it that the magnitude of this value is greater than 2. So, we stop with an iteration count of 1. I chose red for n=1, but I didn’t have to.

If the result of c^2 had a magnitude less than 2, we would have plugged -1.3125 – i*1.25 back into the formula and repeated the y = c^2 operation, while incrementing the iteration counter n by 1, stopping when mag>2, or when n=50. Remembering that squaring complex numbers creates a spiral that either decays to 0 or blows up to infinity, what we’re really interested in is what happens when Cn0 is REALLY REALLY close to being on a circle. If it’s on a steep death spiral, then the magnitude of the next value on the curve is going to be 0, and we need to use “50” as a cutoff value to avoid being stuck in an infinite loop. Let’s color “50” black, and pick a couple other colors at random for the values of n in between. (When we take smaller and smaller step values between points, we’ll want to pick a bigger cutoff value.)

Looks like a circle. Funny thing with complex numbers – the upper and lower halves of the graph (y > 0 and y < 0) are symmetric. I don’t have to calculate the bottom half. I can just draw it as a mirror image of the top half.

Now, this is pretty boring. But this is what we get for starting at a macro level. As mentioned above, the fun stuff is right around the circle boundary, so what we need to do is “zoom in” on a specific part of the graph. Say, x from 0 to 1.5 and y from 0 to -1.5. This gives a step size of 0.09375.

This is still Cn+1 = Cn^2, we’re just changing where we look on the graph, and how closely.

We’re starting to get a little more detail now. I picked red for 1, pink=2, light purple=3, dark purple=4, light blue=5 and blue=6. From here, the next step is to use the computer to do the work while we sit in front of a TV and drink beer. Perhaps the TV could even be turned on at the time, but with a good beer it probably doesn’t matter. Or, if you have 65,536 close friends all with smartphones running the right apps, you could hand them sheets of colored construction paper, and have them hand-animate fractals that are visible from a helicopter. Or, you could go to and look at what they’ve already made for you there. Those guys are really accommodating that way.