Jitter 3D

My interest in 3D was renewed recently, after watching Avatar I suppose. I also like optical illusions and general visual trippery, so one method that I really find fascinating is “jitter 3D” in which a stereoscopic image is placed in an animated GIF, causing the two images (one for each eye in theory) to flicker between each other. Amazingly, your brain treats them as if they are the two eye’s image and, at least to my eye, a remarkable illusion of depth is created. In addition to those links, here is a quick pair of badly done photos I just took of the room I’m sitting in:

jitter-room

I couldn’t get it quite right — too much motion — but you get the idea.

I began wondering whether one could actually use this technique in computer generated and animated content, so I wrote a very quick and dirty program to test the theory. For example, here is a screen cap of the program displaying a sphere(ish) object:

jitter-animation

I found, as you probably see as well, that with the minimal information presented in an image like this, it’s not really enough to trigger your brain to push much depth into the image. More importantly, it also completely fails once it’s animated — the program can spin the object, and when it does, the effect disappears completely. I’m not sure whether that disappearance is due to the lack of data (textures, robust background, etc.) in the image, which is possible and surely a contributing factor, or whether it is due to your eye needing a few frames to kick in the depth. I suspect the latter is likely, so for example, you couldn’t just tape two cameras together at eye-distance, and then record dual video, interleave the frames, and get depth.

Or maybe you could? I just dug up one of my old 3D graphics tools that is much more powerful than the DIY library I used for test number one, so I will probably see if I can find the time today to re-code a richer test.

Holy Busibodies Batman!

This morning as I was driving home from dropping off Nefarious at school I was driving in the right lane (ie. next to the parked cars). On my left was an SUV that was hugging my lane a little tighter than I liked, so I was keeping an eye on him, and then I noticed that he started actively drifting into my lane, so I laid on the horn and hit the gas as I was honking so I pulled ahead of him. He must have come within half an inch of hitting me. In my rearview mirror I watched him to make sure everything was OK, and he turned on his blinker and then illegally turned right, across the lane that I had just been in. I continued on my way home and sat down to watch a documentary and drink a morning coffee.

The doorbell rang, so I hobbled over to it hoping that I might have a package with something fun. Unfortunately I was greeted by a couple of cops asking me if the truck, which is parked right by the door was mine, and if I’d been driving it ten minutes earlier. I told them yes, and that I had a pretty good idea what they were talking about and described the incident — as far as I was concerned I had nothing to worry about since I was the party driving correctly who had almost been hit by a bad driver, and more importantly, because there had been no collision. I told them I was quite certain that there had been no collision and apologized in advance if he had actually hit me and I didn’t feel it (being clear to always word it “he hit me”). I asked them if the guy was actually saying that we had scraped sides, and they told me he was not — in fact, they didn’t even have a complaint!!!

So why were they there? What had happened is that someone driving behind me, who had watched the incident, had thought that we’d hit, and blamed me for the incident. Apparently they drove behind me, recorded my license plate and called the police to report the so-called “accident”. Nice.

The good thing about my truck being dirty was that it was obvious that there wasn’t a mark on it. If the guy had hit me, there would have been marks on either my fenders or on my tires, and there was nothing. The police confirmed this, and told me that a traffic cop might contact me later, but that they didn’t consider this worth their while and had no concerns that I’d done anything wrong. The best part was when the cop told me that he was a big fan of the truck, and in fact, had taken a photo of it some weeks earlier (on account of the zombie paint job) and currently had a picture of it on his phone!!!

The crazy thing is that a few weeks ago on the same street, but going the opposite direction, I got in an almost identical accident, but this one with a collision. I was again driving in the right hand lane, and this time an SUV tore past me on the left and pulled into my lane. They were about to smash into me, so I honked, but it didn’t stop them and I had to decide between hitting them at full speed and quite likely bouncing them into oncoming traffic, perhaps fatally, or grazing a parked van. I chose to graze the parked van, and my tire rubbed the length of it and then got “caught” under the body. The woman driving the SUV stopped and came back to explain that she was in a rush to get her kids to school and had hit me in her hurry. Neither of our vehicles were hurt, but the van, which actually had someone sitting in it, while not dented, did have some risk of scratches. He was pretty worried because it was a work van and not his own, so the woman and I both gave him our phone numbers and insurance details. I didn’t hear back from him so I’m relieved to assume that any “damage” just wiped off.

Anyway, I’m constantly annoyed and worried by how terrible and inattentive drivers are. I admit that I am an aggressive driver, but I pay very close attention to what I’m doing and don’t put myself or others at risk through my actions. But I think I’m more annoyed at today’s busybody that had some sort of gleeful schadenfreude in their attempt to get someone else in trouble. Sorry buddy, it didn’t work.

Games and Tools and Trips

Nefarious is feeling fine but has a bit of a cough that’s impinging on her getting as much sleep as she needs. Because we have a long weekend planned, flying up to Ottawa to visit my brother and Nefarious’s cousins, I let her sleep in and get some rest, skipping school (although she is at gymnastics class right now). That said, we did plenty of homeschooling today, with a nice math lesson that I think did a good job reinforcing one of the central truths of math — that math is dead easy if you understand the procedure. If you “get” how to solve a math problem, the work of actually doing it is a joke. But if you don’t get it, it’s horribly hard work. Then we did lots of word work — scrambles, finding synonyms and antonyms, missing letters, and so on — to supplement what she does at school.

We also played some Rummikub as well. We’ve fine-tuned the rules a little, as we do with most of the games we play, in order to make a better game. Actually, I really suggest that everyone amend the game in this fashion. In every turn, picking up a tile is enforced (ie. even if you can move you still have to). Also, at the end of every turn you must discard a tile. This tile is placed face up. When a player is picking up at the start of the turn, they can either pick up a single obscured card, or one or more (up to all) of the face up previously discarded tiles. This adds a significant skill and strategy element to the game, and transforms it from a pure game of chance into something much more rewarding to your mind.

rummihat

If you’re wondering why the indoor hat, it’s because it was just knitted and gifted by Caitlin minutes before and was being proudly worn as a victory hat — we played three games and I think overall I ended up losing by something like two hundred points. Ouch.

Caitlin is also going on her own trip this weekend, so I was copying some movies onto a memory stick for her to watch on the long train ride. In the process I discovered that one of my memory sticks is completely dead, so Nefarious and I dismantled it to see what’s inside, grinding down the casing of the memory chip to find the entirely boring innards. This turned into a bit of tool use and training with the Dremel, as she got to try out different tips and grind away at, carve, and sand different materials such as hard plastic, wood, foam, and lead (from some BBs that were embedded in the plywood target-practise sheet). She had loads of fun, and seems to enjoy power tools just as much as I did as a child.

dremel

The sunglasses are for eye protection. Not ideal, but a habit that one doesn’t want to avoid.

Anyway, we’ll be out of town only briefly, returning Sunday… I’m very much looking forward to the trip because I haven’t seen my brother in ages. We actually have adventures planned for many of the weekends this upcoming month, so I think time will pass more quickly in February than it already does.

Things I do when I’m not here

Time to catch up after not being here for a few days, eh?

My painkiller prescription, like many people’s, comes up short, largely because of the fear that the medical industry has of prescribing opiates — doctors who are too generous with them (even with patients like me who have diagnostically verifiable pain) face investigation and even criminal prosecution. This has left much of the medical community with the notion that they should strive to eliminate half of someone’s pain rather than all of it… As if halving chronic pain does anything. For those that haven’t lived with it, chronic pain is like water drop torture, and because of it’s constant nature, if it can not be eliminated completely, it is at best slowed down — but eventually, it still wears you down. My prescription refills on a weekly basis, and this leaves me with two choices. First, I can take it at the rate at which I need it, which means that I will have four or five “good days” followed by two or three brutally torturous days when I run out. Second, I can spread it out over the week evenly, meaning that every single day — or at least every single evening, when I’ve run out — is going to be horrible. Right now I have been doing the second, doing the prescription “by the book”, and it’s been very difficult. Even when I’m on a full dose of painkillers, the muscles in my upper legs and to a lesser extent shoulders are throbbing and feel like a perverse mix of being twisted, crushed, and scraped off the bone, which I’m sure is a mix of tolerance and the disease’s progression. Sitting still is painful enough, but the thought of having to walk up stairs or even stand up fills me with horror… This is a large part of why I have not been posting very much. I have to be very careful about conserving my strength, and it goes first to Nefarious, making sure that I am able to be the parent she needs, then to Caitlin, then to “real” work, and finally, to the internet.

I’ve been having a lot of nightmares, which historically is unusual for me, last night’s being obsessed with time travel. I don’t really remember it clearly enough to tell you the narrative, but it fell somewhere between Primer and The Time Traveler’s Wife (both movies that I enjoyed and recommend by the way, and I think I should mention the latter comes out on DVD in about a week)… a confusing set of overlapping jumps through time with something terrible but largely unidentifiable happening. I kept waking up from the pain and when I would manage to fall back asleep I would re-enter the same dream — this is a fairly normal thing for me… A coherent dream world will exist for a night, or a few days, or sometimes even years, and every time I fall asleep I re-enter it where I last left off. Talk about dreamtime! For good dreams this can be comforting, knowing that when I sleep I will go back to that place, but for bad dreams, it’s like awaiting a punishment you know you can’t avoid. Anyway, confusion along with pain and injury with blurry explanations… While I don’t subscribe to the idea that dreams usually reflect much of waking reality, I think here we can say different. At least I do like time travel conceptually — I was deeply moved by the story of real world scientist Ronald Mallett, one of the few physicists seriously tackling the problem of time travel, who has dedicated his life to solving the seemingly impossible task so that he can travel back in time to save his father who died of a heart attack at the age of thirty three.

Now on to warmer things I think?

Nefarious and I have done some fun projects this week. After our last fiasco with stilts, which were a bit of a failure, we decided to make some more traditional stilts using coffee cans and rope. DIY stilts part two worked much better than the first set, and, to my disappointment, they are also much louder, especially because they can be filled with stuff that rattles.

feb3-01-stilts feb3-02-stilts

Another project was to see if I could use my drill as a lathe. While I was able to carve a hardwood dowel accurately enough (in terms of finding the centre, so it would spin correctly) to give myself a good start, I found that once I started working it that instead of moving toward an increasingly centered condition that it actually worked its way more and more off-center as I worked it with the Dremel. I was able to make a simple chess piece, but it wasn’t easy, and it really did not turn out very well, so I consider the project a failure. I suppose I could make a jig that held the other end like a real lathe does, but it’s not that important to me and it’s really much easier just to carve the whole thing by hand instead… or watch Craigslist for a cheap wood lathe!

feb3-03-chess-piece feb3-04-chess-piece-painted

I’ve been doing lots of book and writing work, and my $10 Dynex keyboard is finally starting to die — it has served me well though, and has survived a hefty dose of dust, liquid, and most of all, getting stepped on many times. A good value. However, with the letter “u” regularly failing on me and a few keys (on the vestigial numberpad luckily) outright missing, it’s time to upgrade. I picked up two new toys for myself, a cool blue glowing keyboard, as well as a pair of noise-canceling headphones. The keyboard looked like it might be fun as well — if there was an API for it that let me individually address the lights on the keys, I wondered if I maybe I could write a simple video game that took place entirely on the keyboard. Unfortunately the letter “k” didn’t work at all, so I had to return the keyboard the next day and am back to the $10 special. I almost returned the headphones as well, because there was a lot of buzz and distortion on it, but after a little testing I realized that the noise is being produced by my computer doing a piss-poor job in isolating the sound card from electrical system noise.

feb3-05-new-toys

This is actually my second pair of noise canceling headphones, the first being a set of wireless Sennheisers that I ended up returning because the sound quality was so bad thanks to radio interference. When I was at Future Shop looking at headphones I pulled out my knife and started cleanly cutting open the cases so I could try them on — knowing that many headphones look pretty but feel bad to wear, I’m not about to spend a couple hundred dollars on a pair without trying them on, and I don’t really feel any guilt in doing so. I was however met by an exasperated salesman running across the store shouting at me that I couldn’t keep doing it. He was mad at first but in the end his commission made up for the effort he put into cleaning up my mess (at his insistence — I would have gladly done it myself).

Nefarious and I also went game shopping, with her picking one game and me picking two. Like most kids, she gravitates toward the games that have lots of action, noise, and general childish hilarity. I wasn’t sure about it at first, but after a minute of begging I agreed to get an electronic Whack-A-Mole game. The moles light up either red or green, and you have to hit your moles as fast as you can. It’s actually quite fun.

feb3-06-whack-a-mole

My choices of game were more cerebral, and I’m happy to report that Nefarious likes them quite a bit as well. I got Pentago and Rummikub. Pentago is a game where you have to make a line of five, and the board is split into four quadrants, one of which you can rotate 90 degrees on every turn. I’m not sold on the game — it seems too “simple” a la tic-tac-toe — but I have not played it enough yet to say that with certainty. Rummikub is fun — it’s basically gin rummy, the card game, converted into a tile based game — and it also serves as training for starting to play card games as well. So I think next time I see a deck of cards in the grocery store checkout’s “impulse buy” section I’ll grab them and see. I don’t normally like games like Rummikub, which are really just games of chance rather than games of skill, but it’s surprisingly enjoyable, and is a fairly long game so it kills quite a bit of time.

feb3-07-pentago feb3-08-rummikub

It’s good that it kills time, because Nefarious’s school had yet another lice outbreak, sending home many of the kids in her class — something like half the school was infected again. I think the source of the outbreak this time was one of the older kids… I talked to the school admin about it for a while as they confirmed that Nefarious was lice-free, and one of the problems is that some parents seem to see the whole thing as “shameful”, so they hide that their kid had it and coach them to lie, which of course just makes the whole thing worse by keeping the outbreak going. The principal was telling me that in twenty years of working at the school he’s never experienced anything like this — and I agree… I don’t remember anything like this when I was a kid. Luckily Nefarious had only a few hop over to her from the other kids, so it was very easy to deal with and there was nearly nothing to do.

Other than that, I’ve been doing lots of cooking and continue to be totally in love with cooking fish. It’s by far my favorite meal, and I think I’m quite good at cooking it, and my mouth waters just thinking about it. Sure, I have trouble holding my food down because I’m often nauseous from pain at supper when I’ve been cooking because of having spent a while on my feet in front of the stove, but still, I always look forward to that meal even if it doesn’t stay in my belly for long, yuck.

feb3-09-tuna feb3-10-tuna

My usual fish meal is vegetables, noodles or rice, and the fish, cooked with a simple sauce. The sauce is usually lemon or lime, chopped garlic, salt, a little sugar, and sometimes grapefruit juice, chopped ginger, sesame oil, or chopped onion as well. A fairly simple flavor on the whole, that really brings out the taste of the fish. I pan-steam the vegetables with a little of the sauce, and while I’m doing that the fish marinates a little with the remainder. I then add the noodles or rice to the vegetables at the same time as I start cooking the fish in lots of butter (which also becomes a sauce) and the spice/herb/citrus mix and it just melts in your mouth… So delicious. I could eat it every day.

Anyway, I’ve been experimenting with glasses-free “jitter” 3D, so I think I’m going to take a break from must-do work and that’ll be today’s diversion.

I hope… not!

shabama
This morning when I woke Nefarious up for school she said to me, “Sleep is amazing, isn’t it? One moment you’re lying in bed awake, and then the next thing you know, it’s morning!”

I think that this experience — the experience of the night disappearing, where you blink and it’s morning, has to do with not having dreams that night. It happens to me once every few years, and was more common when I was a child, and I remember it making a strong impression on me as well. I recall one night, looking at my clock, and every time I would blink, an hour or so would pass. A remarkable experience. Anyway, for me on the other hand, it was not a dreamless night

I dreamt last night that I was Barack Obama, President of the United States. To be clear, I wasn’t just President, I was literally Barack Obama. However, I had the same painful condition that I have now, and reporters were stalking me, trying to dig up dirt on me. Instead of worrying that they were going to show I was born in Kenya, I was all stressed out that they were going to find my Oxycodone prescription and label me as a drug abuser a la Rush Limbaugh. I was super-paranoid about throwing out my garbage, and was freaked out at the possibility that investigative reporters would go through the trash bins outside the White House and find the prescriptions… But I was hopeful that when I switched from my current opiate-stingy doctor to the Presidential doctor that he would give me a larger prescription… you know, on account of being President, I hoped that doctors would finally believe me about the pain level — my authority had been confirmed earlier when I was stuffing mountains of prescriptions and drug store receipts into grocery bags and sneaking behind the building to find a place to toss them, when the Secret Service body guards assured me that as President I did not have to do chores.

I continued being hassled by reporters, but it got worse later in the dream I had some problems with farting… I mean… sharting… and somehow pooped in my pants! I ran back into the White House hoping no one would notice, dashed to the washroom, and I just kept getting covered in more and more shit and then I realized that I had left the front door open and the reporters that were previously searching the trash had now come into the building and were about to find me, the President, in this revolting state, so the dream ended with me desperately but ineffectively trying to clean myself. Hahaha. Don’t analyze that dream please, it will not end with good conclusions.

And pardon the illustration, I have other things to spend my time on today. I’m working on the eBook (Kindle, Nook, etc.) conversion of the classic interviews book, and doing another level of clean-up on it as well as adding about a dozen interviews that have never been published in text (ie. video interviews and so on). I figure it will take a solid couple weeks to get that done.