http://www.ice.is.kit.ac.jp/~umehara/misc/comp/20090423.html
こちらとか有用かと