I had another opportunity recently to make a visualization out of JavaScript; I thought I’d share two examples of using the language for this purpose.
### The 6-Stroke Wankel
Last winter, there was brief flurry of activity over [some guy building a six-stroke engine](http://www.autoweek.com/apps/pbcs.dll/article?AID=/20060227/FREE/302270007/1023/THISWEEKSISSUE). The principle was ingenious—rather than waste excess heat through a cooling system, why not harvest it as an extra power stroke, by injecting distilled water into your cylinder? The rapid expansion of the liquid into gas would provide a small boost, plus drastically reduce the amount of cooling infrastructure necessary on the engine block.

My immediate thought was, well, what about doing that with a Wankel? A [Wankel rotary engine](http://en.wikipedia.org/wiki/Wankel_engine) is a lightweight, high-torque system. Mazda uses standard 4-cycle Wankels with their RX7 and RX8 cars, but what about a 6-cycle one, that implemented this water-injection cycle?
[Jeff](http://jeffaho.com) helped me out with some of the formulas, and we ended up figuring out what the thing should look like. Now, it could certainly be modeled in a tool like SolidWorks, or AutoCAD, or maybe even MATLAB, but what’s the fun of that, when only people who have the software can look at it?
Instead, I tried going the SVG route. SVG is an open standard vector language that’s positioned to compete with Flash. Through various problems, it’s not as widespread as it could be, but all of Firefox, Opera, and Safari provide reasonable support for static SVG, and Firefox provides *excellent* support for SVG animation. So you’ll need to be using Firefox to view this, but [here's the animated demo of the six-stroke Wankel](http://sandbox.mikepurvis.com/design/engine.svg). Read on…