« June 2006 | Main | August 2006 »

July 2006 Archives

July 12, 2006

Can't get there from here

I'm always excited when some new technological technique or toy catches my attention. I've had a few in recent weeks (Lilypond and Blender), but the last few days, it's been creating flash objects on my website via the PHP Ming functions.

If that sounds like a lot of techno-babble, well, it is. In simple terms, it's a way I can create drawings on my website that can be animated (or not), but are also vector-based, so they're resolution-independent. This originally caught my attention because someone at my wife's church wanted to know if I could help making a neat animated splash screen for their website. I said I couldn't because I didn't know how, nor have the tools, to create that type of graphics. But I realized I did have some ability to do that through PHP.

That lead to some experimentation, but that didn't last long. I then worked on getting my little bar graph-creation program converted to Flash. That was fun. Then I thought that I could use this same technique to finally fix my the counter on my Macintosh page that I never got to work beyond 99 days.

The trouble is that I want to overlay a perspective view of the counter on the image of the iMac's screen. Since the screen is tilted to the camera, it is not a perfect rectangle, so the text I put on it needs to be distorted to look right (perfect). I tried doing this with image slices, but these have to be rectangular, and it was laborious to pre-construct all possible digits to be placed on the screen. Perhaps if I could use the Ming flash tools, I could programatically distort some text and overlay it on top on the image.

My first attempts were promising, but I quickly was stymied by the lack of detailed information on how these PHP Ming functions work. I experimented some, but came to the realization that there is no facility arbitrarily distort objects with PHP Ming. I can rotate them and skew them, but I can't distort them.

So I'll have to try a different approach rather than the most robust one. I could create some digits that have the appropriate perspective already applied and then just place them on the image with PHP Ming, or maybe even the GD functions of PHP. I could ignore the perspective part of it, just skew the text, and hope it looks good enough. I'll think about it some before I start on my solution.

July 25, 2006

My Pie Chart

I may be the only one that thinks this is cool, but I just have created a flash-based pie chart with Ming via PHP. Here it is in action:

I did this to integrate with an intranet application I built at work, but mostly it was excuse to try to actually create a Flash animation with the tools I have at hand, which are pretty rudimentary. In fact, as a pie chart outside of this application, it's kind of strange. There's no way to tell what the slices represent without moving the mouse over them, and there's no title to the chart (the example above is the number of pictures on my website from each year). For my purposes, this is fine, since the intranet application supplies all this.

But doing that was surprising difficult, mostly because I found little-to-no documentation about how to use Ming in PHP. There are some examples, but nothing very comprehensive. Not knowing how the Flash model works, I had a very hard time understanding the difference between a shape, display item, sprite, button, and so on, and when you can (or should) do what to which one. Even now, I haven't been able to figure out how to ensure each new slice's label appears on top instantly (if you look closely, in some cases it fades from the previous label).

July 27, 2006

Alarm Clock Karma

My alarm clock didn't go off this morning, even though I set it correctly as far as I can tell. It's a new clock radio I got for Donna for her birthday, but she had very specific requiremtns for a clock radio that this one did not meet. So, I replaced my own aging clock (with lighted blue digits) with this one. I felt a little guilty about keeping it for myself, since it was a present I bought for Donna, but I justified this by saying that Donna didn't like my clock radio anyway, and the digits on this one are big enough that she can see them without her glasses from her side of the bed.

So perhaps it was karma that prevented the alarm from going off at 5:00 AM this morning. As it was, I had just enough time to shower, get dressed, and leave to make my 7:00 AM meeting. I didn't even have breakfast. I never skip breakfast. At least I have a free lunch out today, so I can fill up then.

About July 2006

This page contains all entries posted to Roblog in July 2006. They are listed from oldest to newest.

June 2006 is the previous archive.

August 2006 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33