Saturday, November 7, 2009

Web Yacht Sails Simulator

Recently I'm fascinated with sailing. Some time ago I've finished a sailing course that will enable me to sail on some most popular tourist sail boats. The more I'm learning the more things are getting interesting. For example, it sounds obvious that moving a boat involves many forces that all interfere with each other, however the way in which this all works makes you can move not only with the wind but also by the wind. Of course sailor has to do a plenty of math (aka experiance) to get some decent speed.

Sailing makes for a wonderful subject in programming scenarios that I have in Eclipse Ajax Tooling (ATF) project, so I've started building a web yacht sails simulation. It will present a virtual boat that user can steer and put under various weather conditions.

First thing I had to do was refreshing my knowledge about vectors. There will be vector for wind, water stream, vectors for sails, rudder and various resistances. The other story is making it all visible. I chose to make an Ajax application running in the browser. HTML5 canvas is used to do all the drawing, this excellent tutorial makes it really easy to learn.



You can see first results here. A couple of vectors on HTML5 canvas. Drag and drop vector arrows to move them around. Some vectors are 'read-only' because they're dynamically calculated from others.

There's also short screencast embeded below, which might be not visible in RSS reader:

Vector Math from Jacek Pospychala on Vimeo.



Next to do: draw boat and model some physics.

Wednesday, November 4, 2009

Eclipse Ajax tools help is on wiki!

When Eclipse Ajax Tools Framework (ATF) re-started delivering builds some time ago, we scored some negative feedback that it's hard to find what actually ATF does, and how it should be used.

This information, initially located in ATF help plug-in, was simply too hard to find. Now it's available at wiki and hopefull we'll be able to keep maintaining it both in wiki and eclipse help format.

Check out sexy ATF help :-)



btw. missed the Movember story? Ian explains.