平均曲率を用いて、3次元オブジェクトの表面を色付けした。 凹んでいるところは赤、出っ張っているところは緑になっている。 いま、同じ色でひと続きになっている領域を仲間分けして、なおかつ、隣り合う領域がどうなっているかを調べたい。 ある頂点と、その頂点を含む三角形(1-ring)を選び、それに隣り合っている三角形をすべて、再度抽出する。 このとき、既に選ばれた三角形たちは、重複して抽出すると計算に時間がかかるので、適宜除く。 # 球面に色を付けた時、同じ色が付いている閉じた領域をチェックする K0 <- NULL for(k0 in 1:nrow(v1[[i]]$f)){ if( !any(mapply(function(z) k0 %in% z, K0)) ){ # いままでのK に kが含まれていなかったら新規のtriangle print(paste("Processing", k0))