2012
03.17

Urban dictionary: “Bleamer”

I recently came back from Open Source Days 2012 where I had a lightning talk about a current project of mine.
In short: LaTeX Beamer is a great presentation framework. The only real shortcoming of Beamer is that custom animation is not really something LaTeX was built for as a publication tool. But custom animation is something I often wish I could do when I need to explain something that’s a bit convoluted.

Applications like PowerPoint and Keynote are both out for me, for reasons of platform dependence and closedness. I also have a nagging suspicion that neither really offers the kind of animation freedom I sometimes want.

But as an amateur Blender user, I know that Blender has a very powerful animation system. So I set to work writing scripts that would let Blender take over where Beamer starts tripping over its own feet.

Thus Bleamer.

Oh, and before people start taking out the torches and pitchforks, I should point out that when I want to do animation, I’m talking about custom animations intended to explain stuff or make a point. I concur that Obnoxious off-the-shelf transition animations and pointless sliding text are just evil distractions.

Of course, that doesn’t mean that I’m not going to implement standardised transition animations if I feel a bit bored, or have nothing better to do.

Be afraid.

Having said that, here’s the OSD slide presentation which features a copious amount of evil, pointless animations to make the point of total animation freedom. Runs in Chrome or Firefox (and theoretically any other browser supporting WebM). Press space or page down to advance. On a few slides you may have to wait a second or two for the animation to show itself. Also, advancing in the middle of an animation is slightly buggy, so try to let the animations finish before you advance:

Bleamer: Freedom in Presentation

What follows below is an explanation of what I am actually demonstrating. The first code release of Bleamer will happen when I have fixed outstanding issues in the current code and added a Blender GUI code for interaction with the scripts.

Crap! the Blender logo came off.

Title slide: Projection. One of the interesting features is the ability to project any element of your slide onto an object (usually a plane) in Blender, thus making it possible to capture anything on your Beamer slide and move it around.
The slide also demonstrates that should you really need it, you have a physics engine at your disposal (in fact, Blender offers several physics engines).

Wow... Moving right along.

Slide 2: Simple movement.
Adding and moving stuff around is probably the easiest thing you can do. This particular slide took very little time to create.

No! Wait! I just wanted to change this one thing...

Slide 3: 3D objects.
Blender is a 3D modelling suite, which means you have access to 3D modelling… Should you find a need for it.
But remember that the addition of 3D objects to your slide also means you should start taking into account effects such as lighting and shadows. You must also consider the use of orthographic vs. perspective camera view. I may add features to make this more manageable in the context of a slide presentation, but this is not a very high priority.

Wheeeeee!

Slide 4: Projection again.
Again, projecting stuff onto objects and moving them around is one of the easier things you can do. In this case, the task was complicated somewhat by the fact that I am using the physics engine for moving the bullet points around.

F-klubben rules!

Slide 5: 3D without lighting.
3D effects can be useful even without lighting, as is demonstrated here.

Bleamer!

Slide 6: Animated transparency and adding text in Blender.
Sometimes you will want to add text to a slide within Blender, which is also quite easy. It affords more direct control of the text while working with it in Blender. I may make an effort to dig up the most common Beamer fonts and explicitly include them with Bleamer.
Another thing you may notice here is the use of fading effects. This is simply achieved by animating the transparency of the text.

Quote from The Hitchhiker's Guide to the Galaxy. I hope they serve good food.

Slide 7: Objects following paths.
Another potentially useful feature, is the use of modifiers to let objects (text and other stuff) follow and deform along a path.

Must follow the arrows... Must...

Slide 8: More objects (now arrows) following paths.
Which gave me the idea for this slide. There are a number of interesting applications for this kind of animation. So again, I may try to simplify the use of this in the context of Bleamer.

Pythagoras transformed.

Slide 8: Mathtex
Mathtex integration. This is one of the biggies. I have craved the ability to animate mathtex formulae. One of the Bleamer scripts allow the compilation of mathtex formulae directly into Blender, with transparent backgrounds and everything. It’s still not perfect, as every moveable element of a formula still has to be compiled separately. I have an idea of how to fix this, though. And that would truly make the animation of mathtex formulae a breeze.

Run for your life!

Slide 9: Garishly overblown usage of the rigid body physics engine.
Need I say more?

2011
11.21

This is what my table currently looks like.
Half the table
Half the table

You may notice a prominent accordion… Or, “accordion”.
Half the table

Yeah, if you look closely, you may notice this is not an “accordion” in the sense that you may be used to. But it is awesome.
Half the table

Thus, it also comes with interesting output options.
Half the table

The point of the other stuff on that table is to eventually hook these kinds of chips up to the MIDI output through a synthesiser (blueprints courtesy of the MIDIbox project).
Half the table

Some of the geeks among you may recognise these as two revisions of the famous (and awesome) sound chip from the Commodore 64 personal computer.

As my theory goes, the eventual action of hooking up the SID chips to the accordion may cause an awesomeness singularity, destroying the universe (which may then be replaced with something even more bizarrely inexplicable).

So it’s lucky that I’m still missing the MIDI cable, isn’t it?

It’s also lucky that I still don’t have a working fume extractor for the soldering iron. And that the tips I ordered for the iron was for the wrong model.

But it will all come together, just you wait. I will succeed eventually. And then the entire universe will be my hostage.

*MWAHAHAHAHAHAHAHAHAHAHAHA*

2011
07.16

First contestant arrives.

Go!

Note how neatly I follow the railroad gates as they go down. But I need to keep the head start I get from the slow acceleration of the train up until the forest.
Update: Forgot to comment on this, but yes, I run a red light in this video. Don’t do this at home, kids! Though in this case, the greatest danger is probably a fine. The railway gates are down, and I highly doubt any car is going to come crashing through.

Where the video ends is approximately where i started having problems with the camera shaking off.

2011
07.15

Racing path

Route

I just scouted the terrain two days ago.

Unfortunately, I can only go as far as Skölsta. There seems to be a path that go further, but it is a very bumpy forest path not really made for bikes. This means I will have to stop at Skölsta. But this still gives me a good 6-7 km stretch. And if I have to keep an average speed of about 30km/h through that terrain, it would probably be good with a break when I reach Skölsta anyway.

Legends of map:
Train: Black
Me: Blue

The most annoying part is marked with red on the map. The red part of the path consists of some kind of clay substance which is very annoying to bike on when it has rained (me and the bike were very dirty after the trip two days ago). And unfortunately it looks like rain on saturday.

So hopefully, I can gain a fair lead on the starting stretch. We shall see.

Otherwise, it looks fair. I have confirmed that I can keep a somewhat consistent speed over 30km/h, at least on plain, straight roads. Which should hopefully put me on par with the steam train. Unfortunately, I will likely be up against Thor. And Thor has airbrakes, which means it may go faster than 30km/h. It would have been nice with Långshyttan (the other locomotive of the same type that I think they use as substitute for Thor), as Långshyttan lack airbrakes, and is therefore restricted to 30km/h.

But I look forward to Saturday. If I can keep up at least some of the way, that will be great. Following the train from the outside seems much more fun than just sitting in one of the carriages.

2011
07.11

Bike vs. Steam Train!

Lennakatten

(Updated to fix name-confusion)

Here’s the deal:

Close to where I live is the end-station of museijärnvägen (“museum-railway”) of Uppland, going by the name of Lennakatten. It runs from there to Marielund, a bit east of Uppsala.

and it looks like it is possible to follow this railway fairly closely on bike, at least up to Skölsta.

From there on, I am not so certain any longer, but I will try to find a good route this week.

What I have not told you yet is this: In the weekends in summer, a regular passenger service is run on this railway. Some of the trains running the stretch are really great-looking Steam trains. The organisation running the service has six of them in reserve.

And I have just decided that I want try to race one of them next Saturday.

I am not sure how fast they go at max speed. Steam trains are not necessarily all that slow, so it is entirely probable that I simply cannot keep up. The biking route is also slightly longer. After coming out of Uppsala for instance, Lennakatten goes straight through the forest, while I have to take a path around it. And after Skölsta, there are probably cycle paths that I can follow, but I will have to check out how they go.

On the other hand, the locomotive will be burdened by 4-5 wagons full of passengers, and it has to stop at stations on the way.

So it may not be completely ridiculous.

But the point is: I intend to find out.

As a little extra information, the Lennakatten railway is actually getting expanded. We just had a new bridge installed not many days ago.

2011
06.05

The last SID 8580 on eBay

Going once… Going twice… Sold!

Go on, have a look.

Look at the going price. Then look at the item. Then have an extra look at the going price again just to confirm that the buyer is a complete nutter, and should be locked away for the rest of his life.
I’ll tell you a secret: I bid only slightly less than the going price on that one. And whoever overbid me seemed determined, so I let it go.
I have managed to secure two now, though I’d have to cannibalise a working Commodore C64C to get to one of those. This counts as a kind of sacrilege in my book, but I could do it if I really need to.
The 6581s I have are probably good enough for me, though.

“What on earth are you talking about you nutcase? Have you gone completely bonkers? £30 for a stupid, old chip?”

Yes. Well. Except that we are talking about one of the more famous microchips in computing history. Have a listen to this:

Audio MP3

This is the theme music from Turbo Outrun. A game released in 1989 for the Commodore 64. The C64 itself was released in 1982. That is the MOS 6581 (SID) chip from a C64 playing that music. As far as I know, no other computer or even game console from the 8-bit era came even close to the sound you could get out of that chip. It still holds a lot of nostalgia to many, and most of all, it doesn’t just sound good compared to anything from that era. No, it still sounds good today.

So even today, people are creating synthesisers based on these chips, and creating music with it. Unfortunately:

1. While the C64 may be the single best selling computer of all time, it went out of production in 1994. The SID went with it, I assume.
2. Anyone with even a glimmer of geek left in them will find it hard to let go of a working C64, or even to cannibalise one for their own use.
3. If you’re not careful, it’s quite easy to burn out a SID.
4. Some people are creating synthesisers built for 8 chips or more. (Greedy bastards! But hopefully they’re doing some amazing stuff with them.)

Putting this all together, you end up with a bit of a shortage of SID chips. Thus the sometimes insane prices. Especially, it seems, for the 8580, as the bugs that were ironed out in it make it better for synth use.
Ironically, as some will recall, the removal of a certain bug in the 8580 revision also broke speech synthesis for many games (Turbo Outrun, for instance) on the C64. The SID was never designed for speech synthesis, but a bug with volume control in the 6581 made it possible. And that was exploited to great effect. A way was found to do it on the 8580 as I recall having read. But for that revision of the chip, speech was at least broken on all games and applications released until then.

Oh well. I should now at least have sufficient spares to build myself a MIDIbox SID for my accordion. The rest of the necessary parts are all standard, currently made electronics.

It’s enough to make me go all giddy inside…

2011
05.15

On Eurovision 2011

So as usual, I was right and most of the rest of the world turned out to be wrong.

What?

Anyway. The only thing I agree with on the final list is a well-deserved 2nd place for Italy. But even that isn’t entirely true. They should have had first place. That would be okay, I suppose, if it wasn’t Azerbaijan’s contribution they had lost to. I still struggle to understand how that was good enough to deserve a first place.

*Very puzzled expression*

But the real travesty this year was France. A 15th place? Really? What on earth I don’t even-

*Extremely puzzled expression*

Were we actually listening to the same show, or did SVT cleverly fake the entire thing, point a broadcast antenna in my direction, and then switch to the real show when the voting started?

Or maybe I fell through a rift to a parallel universe where France didn’t deserve to be among the two best this year?

Ah well. It shouldn’t surprise me, really. This happens every year. My musical tastes might possibly just be a tiny bit twisted if we compare with world averages…

I should note that since I am a Dane who lives in Sweden, and I have a Swedish phone number, I could have done the patriotic thing and voted for Denmark. But only, and I stress this: Only if I was a total prat. Either that, or if Denmark had contributed with something that was really great. But hey, last time that happened (and we won, deservedly) was before I was born.

2011
05.12

A while ago, I was informed that it was possible to bring an EU proposal from 2009 on copyright extension from 50 to 70 years up to discussion again, provided Christian Engström could collect 40 signatures.
Thus, I wrote an e-mail to all the Danish MEPs to see if I could elicit som sort of response, perhaps convince them to go sign up with Christian.

I was pleasantly surprised by what happened.

First, have a look at the full list:
http://www.europarl.europa.eu/members/public/geoSearch/search.do?country=DK&language=EN

I will now list the ones I had a positive response from:

Christel Schaldemose

Christel speaks for Socialdemokratiet on this subject, so that includes, apparantly:
Dan Jørgensen
Britta Thomsen
Ole Christensen

And the rest:
Bendt Bendtsen
Morten Messerschmidt
Margrete Auken
Morten Løkkegaard
Emilie Turunen

9 out of 13? Not too shabby.
As it happens, Christian Engström was able to get the signatures he needed, and only a few of them made it to be on the list of signatures, which is another pleasant surprise. It indicates that there just might be enough consensus in parliament to have the proposal rejected.
In any case, it doesn’t mean what I did here was useless. A number of them agreed with me, but weren’t aware of the current situation, thus giving them time to prepare for the discussion. One or two even thanked me for explaining the issue to them, so that they would be able to participate in the discussion.
Some of them had secretaries to answer for them, others answered personally. But I didn’t see a single e-mail that appeared to be a form letter, which is nice.

So the mail was read, and if nothing else, I managed to raise the awareness of the issue amongst the Danish MEPs. The morale? Don’t give up hope. Politicians do listen to reason at times :)

2011
05.08

How’s this for a conspiracy theory:
The trading systems used by Wall Street allows counterfeit stock to appear out of nothing. This fact is exploited by a variety of crooks (many located on Wall Street) to drive down stock prices, destroy companies and rake in obscene amounts of money in the process. Journalists on highly respected publications such as the Wall Street Journal seem to know about this, but are friends of the crooks on Wall Street, and are actively dismissing any such rumours, often hailing aforementioned crooks as innovators. So the general public remains ignorant. The SEC (U.S. Securities and Exchange Commission), which is supposed to regulate Wall Street, has a corrupt management which has repeatedly quashed any thorough investigations into market manipulation through use of the aforementioned creation of counterfeit stock. More than one SEC manager has gone on to get high paying positions at hedge funds run by the crooks. Some politicians may know about the scale of the problem, but refuse to impose regulation that would force, primarily the DTCC (Depository Trust & Clearing Corporation) to fix their systems. It is even claimed by some that any attempt to clean up the existing massive amounts of counterfeit stock would cause a complete financial breakdown. So we had best just ignore it. Yeah…

Wait. Sorry. Did I say conspiracy theory? I meant well researched and excruciatingly detailed investigative journalism: DeepCapture

Highly recommended (and scary) reading, if you have the time. There is quite a lot of it. I have been quietly following it for a few years, and it feels a bit like “eating the red pill”. If you were slightly puzzled by how major U.S. banks could suddenly crash and burn in 2008, the above situation allegedly contributed to significant degree.

I know I know. I’m not an economist, or a trader. I don’t pretend to understand economics. But I understand that the ability to print counterfeit stock or money is bad for any economy. And I also claim to understand technology, which is one part of the story that fascinates me:

One of the root causes of this is apparently the implementation of a stock trading rule stating that if you have (by administrative error, obviously) sold some shares you did not own, you have 3 days to find and buy (or borrow) those shares elsewhere before you have to deliver them. This seems to me to be an old and largely obsolete rule, as with the advent of digital stock trading, keeping precise track of what stock you own and have borrowed should be quite trivial.
But as it is a stock trading rule, it has in fact been implemented in the clearing system (managed by the DTCC), and brokers can invoke this rule by creating an IOU in the system, sending it to the buyer instead of a real share. Oh, and to the buyer, it looks like real stock. So he doesn’t know, and can resell it as if it was real stock.

Loophole, much?

It appears there are ways you can juggle IOUs to reset the 3 day time limit. But apparently, the authorities aren’t going to come and knock down any doors anyway, even if the seller doesn’t deliver when the three days have gone. They just get silently registered in the system as FTDs (Failure To Deliver). Additionally, if you can bankrupt the company by flooding the market with massive amounts of IOUs, and thus get it delisted from the stock exchange before the time limit, no FTDs will even be registered.

I am already a bit queasy about the handling of money and stock in software. There is so much potential for conjuring up money and stock out of nowhere (intentionally or otherwise). Like printing counterfeit money, but far easier. But what on earth kinds of nutcases intentionally designs a trade clearing system with such a feature?

Well… The DTCC, apparently. And, I suppose, the regulators who still to this day retains a rule that should have been obsoleted by technology.

They do seem to have done everything short of yelling “GET RICH FAST! GET YOUR STOCK PRINTING TOOLS HERE!”

Since 2005, the stock exchanges are required to publish a list of stocks that are failing to deliver above a certain threshold. These are called “reg SHO” lists. This, for instance, is the one for NASDAQ:
http://www.nasdaqtrader.com/Trader.aspx?id=RegSHOThreshold

Note the requirements for being on the list. That’s… Quite a lot of administrative errors, isn’t it?

The DTCC and SEC also have access to more precise numbers, which the SEC is required to release every once in a while. To add insult to injury, Judd Bagley showed how he could very precisely predict the amount of failures of a specific stock based on then publicly available information about the stock and a bit of pattern matching with similar events from other stocks:
Prepare to be astounded
Cataloging Sears stock manipulation

Which does more than simply suggest that there is heavy-handed manipulation going on.

It’s all very bizarre, and somehow very few news outlets have caught on to it. I don’t often latch on to Internet memes, but this one is very apt: Massive, massive FAIL!

You don’t have to believe it. Or care for that matter. DeepCapture makes some incredible claims, and I for one am not able to help much in their fight if I wanted. But it interests me somewhat, and I have found that they have a frightening tendency to be able to back up their claims.