Pixel Pedals of Tomakomai

北海道苫小牧市出身の初老の日常

"アルゴリズムクイックリファレンス" のノート

p.3 の convex hull の素朴解。

https://github.com/hiratara/hs-nutshell-algorithm-examples/blob/master/src/Main.hs

正しいかわからないので、plotしておく(案の定バグってたので修正してある)。

f:id:hiratara:20180908162419p:plain

道具は datahaskell に従った。具体的には、乱数に mwc-probability 、 plot に Chart-diagrams を利用。作ったsvgファイルをブラウザで見るために、 stack install wai-app-static して warp によってweb serverを立ち上げている。。