@aike1000さんが作ったThreePiece.jsで遊んでみました。 後でマシンのコントローラにする予定です。
ThreePiece.js: https://github.com/aike/ThreePiece.js