« All done (almost) | Main | My Pie Chart »

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.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About

This page contains a single entry from the blog posted on July 12, 2006 12:15 PM.

The previous post in this blog was All done (almost).

The next post in this blog is My Pie Chart.

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

Powered by
Movable Type 3.33