LoginSignup
0
1

More than 5 years have passed since last update.

MATLAB > freeBoundary()を試してみた > tetmeshを処理してみた > 疑問点

Last updated at Posted at 2017-11-11
動作環境
GeForce GTX 1070 (8GB)
ASRock Z170M Pro4S [Intel Z170chipset]
Ubuntu 16.04 LTS desktop amd64
TensorFlow v1.2.1
cuDNN v5.1 for Linux
CUDA v8.0
Python 3.5.2
IPython 6.0.0 -- An enhanced Interactive Python.
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
GNU bash, version 4.3.48(1)-release (x86_64-pc-linux-gnu)
scipy v0.19.1
geopandas v0.3.0
MATLAB R2017b (Home Edition)

https://github.com/gradywright/spherepts/blob/master/code/getIcosNodes.m
にて使われているfreeBoundary()。
その中身を理解してNumpy実装できるだろうか。

https://jp.mathworks.com/help/matlab/ref/trirep.freeboundary.html
にある例を実行してみる。

trisurf(tri, xf(:,1),xf(:,2),xf(:,3), ... 'FaceColor','cyan', 'FaceAlpha', 0.8);

はそのままでは実行できないので、以下のようにした。

load tetmesh
trep = TriRep(tet, X);
[tri xf] = freeBoundary(trep);
trisurf(tri, xf(:,1),xf(:,2),xf(:,3), 'FaceColor', 'cyan', 'FaceAlpha', 0.8);

qiita.png

qiita.png

疑問点

  • 1456(Xの項目数)の座標から1079(xfの項目数)の座標に減っている
  • 4969(tetの項目数)のインデックス組合せから2174(triの項目数)のインデックス組合せに減っている

一方で、MATLAB > freeBoundary() > 四角形をfreeBoundaryしてみる > 2つでなく4つの三角形のインデックスが得られるで試したところ、座標やインデックス組合せは減るのではなく、増えている。

link

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1