Recharging Roadtrips

Last week, Megan and I went to the opening ceremony of the first electric vehicle charging station in North Carolina, on the corner of W. Hargett and Dawson in Raleigh.

Megan wrote up a short blog post about it, and we talked about what this might mean for the future of our national infrastructure.

We have a Prius, so if we got an electric car (I like the Nissan Leaf, and not just because they use SVG on their site), we would probably use the hybrid for longer trips, so we could refuel easily. But in 10 years, that might change. Since it takes around half an hour to fully charge modern electric cars using the class 3 charger (the heavy-duty one), and 4-6 hours using a class 2 charger, electric road-trippers will need something to do while they wait. Megan mentions this in her blog:

Would owners of this type of business be motivated to install charging stations as a way to attract customers and hold them captive while their car is charging?

I could see a whole new class of businesses that cater to waiting customers, that charge the charging, so to speak: movie theaters, theme parks, mini-zoos, gaming parlors (multiplayer videogames or casinos or both), strolling gardens… activities that emphasize a more leisurely pace of travel. The return of the roadside attraction!

Here’s to the retro-future!

Translation Services at a Loss for Words

Text in SVG is text. Visually, you can use webfonts like WOFF or SVG Fonts (where they are supported, like in Opera or the iPhone) to make it look cool, and you can style both the stroke and fill to make it all fancy, or apply filters to pop it out or make it glow or give it a dropshadow, but it’s not just a raster image like many text headers… it’s human- and machine-readable text, as nature intended.

So, SVG is translatable, right?
Continue reading “Translation Services at a Loss for Words”

SVG Game Resources

Mozilla is holding an Open Web Games competition. I expect that many of the games will be use the Canvas API, since many programmers are more familiar with the imperative programming mode, and there are some games libraries that have been developed for Canvas or adapted from existing drawing or gaming libraries.

But I’m calling for SVG developers and designers to step up to the plate, as well. SVG has a lot of features that make it easier out of the box to build interfaces, animations, and even games. There is a scene graph, and the DOM event model that gives you free hit detection for pointer events, for example. And I’d love to see someone make an open-web game that’s both accessible and fun…

To help developers along, I thought I’d share a few free, open-source SVG resources that could be useful in building games:
Continue reading “SVG Game Resources”

No Glee for Atheists

The theme of last week’s episode of Glee was religion and atheism. To their credit, they approached it playfully and even a bit irreverently, with Billy Joel’s Only The Good Die Young and one character making wishes on a Grilled Cheesus like it’s a djinni bottle. They even revealed that two of the characters on the show were atheists, which is an unusual and maybe even brave move, even if only as a plot device.

So, kudos to Glee for even raising the topic of atheism. It’s a topic that most shows, especially ones that take themselves more seriously, avoid like the plague. They even raised the problem of theodicy: if there really is a loving, merciful, all-powerful God, why is there such profound misery and suffering in this vale of tears? Maybe the lightness of the show in general let them risk pushing some buttons in this apparently very religious country. The episode was timely, too, on the heels of Pew Research Center’s recent U.S. Religious Knowledge Survey, where atheists came out on top in knowledge of religion, and the atheist characters in the show certainly had the most eloquent refutations of religious faith.

So… that’s what I liked about it.

(Warning, spoiler alert!)
Continue reading “No Glee for Atheists”

Pointers on Background of SVG Borders on Mutiny

With SVG being integrated more and more into HTML5, both included via <object> and <img> elements, and inline in the same document, some natural questions about SVG and CSS are receiving more focus. This includes box model questions like background and border, and pointer events.

I’m interested in comments from the community on what direction SVG should take.

Continue reading “Pointers on Background of SVG Borders on Mutiny”

Getting to the Point

SVG paths have a pretty good set of shape commands, enough to let you draw any 2D shape you might want in an authoring tool: horizontal, vertical, and diagonal straight lines, elliptical arc segments, and cubic and quadratic Bézier curves. Béziers are great, giving you precise control over the position and curve interpolation of each point in a concise format, using control points (“handles”), and are easily chained together to create complex shapes.

But let’s say you have a series of points, and you want to draw a smooth line between them, e.g. for stock data, an audio wave, or a mathematical graphing equation. Béziers are not as handy there, because not all the points needed to define a Bézier spline are on the curve itself. Obviously, you can decompose any set of points into a set of Béziers, but that takes math, and who wants to do that? (Put your hand down, nerd. I’m talking to the normals.)

Sometimes, you just want to lay down a set of points, and let the browser draw a smooth curve (unlike polylines, where each segment is just a straight line between the points). Like this:

Please use a modern browser.
Continue reading “Getting to the Point”